From: SourceForge.net <no...@so...> - 2007-07-28 22:16:24
|
Bugs item #1762907, was opened at 2007-07-28 15:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456910&aid=1762907&group_id=49630 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: helloworld.c (helloworld_c) Assigned to: Nobody/Anonymous (nobody) Summary: Small bug setting gid Initial Comment: When using the verbose option on IMAP mailboxes and running under root, e.g. archivemail -v imap://user:pw@server/mb the variable 'former_id' in the following section around line 1100 stays at 'None': former_gid = None # groupid doesn't have to be '0' for root on solaris 8? if (os.getuid() == 0) and os.path.exists(mailbox_name): ... This is because mailbox_name is an IMAP mailbox and therefore the path doesn't exist. Later on, in the 'finally' section it tries to set the gid to 'None' which, of course, fails: # if we are running as root, revert the seteuid()/setegid() above if (os.getuid() == 0): vprint("changing effective groupid and userid back to root") os.setegid(former_gid) In order to catch this case I would suggest to replace the condition to: if os.getuid() == 0 and former_gid != None: Works fine here. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456910&aid=1762907&group_id=49630 |