Skip to content

Commit

Permalink
exim fix
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/lennart/svn/public/pam_dotfile/trunk@17 5391d09e-f7c1-0310-8aa1-84a1c93f5a38
  • Loading branch information
poettering committed Aug 25, 2003
1 parent 0c64290 commit 92629d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pam_dotfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,18 @@ static int _fork_authentication(context_t *c, const char *username, const char *
};
char * envp[] = { NULL };

close(p[1]);

if (p[0] != 0 && dup2(p[0], 0) != 0) {
logmsg(c, LOG_ERR, "dup2(): %s", strerror(errno));
exit(2);
}

close(1);
close(2);
close(p[0]);
close(p[1]);

if (p[0] != 0)
close(p[0]);

if (open("/dev/null", O_WRONLY) != 1) {
logmsg(c, LOG_ERR, "open(\"/dev/null\", O_WRONLY): %s", strerror(errno));
Expand Down

0 comments on commit 92629d8

Please sign in to comment.