httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject mod_userdir segfault (segfault type #3)
Date Wed, 21 Feb 2001 01:48:48 GMT

httpd.core.6 is a segfault in mod_userdir:

-------------------------------------
(gdb) frame 0
#0  get_suexec_id_doer (r=0x81df03c) at mod_userdir.c:383
383         ugid->uid = pw->pw_uid;
-------------------------------------

I don't see how this function is NOT supposed to segfault, seeing as pw is
*always* NULL:

-------------------------------------
#ifdef HAVE_UNIX_SUEXEC
static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
{
    const char *username = apr_table_get(r->notes, "mod_userdir_user");
    struct passwd *pw = NULL;
    ap_unix_identity_t *ugid = NULL;

    if (username == NULL) {
        return NULL;
    }

    if ((ugid = apr_palloc(r->pool, sizeof(ap_unix_identity_t *))) == NULL) {
        return NULL;
    }

    ugid->uid = pw->pw_uid;
    ugid->gid = pw->pw_gid;

    return ugid;
}
#endif /* HAVE_UNIX_SUEXEC */
-------------------------------------

This problem seems to have been around ever since Manoj first checked in this
function.  Manoj?

--Cliff



---------------------------------------------------
    Cliff Woolley
    cliffwoolley@yahoo.com
    804-244-8615
    Charlottesville, VA


Mime
View raw message