mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-11-27 02:22:00 +08:00
chdir before chroot
This commit is contained in:
parent
84d92d6bb3
commit
b84b838015
1
CHANGES
1
CHANGES
@ -6,6 +6,7 @@ OpenLDAP 2.0.X Engineering
|
||||
Updated -lldap SASL error reporting
|
||||
Updated -lldap TLS error reporting
|
||||
Updated slapadd error reporting
|
||||
Updated slapd chroot handling (ITS#810)
|
||||
Added slapd numericString indexing
|
||||
Build Environment
|
||||
Fixed make comment bug (ITS#811)
|
||||
|
@ -301,11 +301,18 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
#if defined(HAVE_CHROOT)
|
||||
if ( sandbox && chroot( sandbox ) ) {
|
||||
if ( sandbox ) {
|
||||
if ( chdir( sandbox ) ) {
|
||||
perror("chdir");
|
||||
rc = 1;
|
||||
goto stop;
|
||||
}
|
||||
if ( chroot( sandbox ) ) {
|
||||
perror("chroot");
|
||||
rc = 1;
|
||||
goto stop;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
|
||||
|
Loading…
Reference in New Issue
Block a user