Title: Bug in semaphore permission

Hi folks,

   I've been a probleme with Apache 2.0.36 + mod_ssl 2.8.8, and I think this can be a bug.

   In proc_mutex.c line 219, function proc_mutex_sysv_create:

      new_mutex->interproc->filedes = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);

   This code is executed as root, during the module init stage, but the semaphore will be used as a common user (nobody), and there is no change of its ownership.

   I'm trying to fix this, but I don't know how to get the config user id in the module to call semctl:

    if (!geteuid()) {
        buf.sem_perm.uid = unixd_config.user_id;
        buf.sem_perm.gid = unixd_config.group_id;
        buf.sem_perm.mode = 0600;
        ick.buf = &buf;
        if (semctl(new_mutex->interproc->filedes, 0, IPC_SET, ick) < 0) {
                        rv = errno;
                        proc_mutex_sysv_cleanup(new_mutex);
                        return rv;
        }
    }

    Does anyone have a clue?

[]s

_________________________________________
Eider Oliveira
ICQ#:116119057

Engenharia de Sistemas - Uol Inc
[EMAIL PROTECTED]
_________________________________________

Reply via email to