]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapcommon.c
declare oc_bvfind_undef()
[openldap] / servers / slapd / slapcommon.c
index 6da5f8091508a705413c4b303c45cd819cc349ff..fbae61c2abbdd0267db5dc5839e08a31dcfaffef 100644 (file)
@@ -72,12 +72,12 @@ usage( int tool, const char *progname )
                break;
 
        case SLAPAUTH:
-               options = "\t[-U authcID] [-X authzID] ID [...]\n";
+               options = "\t[-U authcID] [-X authzID] [-R realm] [-M mech] ID [...]\n";
                break;
 
        case SLAPACL:
                options = "\t[-U authcID | -D authcDN]"
-                       " -b DN attr[/level][:value] [...]\n";
+                       " -b DN [attr[/access][:value]] [...]\n";
                break;
        }
 
@@ -138,7 +138,7 @@ slap_tool_init(
                break;
 
        case SLAPAUTH:
-               options = "d:f:U:vX:";
+               options = "d:f:M:R:U:vX:";
                mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
                break;
 
@@ -217,6 +217,10 @@ slap_tool_init(
                        retrieve_ctxcsn = 1;
                        break;
 
+               case 'M':
+                       ber_str2bv( optarg, 0, 0, &mech );
+                       break;
+
                case 'n':       /* which config file db to index */
                        dbnum = atoi( optarg ) - 1;
                        break;
@@ -229,6 +233,10 @@ slap_tool_init(
                        replica_demotion = 1;           
                        break;
 
+               case 'R':
+                       realm = optarg;
+                       break;
+
                case 's':       /* dump subtree */
                        subtree = strdup( optarg );
                        break;
@@ -306,9 +314,6 @@ slap_tool_init(
                break;
 
        case SLAPACL:
-               if ( argc == optind ) {
-                       usage( tool, progname );
-               }
                if ( !BER_BVISNULL( &authcDN ) && !BER_BVISNULL( &authcID ) ) {
                        usage( tool, progname );
                }
@@ -391,13 +396,6 @@ slap_tool_init(
                break;
        }
 
-       rc = glue_sub_init();
-
-       if ( rc != 0 ) {
-               fprintf( stderr, "Subordinate configuration error\n" );
-               exit( EXIT_FAILURE );
-       }
-
        rc = slap_schema_check();
 
        if ( rc != 0 ) {