mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
don't allow "none" as access level
This commit is contained in:
parent
7b10f413d9
commit
d79fd46f33
@ -313,12 +313,26 @@ slapacl( int argc, char **argv )
|
||||
|
||||
accessstr = strchr( attr, '/' );
|
||||
if ( accessstr != NULL ) {
|
||||
int invalid = 0;
|
||||
|
||||
accessstr[0] = '\0';
|
||||
accessstr++;
|
||||
access = str2access( accessstr );
|
||||
if ( access == ACL_INVALID_ACCESS ) {
|
||||
switch ( access ) {
|
||||
case ACL_INVALID_ACCESS:
|
||||
fprintf( stderr, "unknown access \"%s\" for attribute \"%s\"\n",
|
||||
accessstr, attr );
|
||||
invalid = 1;
|
||||
break;
|
||||
|
||||
case ACL_NONE:
|
||||
fprintf( stderr, "\"none\" not allowed for attribute \"%s\"\n",
|
||||
attr );
|
||||
invalid = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( invalid ) {
|
||||
if ( continuemode ) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user