From 40a893a07eb711b41cf3c07a78b892a0b6504c93 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 15 Oct 2006 18:28:22 +0000 Subject: [PATCH] temporarily change umask only if required --- servers/slapd/daemon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ) { -- 2.39.5