summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/win32/os.h3
-rw-r--r--os/win32/util_win32.c45
-rw-r--r--server/mpm/winnt/mpm_winnt.c8
3 files changed, 2 insertions, 54 deletions
diff --git a/os/win32/os.h b/os/win32/os.h
index 178c05dc06..303e72aaf0 100644
--- a/os/win32/os.h
+++ b/os/win32/os.h
@@ -94,9 +94,6 @@ typedef enum {
FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char* fnName, int ordinal);
-PSECURITY_ATTRIBUTES GetNullACL(void);
-void CleanNullACL(void *sa);
-
#define AP_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
typedef rettype (calltype *ap_winapi_fpt_##fn) args; \
static ap_winapi_fpt_##fn ap_winapi_pfn_##fn = NULL; \
diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c
index 86bd419f9f..728e4b5bd1 100644
--- a/os/win32/util_win32.c
+++ b/os/win32/util_win32.c
@@ -101,48 +101,3 @@ FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char* fnName, int ordinal)
else
return GetProcAddress(lateDllHandle[fnLib], fnName);
}
-
-
-/* To share the semaphores with other processes, we need a NULL ACL
- * Code from MS KB Q106387
- */
-PSECURITY_ATTRIBUTES GetNullACL(void)
-{
- PSECURITY_DESCRIPTOR pSD;
- PSECURITY_ATTRIBUTES sa;
-
- sa = (PSECURITY_ATTRIBUTES) LocalAlloc(LPTR, sizeof(SECURITY_ATTRIBUTES));
- sa->nLength = sizeof(SECURITY_ATTRIBUTES);
-
- pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
- sa->lpSecurityDescriptor = pSD;
-
- if (pSD == NULL || sa == NULL) {
- return NULL;
- }
- apr_set_os_error(0);
- if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)
- || apr_get_os_error()) {
- LocalFree( pSD );
- LocalFree( sa );
- return NULL;
- }
- if (!SetSecurityDescriptorDacl(pSD, TRUE, (PACL) NULL, FALSE)
- || apr_get_os_error()) {
- LocalFree( pSD );
- LocalFree( sa );
- return NULL;
- }
-
- sa->bInheritHandle = FALSE;
- return sa;
-}
-
-
-void CleanNullACL(void *sa)
-{
- if (sa) {
- LocalFree(((PSECURITY_ATTRIBUTES)sa)->lpSecurityDescriptor);
- LocalFree(sa);
- }
-}
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
index 97086589fc..cbc090fb66 100644
--- a/server/mpm/winnt/mpm_winnt.c
+++ b/server/mpm/winnt/mpm_winnt.c
@@ -1574,7 +1574,6 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
/* This code should be run once in the parent and not run
* across a restart
*/
- PSECURITY_ATTRIBUTES sa = GetNullACL(); /* returns NULL if invalid (Win95?) */
setup_signal_names(apr_psprintf(pconf, "ap%lu", parent_pid));
ap_log_pid(pconf, ap_pid_fname);
@@ -1582,26 +1581,23 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
/* Create shutdown event, apPID_shutdown, where PID is the parent
* Apache process ID. Shutdown is signaled by 'apache -k shutdown'.
*/
- shutdown_event = CreateEvent(sa, FALSE, FALSE, signal_shutdown_name);
+ shutdown_event = CreateEvent(NULL, FALSE, FALSE, signal_shutdown_name);
if (!shutdown_event) {
ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00448)
"Parent: Cannot create shutdown event %s", signal_shutdown_name);
- CleanNullACL((void *)sa);
return HTTP_INTERNAL_SERVER_ERROR;
}
/* Create restart event, apPID_restart, where PID is the parent
* Apache process ID. Restart is signaled by 'apache -k restart'.
*/
- restart_event = CreateEvent(sa, FALSE, FALSE, signal_restart_name);
+ restart_event = CreateEvent(NULL, FALSE, FALSE, signal_restart_name);
if (!restart_event) {
CloseHandle(shutdown_event);
ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00449)
"Parent: Cannot create restart event %s", signal_restart_name);
- CleanNullACL((void *)sa);
return HTTP_INTERNAL_SERVER_ERROR;
}
- CleanNullACL((void *)sa);
/* Create the start mutex, as an unnamed object for security.
* The start mutex is used during a restart to prevent more than