From: Pierangelo Masarati Date: Sun, 15 Oct 2006 18:28:22 +0000 (+0000) Subject: temporarily change umask only if required X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~47 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=40a893a07eb711b41cf3c07a78b892a0b6504c93;p=openldap temporarily change umask only if required --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 4bc9e94a4d..1cbfd5012f 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -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 ) {