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

Diff for /src/usr.bin/su/su.c between version 1.33 and 1.34

version 1.33, 2000/08/20 18:42:41 version 1.34, 2000/09/15 07:13:50
Line 253 
Line 253 
                                 errx(1, "calloc");                                  errx(1, "calloc");
                         if (setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETPATH))                          if (setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETPATH))
                                 err(1, "unable to set user context");                                  err(1, "unable to set user context");
                         if (p)                          if (p) {
                                 (void)setenv("TERM", p, 1);                                  if (setenv("TERM", p, 1) == -1)
                                           err(1, "unable to set environment");
                           }
   
                         seteuid(pwd->pw_uid);                          seteuid(pwd->pw_uid);
                         setegid(pwd->pw_gid);                          setegid(pwd->pw_gid);
Line 269 
Line 271 
                                 err(1, "unable to set user context");                                  err(1, "unable to set user context");
                 }                  }
                 if (asthem || pwd->pw_uid) {                  if (asthem || pwd->pw_uid) {
                         (void)setenv("LOGNAME", pwd->pw_name, 1);                          if (setenv("LOGNAME", pwd->pw_name, 1) == -1 ||
                         (void)setenv("USER", pwd->pw_name, 1);                              setenv("USER", pwd->pw_name, 1) == -1)
                                   err(1, "unable to set environment");
                 }                  }
                 (void)setenv("HOME", pwd->pw_dir, 1);                  if (setenv("HOME", pwd->pw_dir, 1) == -1 ||
                 (void)setenv("SHELL", shell, 1);                      setenv("SHELL", shell, 1) == -1)
                           err(1, "unable to set environment");
         }          }
   
 #ifdef KERBEROS  #ifdef KERBEROS
         if (*krbtkfile)          if (*krbtkfile) {
                 (void)setenv("KRBTKFILE", krbtkfile, 1);                  if (setenv("KRBTKFILE", krbtkfile, 1) == -1)
                           err(1, "unable to set environment");
           }
 #endif  #endif
   
         if (iscsh == YES) {          if (iscsh == YES) {

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34