[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.6 and 1.7

version 1.6, 1997/02/16 20:08:56 version 1.7, 1997/03/27 00:30:53
Line 41 
Line 41 
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <pwd.h>  #include <pwd.h>
   #include <err.h>
 #include <errno.h>  #include <errno.h>
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   #include <ctype.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <util.h>  #include <util.h>
   
 uid_t uid;  static uid_t uid;
   
 char *progname = "passwd";  
 char *tempname;  
   
   int
 local_passwd(uname)  local_passwd(uname)
         char *uname;          char *uname;
 {  {
Line 65 
Line 66 
                 extern int use_yp;                  extern int use_yp;
                 if (!use_yp)                  if (!use_yp)
 #endif  #endif
                 (void)fprintf(stderr, "passwd: unknown user %s.\n", uname);                  warnx("unknown user %s.", uname);
                 return(1);                  return(1);
         }          }
   
         uid = getuid();          uid = getuid();
         if (uid && uid != pw->pw_uid) {          if (uid && uid != pw->pw_uid) {
                 (void)fprintf(stderr, "passwd: %s\n", strerror(EACCES));                  warnx("login != uid: %s", strerror(EACCES));
                 return(1);                  return(1);
         }          }
   

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7