Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
5b5db4de
Commit
5b5db4de
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Additional mods to fix NT single threaded support.
parent
b7af076f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/ac/unistd.h
+4
-0
4 additions, 0 deletions
include/ac/unistd.h
include/ldap_pvt_thread.h
+1
-2
1 addition, 2 deletions
include/ldap_pvt_thread.h
servers/slapd/main.c
+18
-14
18 additions, 14 deletions
servers/slapd/main.c
with
23 additions
and
16 deletions
include/ac/unistd.h
+
4
−
0
View file @
5b5db4de
...
...
@@ -21,6 +21,10 @@
# include <unistd.h>
#endif
#if HAVE_PROCESS_H
# include <process.h>
#endif
/* note: callers of crypt(3) should include <ac/crypt.h> */
#ifdef __MINGW32__
...
...
This diff is collapsed.
Click to expand it.
include/ldap_pvt_thread.h
+
1
−
2
View file @
5b5db4de
...
...
@@ -137,8 +137,7 @@ typedef struct ldap_pvt_thread_lwp_cv ldap_pvt_thread_cond_t;
LDAP_END_DECL
/* If we're in the NT env at all, we want these defs, threaded or not (which should be fixed) */
#elif defined(WINNT) || defined(_WINNT) || defined(_WIN32) || defined(HAVE_NT_THREADS)
#elif defined(HAVE_NT_THREADS)
LDAP_BEGIN_DECL
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/main.c
+
18
−
14
View file @
5b5db4de
...
...
@@ -38,18 +38,19 @@ void CommenceStartupProcessing( LPCTSTR serviceName,
void
ReportSlapdShutdownComplete
(
void
);
void
*
getRegParam
(
char
*
svc
,
char
*
value
);
#define SERVICE_EXIT( e, n ) \
if ( is_NT_Service ) \
{ \
SLAPDServiceStatus.dwWin32ExitCode = e; \
SLAPDServiceStatus.dwServiceSpecificExitCode = n; \
}
#define SERVICE_EXIT( e, n ) do { \
if ( is_NT_Service ) { \
SLAPDServiceStatus.dwWin32ExitCode = (e); \
SLAPDServiceStatus.dwServiceSpecificExitCode = (n); \
} \
} while ( 0 )
#else
#define SERVICE_EXIT( e, n )
#define MAIN_RETURN(x) return(x)
#endif
#ifdef HAVE_NT_EVENT_
MANAGER
#ifdef HAVE_NT_EVENT_
LOG
void
LogSlapdStartedEvent
(
char
*
svc
,
int
slap_debug
,
char
*
configfile
,
char
*
urls
);
void
LogSlapdStoppedEvent
(
char
*
svc
);
#endif
...
...
@@ -111,7 +112,7 @@ usage( char *name )
#ifdef LOG_LOCAL4
"
\t
-l sysloguser
\t
Syslog User (default: LOCAL4)
\n
"
#endif
#ifdef HAVE_
WINSOCK
#ifdef HAVE_
NT_EVENT_LOG
"
\t
-n NTserviceName
\t
NT service name
\n
"
#endif
...
...
@@ -145,8 +146,11 @@ int main( int argc, char **argv )
#ifdef LOG_LOCAL4
int
syslogUser
=
DEFAULT_SYSLOG_USER
;
#endif
#ifdef HAVE_WINSOCK
#ifdef HAVE_NT_EVENT_LOG
char
*
NTservice
=
SERVICE_NAME
;
#endif
#ifdef HAVE_NT_SERVICE_MANAGER
char
*
configfile
=
".
\\
slapd.conf"
;
#else
char
*
configfile
=
SLAPD_DEFAULT_CONFIGFILE
;
...
...
@@ -223,7 +227,7 @@ int main( int argc, char **argv )
#ifdef LDAP_CONNECTIONLESS
"c"
#endif
#ifdef HAVE_
WINSOCK
#ifdef HAVE_
NT_EVENT_LOG
"n:"
#endif
#ifdef HAVE_TLS
...
...
@@ -312,7 +316,7 @@ int main( int argc, char **argv )
break
;
#endif
/* SETUID && GETUID */
#ifdef HAVE_
WINSOCK
#ifdef HAVE_
NT_EVENT_LOG
case
'n'
:
/* NT service name */
NTservice
=
ch_strdup
(
optarg
);
break
;
...
...
@@ -392,7 +396,7 @@ int main( int argc, char **argv )
#endif
#ifndef HAVE_WINSOCK
lutil_detach
(
no_detach
,
0
);
lutil_detach
(
no_detach
,
0
);
#endif
/* HAVE_WINSOCK */
#ifdef CSRIMALLOC
...
...
@@ -428,7 +432,7 @@ int main( int argc, char **argv )
}
}
#ifdef HAVE_NT_EVENT_
MANAGER
#ifdef HAVE_NT_EVENT_
LOG
LogSlapdStartedEvent
(
NTservice
,
slap_debug
,
configfile
,
urls
);
#endif
...
...
@@ -449,7 +453,7 @@ destroy:
rc
|=
slap_destroy
();
stop:
#ifdef HAVE_NT_EVENT_
MANAGER
#ifdef HAVE_NT_EVENT_
LOG
LogSlapdStoppedEvent
(
NTservice
);
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment