- if ((tf=fopen(temp,"w")) == NULL) {
- printf("Cannot create temporary file\n");
- exit(1);
- }
- /*
- * There is another race condition here: if the passwd file
- * has changed since the error checking at the beginning of the program,
- * then user_uid may not be in the file. Of course, the uid might have
- * been changed, but this is not supposed to happen.
- */
- if (getpwuid(user_uid) == NULL) {
- printf("%s%d%s\n", "Passwd file has changed. Uid ", user_uid,
- " is no longer in the file!?");
+ if ((tf = fdopen(fd, "w")) == NULL) {
+ printf("Absurd fdopen failure - seek help\n");