[BACK]Return to session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/session.c between version 1.70 and 1.71

version 1.70, 2001/04/05 15:48:18 version 1.71, 2001/04/06 21:00:12
Line 325 
Line 325 
                         /* Setup to always have a local .Xauthority. */                          /* Setup to always have a local .Xauthority. */
                         xauthfile = xmalloc(MAXPATHLEN);                          xauthfile = xmalloc(MAXPATHLEN);
                         strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);                          strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);
                         temporarily_use_uid(s->pw->pw_uid);                          temporarily_use_uid(s->pw);
                         if (mkdtemp(xauthfile) == NULL) {                          if (mkdtemp(xauthfile) == NULL) {
                                 restore_uid();                                  restore_uid();
                                 error("private X11 dir: mkdtemp %s failed: %s",                                  error("private X11 dir: mkdtemp %s failed: %s",
Line 849 
Line 849 
                         endgrent();                          endgrent();
   
                         /* Permanently switch to the desired uid. */                          /* Permanently switch to the desired uid. */
                         permanently_set_uid(pw->pw_uid);                          permanently_set_uid(pw);
 #endif  #endif
                 }                  }
                 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)                  if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
Line 1372 
Line 1372 
         }          }
         xauthfile = xmalloc(MAXPATHLEN);          xauthfile = xmalloc(MAXPATHLEN);
         strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);          strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);
         temporarily_use_uid(s->pw->pw_uid);          temporarily_use_uid(s->pw);
         if (mkdtemp(xauthfile) == NULL) {          if (mkdtemp(xauthfile) == NULL) {
                 restore_uid();                  restore_uid();
                 error("private X11 dir: mkdtemp %s failed: %s",                  error("private X11 dir: mkdtemp %s failed: %s",

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71