projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4 release
[unix-history]
/
usr
/
src
/
cmd
/
passwd.c
diff --git
a/usr/src/cmd/passwd.c
b/usr/src/cmd/passwd.c
index
2ecf762
..
e964bb0
100644
(file)
--- a/
usr/src/cmd/passwd.c
+++ b/
usr/src/cmd/passwd.c
@@
-1,3
+1,4
@@
+static char *sccsid = "@(#)passwd.c 4.1 (Berkeley) 10/1/80";
/*
* enter a password in the password file
* this program should be suid with owner
/*
* enter a password in the password file
* this program should be suid with owner
@@
-18,7
+19,7
@@
char *getpass();
char *getlogin();
char *pw;
char pwbuf[10];
char *getlogin();
char *pw;
char pwbuf[10];
-char buf[
512
];
+char buf[
BUFSIZ
];
main(argc, argv)
char *argv[];
main(argc, argv)
char *argv[];
@@
-116,6
+117,7
@@
tryagn:
printf("Temporary file busy -- try again\n");
goto bex;
}
printf("Temporary file busy -- try again\n");
goto bex;
}
+ signal(SIGTSTP, SIG_IGN);
close(creat(temp,0600));
if((tf=fopen(temp,"w")) == NULL) {
printf("Cannot create temporary file\n");
close(creat(temp,0600));
if((tf=fopen(temp,"w")) == NULL) {
printf("Cannot create temporary file\n");
@@
-135,6
+137,8
@@
tryagn:
goto out;
}
pwd->pw_passwd = pw;
goto out;
}
pwd->pw_passwd = pw;
+ if (pwd->pw_gecos[0] == '*')
+ pwd->pw_gecos++;
}
fprintf(tf,"%s:%s:%d:%d:%s:%s:%s\n",
pwd->pw_name,
}
fprintf(tf,"%s:%s:%d:%d:%s:%s:%s\n",
pwd->pw_name,