diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-15 15:56:02 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-15 15:56:02 +0000 |
commit | cbfddbc6b2fbdc8744f693081d64ba96b40a9179 (patch) | |
tree | f8d6fb414cf35905c54ded83845680f2d65c54a8 | |
parent | 4f83c48a060ea8036a4df68dbb39ee41983e28a9 (diff) | |
download | fetchmail-cbfddbc6b2fbdc8744f693081d64ba96b40a9179.tar.gz fetchmail-cbfddbc6b2fbdc8744f693081d64ba96b40a9179.tar.bz2 fetchmail-cbfddbc6b2fbdc8744f693081d64ba96b40a9179.zip |
Privilege-switching can't be done.
svn path=/trunk/; revision=340
-rw-r--r-- | driver.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -703,8 +703,6 @@ struct method *proto; fprintf(stderr, "skipping message %d ", num); else { - int saveduid = getuid(); - /* request a message */ (protocol->fetch)(socket, num, &len); @@ -721,21 +719,8 @@ struct method *proto; /* open the delivery pipe now if we're using an MDA */ if (queryctl->mda[0]) - { - /* - * In case we're running as root, change our UID to - * that of the local user being delivered to, so the MDA - * will be able to modify that user's files. This - * code will fail quietly when run by non-root. - */ - (void) setuid(queryctl->uid); - if ((mboxfd = openmailpipe(queryctl)) < 0) - { - (void) setuid(saveduid); /* see below */ goto cleanUp; - } - } /* read the message and ship it to the output sink */ ok = gen_readmsg(socket, mboxfd, @@ -745,17 +730,9 @@ struct method *proto; /* close the delivery pipe, we'll reopen before next message */ if (queryctl->mda[0]) - { if ((ok = closemailpipe(mboxfd)) != 0 || alarmed) goto cleanUp; - /* - * Now try to reset our UID to root. This code will fail - * quietly when run by non-root. - */ - (void) setuid(saveduid); - } - /* tell the server we got it OK and resynchronize */ if (protocol->trail) (protocol->trail)(socket, queryctl, num); |