From: Pierangelo Masarati Date: Mon, 28 Jan 2002 17:57:53 +0000 (+0000) Subject: provisions for user-supplied permissions X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eb14feac7e32d97d8a1598906c3d42ad9fe69254;p=openldap provisions for user-supplied permissions --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index f99a34279e..098f7bc87f 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -486,6 +486,9 @@ static Listener * slap_open_listener( int err, addrlen = 0; struct sockaddr **sal, **psal; int socktype = SOCK_STREAM; /* default to COTS */ +#ifdef LDAP_PF_LOCAL + mode_t perms = S_IRWXU; +#endif rc = ldap_url_parse( url, &lud ); @@ -693,7 +696,7 @@ static Listener * slap_open_listener( #ifdef LDAP_PF_LOCAL case AF_LOCAL: { char *addr = ((struct sockaddr_un *)*sal)->sun_path; - if ( chmod( addr, S_IRWXU ) < 0 ) { + if ( chmod( addr, perms ) < 0 ) { int err = sock_errno(); #ifdef NEW_LOGGING LDAP_LOG(( "connection", LDAP_LEVEL_INFO,