[Zope] Re: nonroot user running zope on 80

John Hunter jdhunter at ace.bsd.uchicago.edu
Wed Sep 22 14:06:19 EDT 2004


>>>>> "John" == John Hunter <jdhunter at ace.bsd.uchicago.edu> writes:

    John> I'm hoping that this give some zope guru-possibly-named-tim
    John> an idea of what is going wrong.  Here is my /etc/group and
    John> /etc/passwd info for the effective user

I did some old fashioned debugging, inserting print statements into
/usr/local/Zope-2.7.2/lib/python/Zope/Startup/__init__.py
to find out which call was generating the segfault.  It's occurring on
the line

        initgroups.initgroups(effective_user, gid)

in the def dropPrivileges(cfg) function.

I took a look at the src 
/var/tmp/build/Zope-2.7.2-0/lib/Components/initgroups/initgroups.c
and added a print statement to initgroups_initgroups

static PyObject *
initgroups_initgroups(PyObject *self, PyObject *args)
{
        printf("hi mom");
        char *username;
        gid_t gid;

recompiled and the segfault went away.  Removed the printf statement,
recompiled, and the segfault returned.  I was able to repeat this
several times with the same result each time: without the irrelevant
printf, I segfaulted, with it, I didn't.

Does this typically indicate a pointer/memory bug?  Is there any
reason to believe the cflags CFLAGS='-D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64' OPT="-g -O2"  would cause any trouble?


JDH


More information about the Zope mailing list