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

Diff for /src/usr.bin/passwd/local_passwd.c between version 1.35 and 1.36

version 1.35, 2004/09/18 19:34:29 version 1.36, 2004/12/20 15:05:59
Line 84 
Line 84 
         }          }
         if ((lc = login_getclass(pw->pw_class)) == NULL) {          if ((lc = login_getclass(pw->pw_class)) == NULL) {
                 warnx("unable to get login class for user %s.", uname);                  warnx("unable to get login class for user %s.", uname);
                   free(opw);
                 return(1);                  return(1);
         }          }
   
         uid = authenticated ? pw->pw_uid : getuid();          uid = authenticated ? pw->pw_uid : getuid();
         if (uid && uid != pw->pw_uid) {          if (uid && uid != pw->pw_uid) {
                 warnx("login/uid mismatch, username argument required.");                  warnx("login/uid mismatch, username argument required.");
                   free(opw);
                 return(1);                  return(1);
         }          }
   
Line 133 
Line 135 
         if (i >= 4)          if (i >= 4)
                 fputc('\n', stderr);                  fputc('\n', stderr);
         pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);          pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
         if (pfd < 0 || fcntl(pfd, F_SETFD, 1) == -1)          if (pfd < 0 || fcntl(pfd, F_SETFD, FD_CLOEXEC) == -1)
                 pw_error(_PATH_MASTERPASSWD, 1, 1);                  pw_error(_PATH_MASTERPASSWD, 1, 1);
   
         /* Update master.passwd file and rebuild spwd.db. */          /* Update master.passwd file and rebuild spwd.db. */

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36