patch-screen_c 1.0 KB

123456789101112131415161718192021222324252627282930
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- screen-4.0.3.orig/screen.c 2003-09-08 16:26:41.000000000 +0200
  3. +++ screen-4.0.3/screen.c 2008-10-08 14:06:53.000000000 +0200
  4. @@ -819,7 +819,7 @@ char **av;
  5. #ifdef MULTIUSER
  6. own_uid = multi_uid = real_uid;
  7. - if (SockMatch && (sockp = index(SockMatch, '/')))
  8. + if (SockMatch && (sockp = strchr(SockMatch, '/')))
  9. {
  10. if (eff_uid)
  11. Panic(0, "Must run suid root for multiuser support.");
  12. @@ -1025,7 +1025,7 @@ char **av;
  13. }
  14. if ((st.st_mode & 0777) != 0700)
  15. Panic(0, "Directory %s must have mode 700.", SockPath);
  16. - if (SockMatch && index(SockMatch, '/'))
  17. + if (SockMatch && strchr(SockMatch, '/'))
  18. Panic(0, "Bad session name '%s'", SockMatch);
  19. SockName = SockPath + strlen(SockPath) + 1;
  20. *SockName = 0;
  21. @@ -1041,7 +1041,7 @@ char **av;
  22. (void) gethostname(HostName, MAXSTR);
  23. HostName[MAXSTR - 1] = '\0';
  24. #endif
  25. - if ((ap = index(HostName, '.')) != NULL)
  26. + if ((ap = strchr(HostName, '.')) != NULL)
  27. *ap = '\0';
  28. if (lsflag)