Take -lgnuregex out. It causes sed to core.
[unix-history] / usr.bin / passwd / local_passwd.c
index a196127..37818a6 100644 (file)
@@ -32,7 +32,8 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)local_passwd.c     5.5 (Berkeley) 5/6/91";
+/*static char sccsid[] = "from: @(#)local_passwd.c     5.5 (Berkeley) 5/6/91";*/
+static char rcsid[] = "$Id: local_passwd.c,v 1.5 1993/08/01 18:10:19 mycroft Exp $";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -53,14 +54,18 @@ local_passwd(uname)
        char *getnewpasswd();
 
        if (!(pw = getpwnam(uname))) {
        char *getnewpasswd();
 
        if (!(pw = getpwnam(uname))) {
+#ifdef YP
+               extern int use_yp;
+               if (!use_yp)
+#endif
                (void)fprintf(stderr, "passwd: unknown user %s.\n", uname);
                (void)fprintf(stderr, "passwd: unknown user %s.\n", uname);
-               exit(1);
+               return(1);
        }
 
        uid = getuid();
        if (uid && uid != pw->pw_uid) {
                (void)fprintf(stderr, "passwd: %s\n", strerror(EACCES));
        }
 
        uid = getuid();
        if (uid && uid != pw->pw_uid) {
                (void)fprintf(stderr, "passwd: %s\n", strerror(EACCES));
-               exit(1);
+               return(1);
        }
 
        pw_init();
        }
 
        pw_init();
@@ -78,7 +83,7 @@ local_passwd(uname)
 
        if (!pw_mkdb())
                pw_error((char *)NULL, 0, 1);
 
        if (!pw_mkdb())
                pw_error((char *)NULL, 0, 1);
-       exit(0);
+       return(0);
 }
 
 char *
 }
 
 char *