From: Pierangelo Masarati Date: Mon, 4 Apr 2005 10:42:50 +0000 (+0000) Subject: cleanup listener permissions X-Git-Tag: OPENLDAP_AC_BP~1000 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f43f7b1bfbff588dfe1a37b13928730788569b01;p=openldap cleanup listener permissions --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 9e3e8f8ce0..e69513647c 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1082,7 +1082,10 @@ backend_check_restrictions( } #ifdef SLAP_X_LISTENER_MOD - if ( op->o_conn->c_listener && ! ( op->o_conn->c_listener->sl_perms & ( !BER_BVISEMPTY( &op->o_ndn ) ? S_IWUSR : S_IWOTH ) ) ) { + if ( op->o_conn->c_listener && + ! ( op->o_conn->c_listener->sl_perms & ( !BER_BVISEMPTY( &op->o_ndn ) + ? (S_IWUSR|S_IWOTH) : S_IWOTH ) ) ) + { /* no "w" mode means readonly */ rs->sr_text = "modifications not allowed on this listener"; rs->sr_err = LDAP_UNWILLING_TO_PERFORM; @@ -1161,7 +1164,8 @@ backend_check_restrictions( if ( !starttls && !updateop ) { if ( op->o_conn->c_listener && !( op->o_conn->c_listener->sl_perms & - ( !BER_BVISEMPTY( &op->o_dn ) ? S_IRUSR : S_IROTH ))) + ( !BER_BVISEMPTY( &op->o_dn ) + ? (S_IRUSR|S_IROTH) : S_IROTH ))) { /* no "r" mode means no read */ rs->sr_text = "read not allowed on this listener";