From: Pierangelo Masarati Date: Fri, 13 May 2005 20:27:12 +0000 (+0000) Subject: improve fix X-Git-Tag: OPENLDAP_AC_BP~637 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d508114a9ee8dd2763850ed2d250cfde24a98ba0;p=openldap improve fix --- diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index acae00f25f..c3f862740a 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1181,6 +1181,9 @@ typedef enum slap_access_e { ACL_WRITE, ACL_MANAGE, + /* always leave at end of levels but not greater than ACL_LEVEL_MASK */ + ACL_LAST, + /* ACL level mask and modifiers */ ACL_LEVEL_MASK = 0x000f, ACL_QUALIFIER1 = 0x0100, @@ -1299,7 +1302,7 @@ typedef struct slap_access { #define ACL_PRIV_MANAGE ACL_ACCESS2PRIV( ACL_MANAGE ) /* NOTE: always use the highest level; current: 0x00ffUL */ -#define ACL_PRIV_MASK (ACL_PRIV_MANAGE | ACL_QUALIFIER_MASK) +#define ACL_PRIV_MASK ((ACL_ACCESS2PRIV(ACL_LAST) - 1) | ACL_QUALIFIER_MASK) /* priv flags */ #define ACL_PRIV_LEVEL 0x1000UL