apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43499] New: - apr_global_mutex_create returns error "Access denied"
Date Thu, 27 Sep 2007 13:01:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43499>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43499

           Summary: apr_global_mutex_create returns error "Access denied"
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: forums02@38244.copi.ru


In case the global mutex used in Win32 service and in usual application,
apr_global_mutex_create returns error "Access denied".

The problem exists because function CreateMutexW is called with NULL security
attributes. NULL security attributes don't allow to use the mutex in different
user accounts.

The problem scenario is:
1. Service starts as application with the LOCAL_SYSTEM user security rights.
2. Service creates global mutex with the call 
    hMutex = CreateMutexW(NULL, FALSE, mutexkey);
3. Usual application starts with the currently logged user security rights.
4. Application tries to create global mutex with the call
    hMutex = CreateMutexW(NULL, FALSE, mutexkey);
5. The call to CreateMutexW fails. GetLastError returns error 5 "Access denied"
because the service created mutex which does not allow other users to open it.

The function apr_proc_mutex_create in module "locks\win32\proc_mutex.c" could be
modified to create SECURITY_ATTRIBUTES structure before calling CreateMutexW.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message