X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/a68924a6e07d69bc4b8d6106b3af0ac5a7490905..31cef89cb428866f787983e68246030321893df4:/usr/src/cmd/passwd.c diff --git a/usr/src/cmd/passwd.c b/usr/src/cmd/passwd.c index 2ecf762f5f..e964bb0fae 100644 --- 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 @@ -18,7 +19,7 @@ char *getpass(); char *getlogin(); char *pw; char pwbuf[10]; -char buf[512]; +char buf[BUFSIZ]; main(argc, argv) char *argv[]; @@ -116,6 +117,7 @@ tryagn: 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"); @@ -135,6 +137,8 @@ tryagn: 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,