[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.63 and 1.64

version 1.63, 2010/12/10 19:55:37 version 1.64, 2010/12/13 14:46:19
Line 306 
Line 306 
                  */                   */
                 if (getsid(0) != getpid())                  if (getsid(0) != getpid())
                         flags &= ~LOGIN_SETLOGIN;                          flags &= ~LOGIN_SETLOGIN;
         } else          } else {
                 flags = (asthem ? (LOGIN_SETPRIORITY | LOGIN_SETUMASK) : 0) |                  flags = LOGIN_SETRESOURCES|LOGIN_SETGROUP|LOGIN_SETUSER;
                     LOGIN_SETRESOURCES | LOGIN_SETGROUP | LOGIN_SETUSER;                  if (asthem)
                           flags |= LOGIN_SETENV|LOGIN_SETPRIORITY|LOGIN_SETUMASK;
           }
         if (setusercontext(lc, pwd, pwd->pw_uid, flags) != 0)          if (setusercontext(lc, pwd, pwd->pw_uid, flags) != 0)
                 auth_err(as, 1, "unable to set user context");                  auth_err(as, 1, "unable to set user context");
         if (pwd->pw_uid && auth_approval(as, lc, pwd->pw_name, "su") <= 0)          if (pwd->pw_uid && auth_approval(as, lc, pwd->pw_name, "su") <= 0)

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64