From d86a46cc33b9d2b44420eda9c85c353ebf9a329f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 15 Dec 2005 17:46:37 +0000 Subject: [PATCH] shortcut to allow restricting all operations --- servers/slapd/bconfig.c | 3 ++- servers/slapd/slap.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index f127993d35..a080eb992b 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -1947,7 +1947,7 @@ config_restrict(ConfigArgs *c) { { BER_BVC("modrdn"), 0 }, { BER_BVC("delete"), SLAP_RESTRICT_OP_DELETE }, { BER_BVC("search"), SLAP_RESTRICT_OP_SEARCH }, - { BER_BVC("compare"), SLAP_RESTRICT_OP_COMPARE }, + { BER_BVC("compare"), SLAP_RESTRICT_OP_COMPARE }, { BER_BVC("read"), SLAP_RESTRICT_OP_READS }, { BER_BVC("write"), SLAP_RESTRICT_OP_WRITES }, { BER_BVC("extended"), SLAP_RESTRICT_OP_EXTENDED }, @@ -1955,6 +1955,7 @@ config_restrict(ConfigArgs *c) { { BER_BVC("extended=" LDAP_EXOP_MODIFY_PASSWD ), SLAP_RESTRICT_EXOP_MODIFY_PASSWD }, { BER_BVC("extended=" LDAP_EXOP_X_WHO_AM_I ), SLAP_RESTRICT_EXOP_WHOAMI }, { BER_BVC("extended=" LDAP_EXOP_X_CANCEL ), SLAP_RESTRICT_EXOP_CANCEL }, + { BER_BVC("all"), SLAP_RESTRICT_OP_ALL }, { BER_BVNULL, 0 } }; diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 1e310b067f..febec4f4d9 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1782,6 +1782,10 @@ struct slap_backend_db { | SLAP_RESTRICT_OP_DELETE \ | SLAP_RESTRICT_OP_MODIFY \ | SLAP_RESTRICT_OP_RENAME ) +#define SLAP_RESTRICT_OP_ALL \ + ( SLAP_RESTRICT_OP_READS \ + | SLAP_RESTRICT_OP_WRITES \ + | SLAP_RESTRICT_OP_EXTENDED ) #define SLAP_ALLOW_BIND_V2 0x0001U /* LDAPv2 bind */ #define SLAP_ALLOW_BIND_ANON_CRED 0x0002U /* cred should be empty */ -- 2.39.5