[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Repair getuid fix--now unix works again too
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv16904/lib/mixminion
Modified Files:
Common.py
Log Message:
Repair getuid fix--now unix works again too
Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- Common.py 10 Jul 2003 20:01:30 -0000 1.99
+++ Common.py 10 Jul 2003 20:09:58 -0000 1.100
@@ -363,13 +363,14 @@
if not os.path.isfile(fn):
raise MixFatalError("%s is not a regular file" % fn)
- if _CHECK_UID and st[stat.ST_UID] != me:
+ if _CHECK_UID:
me = os.getuid()
- ownerName = _uidToName(st[stat.ST_UID])
- myName = _uidToName(me)
- raise MixFilePermissionError(
- "File %s is owned by %s, but Mixminion is running as %s"
- % (fn, ownerName, myName))
+ if st[stat.ST_UID] != me:
+ ownerName = _uidToName(st[stat.ST_UID])
+ myName = _uidToName(me)
+ raise MixFilePermissionError(
+ "File %s is owned by %s, but Mixminion is running as %s"
+ % (fn, ownerName, myName))
mode = st[stat.ST_MODE] & 0777
if _CHECK_MODE and mode not in (0700, 0600):
if not fix: