Package: python2.3-twisted
Version: 1.3.0-8
Severity: important
I tried to run a twisted core and got the following error:
inferno /tmp/master> twistd --no_save -n -l - -f buildbot.tap
2005/02/21 18:01 CET [-] Log opened.
2005/02/21 18:01 CET [-] twistd 1.3.0rc1 (/usr/bin/python2.3 2.3.5) starting up
2005/02/21 18:01 CET [-] reactor class: twisted.internet.default.SelectReactor
2005/02/21 18:01 CET [-] Loading buildbot.tap...
2005/02/21 18:01 CET [-] Loaded.
2005/02/21 18:01 CET [-] Traceback (most recent call last):
2005/02/21 18:01 CET [-] File "/usr/bin/twistd", line 36, in ?
2005/02/21 18:01 CET [-] run()
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py", line 18
4, in run
2005/02/21 18:01 CET [-] app.run(runApp, ServerOptions)
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/application/app.py", line 2
10, in run
2005/02/21 18:01 CET [-] runApp(config)
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py", line 17
5, in runApp
2005/02/21 18:01 CET [-] startApplication(config, application)
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py", line 16
0, in startApplication
2005/02/21 18:01 CET [-] shedPrivileges(config['euid'], process.uid,
process.gid)
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py", line 13
4, in shedPrivileges
2005/02/21 18:01 CET [-] switchUID(uid, gid, euid)
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/python/util.py", line 606,
in switchUID
2005/02/21 18:01 CET [-] initgroups(uid, gid)
2005/02/21 18:01 CET [-] File
"/usr/lib/python2.3/site-packages/twisted/python/util.py", line 584,
in initgroups
2005/02/21 18:01 CET [-] setgroups(l)
2005/02/21 18:01 CET [-] OSError: [Errno 1] Operation not permitted
Exitcode 1
inferno /tmp/master>
The thing that triggers this bug is that I'm in a pseudo-group:
inferno home/thimo> id
uid=1000(thimo) gid=110(gruppe)
Gruppen=24(cdrom),25(floppy),29(audio),44(video),103(cvs),104(dune),105(web),110(gruppe),2197847826
This pseudo-group is called a "process authentication group" (PAG) in
AFS-terms and is used to tell the kernel which authentication token to
use for this process. Unfortunately, twisted checks if the user
starting the process is in a non-existing group (Why?).
In
/usr/lib/python2.3/site-packages/twisted/python/util.py
there is:
try:
import pwd, grp
from os import setgroups, getgroups
def initgroups(uid, primaryGid):
username = pwd.getpwuid(uid)[0]
l=[primaryGid]
for groupname, password, gid, userlist in grp.getgrall():
if username in userlist:
l.append(gid)
try:
setgroups(l)
except OSError, e:
if e.errno == errno.EPERM:
groups = getgroups()
for g in getgroups():
if g not in l:
raise
else:
raise
Replacing the exception handling by
try:
setgroups(l)
except OSError, e:
if e.errno == errno.EPERM:
pass
else:
raise
fixes the problem...
Cheers
Thimo
-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.10inferno
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages python2.3-twisted depends on:
ii python2.3 2.3.5-1 An interactive high-level object-o
ii python2.3-twisted-bin 1.3.0-8 Event-based framework for internet
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]