From f43f7b1bfbff588dfe1a37b13928730788569b01 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 4 Apr 2005 10:42:50 +0000 Subject: [PATCH] cleanup listener permissions --- servers/slapd/backend.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"; -- 2.39.5