Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
5b92324e
Commit
5b92324e
authored
Dec 20, 2005
by
Kurt Zeilenga
Browse files
Update to 1.230 (less HEAD specific changes)
parent
d4579b06
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
5b92324e
...
...
@@ -4,11 +4,14 @@ OpenLDAP 2.3.14 Engineering
Fixed slapd assertion control restrictions
Fixed slapd ACL exact attrval clause needs normalization (ITS#4255)
Fixed slapd sc_prev update after free bug (ITS#4237)
Fixed slapd issues (ITS#4243,4251)
Fixed slapd-bdb/hdb mode argument parsing (ITS#4257)
Fixed slapd-bdb/hdb cn=config reindexing (ITS#4260)
Fixed slapd-bdb/hdb cn=config olcDbIndex modify/replace (ITS#4262)
Fixed slapd-bdb/hdb lockup issue (ITS#4184)
Fixed slapo-rwm static DN free bug (ITS#4248)
Build environment
Updated test033-glue-syncrepl (ITS#4264)
OpenLDAP 2.3.13 Release
Fixed libldap/liblutil MSG_ACCRIGHTSLEN bug (ITS#4206)
...
...
servers/slapd/main.c
View file @
5b92324e
...
...
@@ -247,23 +247,25 @@ int main( int argc, char **argv )
char
*
sandbox
=
NULL
;
#endif
#ifdef LOG_LOCAL4
int
syslogUser
=
DEFAULT_SYSLOG_USER
;
int
syslogUser
=
DEFAULT_SYSLOG_USER
;
#endif
int
g_argc
=
argc
;
char
**
g_argv
=
argv
;
char
*
configfile
=
NULL
;
char
*
configdir
=
NULL
;
char
*
serverName
;
int
serverMode
=
SLAP_SERVER_MODE
;
char
*
configfile
=
NULL
;
char
*
configdir
=
NULL
;
char
*
serverName
;
int
serverMode
=
SLAP_SERVER_MODE
;
struct
sync_cookie
*
scp
=
NULL
;
struct
sync_cookie
*
scp_entry
=
NULL
;
char
*
serverNamePrefix
=
""
;
char
*
serverNamePrefix
=
""
;
size_t
l
;
int
slapd_pid_file_unlink
=
0
,
slapd_args_file_unlink
=
0
;
#ifdef CSRIMALLOC
FILE
*
leakfile
;
if
(
(
leakfile
=
fopen
(
"slapd.leak"
,
"w"
))
==
NULL
)
{
...
...
@@ -389,24 +391,40 @@ int main( int argc, char **argv )
LDAP_STAILQ_INSERT_TAIL
(
&
slap_sync_cookie
,
scp
,
sc_next
);
break
;
case
'd'
:
/* set debug level and 'do not detach' flag */
case
'd'
:
{
/* set debug level and 'do not detach' flag */
int
level
=
0
;
no_detach
=
1
;
#ifdef LDAP_DEBUG
if
(
optarg
!=
NULL
&&
optarg
[
0
]
!=
'-'
&&
!
isdigit
(
optarg
[
0
]
)
)
{
int
level
;
int
i
,
goterr
=
0
;
char
**
levels
;
if
(
str2loglevel
(
optarg
,
&
level
)
)
{
fprintf
(
stderr
,
"unrecognized log level "
"
\"
%s
\"\n
"
,
optarg
);
levels
=
ldap_str2charray
(
optarg
,
","
);
for
(
i
=
0
;
levels
[
i
]
!=
NULL
;
i
++
)
{
level
=
0
;
if
(
str2loglevel
(
levels
[
i
],
&
level
)
)
{
fprintf
(
stderr
,
"unrecognized log level "
"
\"
%s
\"\n
"
,
levels
[
i
]
);
goterr
=
1
;
/* but keep parsing... */
}
else
{
slap_debug
|=
level
;
}
}
ldap_charray_free
(
levels
);
if
(
goterr
)
{
goto
destroy
;
}
slap_debug
|=
level
;
}
else
{
int
level
;
if
(
lutil_atoix
(
&
level
,
optarg
,
0
)
!=
0
)
{
fprintf
(
stderr
,
"unrecognized log level "
...
...
@@ -420,7 +438,7 @@ int main( int argc, char **argv )
fputs
(
"must compile with LDAP_DEBUG for debugging
\n
"
,
stderr
);
#endif
break
;
}
break
;
case
'f'
:
/* read config file */
configfile
=
ch_strdup
(
optarg
);
...
...
@@ -716,20 +734,6 @@ unhandled_option:;
mal_leaktrace
(
1
);
#endif
/*
* FIXME: moved here from slapd_daemon_task()
* because back-monitor db_open() needs it
*/
time
(
&
starttime
);
if
(
slap_startup
(
NULL
)
!=
0
)
{
rc
=
1
;
SERVICE_EXIT
(
ERROR_SERVICE_SPECIFIC_ERROR
,
21
);
goto
shutdown
;
}
Debug
(
LDAP_DEBUG_ANY
,
"slapd starting
\n
"
,
0
,
0
,
0
);
if
(
slapd_pid_file
!=
NULL
)
{
FILE
*
fp
=
fopen
(
slapd_pid_file
,
"w"
);
...
...
@@ -745,11 +749,11 @@ unhandled_option:;
slapd_pid_file
=
NULL
;
rc
=
1
;
goto
shutdown
;
goto
destroy
;
}
fprintf
(
fp
,
"%d
\n
"
,
(
int
)
getpid
()
);
fclose
(
fp
);
slapd_pid_file_unlink
=
1
;
}
if
(
slapd_args_file
!=
NULL
)
{
...
...
@@ -767,7 +771,7 @@ unhandled_option:;
slapd_args_file
=
NULL
;
rc
=
1
;
goto
shutdown
;
goto
destroy
;
}
for
(
i
=
0
;
i
<
g_argc
;
i
++
)
{
...
...
@@ -775,8 +779,23 @@ unhandled_option:;
}
fprintf
(
fp
,
"
\n
"
);
fclose
(
fp
);
slapd_args_file_unlink
=
1
;
}
/*
* FIXME: moved here from slapd_daemon_task()
* because back-monitor db_open() needs it
*/
time
(
&
starttime
);
if
(
slap_startup
(
NULL
)
!=
0
)
{
rc
=
1
;
SERVICE_EXIT
(
ERROR_SERVICE_SPECIFIC_ERROR
,
21
);
goto
shutdown
;
}
Debug
(
LDAP_DEBUG_ANY
,
"slapd starting
\n
"
,
0
,
0
,
0
);
#ifdef HAVE_NT_EVENT_LOG
if
(
is_NT_Service
)
lutil_LogStartedEvent
(
serverName
,
slap_debug
,
configfile
?
...
...
@@ -841,10 +860,10 @@ stop:
ldap_pvt_tls_destroy
();
#endif
if
(
slapd_pid_file
!=
NULL
)
{
if
(
slapd_pid_file
_unlink
)
{
unlink
(
slapd_pid_file
);
}
if
(
slapd_args_file
!=
NULL
)
{
if
(
slapd_args_file
_unlink
)
{
unlink
(
slapd_args_file
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment