+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
char *getlogin();
char *pw;
char pwbuf[10];
-char buf[512];
+char buf[BUFSIZ];
main(argc, argv)
char *argv[];
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");
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,