mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
temporarily change umask only if required
This commit is contained in:
parent
8567ce8eed
commit
40a893a07e
1 changed files with 6 additions and 2 deletions
|
|
@ -1330,11 +1330,15 @@ slap_open_listener(
|
|||
{
|
||||
mode_t old_umask;
|
||||
|
||||
old_umask = umask( 0 );
|
||||
if ( (*sal)->sa_family == AF_LOCAL ) {
|
||||
old_umask = umask( 0 );
|
||||
}
|
||||
#endif /* LDAP_PF_LOCAL */
|
||||
rc = bind( l.sl_sd, *sal, addrlen );
|
||||
#ifdef LDAP_PF_LOCAL
|
||||
umask( old_umask );
|
||||
if ( (*sal)->sa_family == AF_LOCAL ) {
|
||||
umask( old_umask );
|
||||
}
|
||||
}
|
||||
#endif /* LDAP_PF_LOCAL */
|
||||
if ( rc ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue