Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
e8c292df
Commit
e8c292df
authored
May 26, 2000
by
Kurt Zeilenga
Browse files
Add -n serviceName (for loggging purposes)
parent
1bc5314d
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/man/man8/slapd.8
View file @
e8c292df
...
...
@@ -9,7 +9,7 @@ slapd \- Stand-alone LDAP Daemon
.B [\-f slapd\-config\-file]
.B [\-h URLs]
.B [\-d debug\-level]
.B [\-s syslog\-level] [\-l syslog\-local\-user]
.B
[\-n service\-name]
[\-s syslog\-level] [\-l syslog\-local\-user]
.B [\-u user] [\-g group]
.B
.SH DESCRIPTION
...
...
@@ -73,6 +73,10 @@ at what level debugging statements should be logged to the
.BR syslog (8)
facility.
.TP
.BI \-n " service\-name"
Specifies the service name for logging and other purposes. Defaults
to basename of argv[0], i.e.: "slapd".
.TP
.BI \-l " syslog\-local\-user"
Selects the local user of the
.BR syslog (8)
...
...
servers/slapd/main.c
View file @
e8c292df
...
...
@@ -112,10 +112,7 @@ usage( char *name )
#ifdef LOG_LOCAL4
"
\t
-l sysloguser
\t
Syslog User (default: LOCAL4)
\n
"
#endif
#ifdef HAVE_NT_EVENT_LOG
"
\t
-n NTserviceName
\t
NT service name
\n
"
#endif
"
\t
-n serviceName
\t
service name
\n
"
"
\t
-s level
\t
Syslog Level
\n
"
#ifdef SLAPD_BDB2
"
\t
-t
\t\t
Enable BDB2 timing
\n
"
...
...
@@ -146,15 +143,12 @@ int main( int argc, char **argv )
int
syslogUser
=
DEFAULT_SYSLOG_USER
;
#endif
#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
;
#endif
char
*
serverName
;
char
*
serverName
=
NULL
;
int
serverMode
=
SLAP_SERVER_MODE
;
#ifdef CSRIMALLOC
...
...
@@ -209,7 +203,7 @@ int main( int argc, char **argv )
#endif
while
(
(
i
=
getopt
(
argc
,
argv
,
"d:f:h:s:"
"d:f:h:s:
n:
"
#ifdef HAVE_CHROOT
"r:"
#endif
...
...
@@ -224,9 +218,6 @@ int main( int argc, char **argv )
#endif
#ifdef LDAP_CONNECTIONLESS
"c"
#endif
#ifdef HAVE_NT_EVENT_LOG
"n:"
#endif
))
!=
EOF
)
{
switch
(
i
)
{
...
...
@@ -294,11 +285,11 @@ int main( int argc, char **argv )
break
;
#endif
/* SETUID && GETUID */
#ifdef HAVE_NT_EVENT_LOG
case
'n'
:
/* NT service name */
NTservice
=
ch_strdup
(
optarg
);
if
(
serverName
!=
NULL
)
free
(
serverName
);
serverName
=
ch_strdup
(
optarg
);
break
;
#endif
default:
usage
(
argv
[
0
]
);
rc
=
1
;
...
...
@@ -313,10 +304,12 @@ int main( int argc, char **argv )
Debug
(
LDAP_DEBUG_TRACE
,
"%s"
,
Versionstr
,
0
,
0
);
if
(
(
serverName
=
strrchr
(
argv
[
0
],
*
LDAP_DIRSEP
))
==
NULL
)
{
serverName
=
ch_strdup
(
argv
[
0
]
);
}
else
{
serverName
=
ch_strdup
(
serverName
+
1
);
if
(
serverName
==
NULL
)
{
if
(
(
serverName
=
strrchr
(
argv
[
0
],
*
LDAP_DIRSEP
))
==
NULL
)
{
serverName
=
ch_strdup
(
argv
[
0
]
);
}
else
{
serverName
=
ch_strdup
(
serverName
+
1
);
}
}
#ifdef LOG_LOCAL4
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment