mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
provisions for user-supplied permissions
This commit is contained in:
parent
f00f86bf22
commit
eb14feac7e
@ -486,6 +486,9 @@ static Listener * slap_open_listener(
|
|||||||
int err, addrlen = 0;
|
int err, addrlen = 0;
|
||||||
struct sockaddr **sal, **psal;
|
struct sockaddr **sal, **psal;
|
||||||
int socktype = SOCK_STREAM; /* default to COTS */
|
int socktype = SOCK_STREAM; /* default to COTS */
|
||||||
|
#ifdef LDAP_PF_LOCAL
|
||||||
|
mode_t perms = S_IRWXU;
|
||||||
|
#endif
|
||||||
|
|
||||||
rc = ldap_url_parse( url, &lud );
|
rc = ldap_url_parse( url, &lud );
|
||||||
|
|
||||||
@ -693,7 +696,7 @@ static Listener * slap_open_listener(
|
|||||||
#ifdef LDAP_PF_LOCAL
|
#ifdef LDAP_PF_LOCAL
|
||||||
case AF_LOCAL: {
|
case AF_LOCAL: {
|
||||||
char *addr = ((struct sockaddr_un *)*sal)->sun_path;
|
char *addr = ((struct sockaddr_un *)*sal)->sun_path;
|
||||||
if ( chmod( addr, S_IRWXU ) < 0 ) {
|
if ( chmod( addr, perms ) < 0 ) {
|
||||||
int err = sock_errno();
|
int err = sock_errno();
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
|
LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
|
||||||
|
Loading…
Reference in New Issue
Block a user