File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 2222 backend
2323- fixed some more mysql 0.6->0.7 upgrade bugs (sf bug 950410)
2424- fixed Boolean values in postgresql (sf bugs 972546 and 972600)
25+ - fixed -g arg to roundup-server (sf bug 973946)
2526
2627
27282004-06-10 0.7.4
Original file line number Diff line number Diff line change 1717
1818"""Command-line script that runs a server over roundup.cgi.client.
1919
20- $Id: roundup_server.py,v 1.50 2004-05-18 19:25:24 a1s Exp $
20+ $Id: roundup_server.py,v 1.51 2004-06-21 04:33:52 richard Exp $
2121"""
2222__docformat__ = 'restructuredtext'
2323
@@ -478,19 +478,19 @@ def run(port=PORT, success_message=None):
478478 _ ("Unable to bind to port %s, port already in use." % port )
479479 raise
480480
481- if group is not None and hasattr (os , 'getgid ' ):
481+ if group is not None and hasattr (os , 'getuid ' ):
482482 # if root, setgid to the running user
483- if not os .getgid () and user is not None :
483+ if not os .getuid () :
484484 try :
485- import pwd
485+ import grp
486486 except ImportError :
487- raise ValueError , _ ("Can't change groups - no pwd module" )
487+ raise ValueError , _ ("Can't change groups - no grp module" )
488488 try :
489- gid = pwd . getpwnam ( user )[ 3 ]
489+ gid = grp . getgrnam ( group )[ 2 ]
490490 except KeyError :
491491 raise ValueError ,_ ("Group %(group)s doesn't exist" )% locals ()
492492 os .setgid (gid )
493- elif os .getgid () and user is not None :
493+ elif os .getuid () :
494494 print _ ('WARNING: ignoring "-g" argument, not root' )
495495
496496 if hasattr (os , 'getuid' ):
You can’t perform that action at this time.
0 commit comments