mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Add -e authzid argument processing
This commit is contained in:
parent
8754c8f2a3
commit
e918c3b5a7
@ -197,7 +197,27 @@ main( int argc, char **argv )
|
||||
*cvalue++ = '\0';
|
||||
}
|
||||
|
||||
if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert( authzid == NULL );
|
||||
authzid = control;
|
||||
break;
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
|
@ -261,7 +261,27 @@ main( int argc, char **argv )
|
||||
*cvalue++ = '\0';
|
||||
}
|
||||
|
||||
if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert( authzid == NULL );
|
||||
authzid = control;
|
||||
break;
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
|
@ -217,7 +217,27 @@ main(int argc, char **argv)
|
||||
*cvalue++ = '\0';
|
||||
}
|
||||
|
||||
if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert( authzid == NULL );
|
||||
authzid = control;
|
||||
break;
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
|
@ -217,7 +217,27 @@ main( int argc, char *argv[] )
|
||||
*cvalue++ = '\0';
|
||||
}
|
||||
|
||||
if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert( authzid == NULL );
|
||||
authzid = control;
|
||||
break;
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
|
@ -454,7 +454,27 @@ main( int argc, char **argv )
|
||||
*cvalue++ = '\0';
|
||||
}
|
||||
|
||||
if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert( authzid == NULL );
|
||||
authzid = control;
|
||||
break;
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
|
@ -173,7 +173,27 @@ main( int argc, char *argv[] )
|
||||
*cvalue++ = '\0';
|
||||
}
|
||||
|
||||
if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if ( strcasecmp( control, "authzid" ) == 0 ) {
|
||||
if( authzid != NULL ) {
|
||||
fprintf( stderr, "authzid control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( cvalue == NULL ) {
|
||||
fprintf( stderr, "authzid: control value expected" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if( !crit ) {
|
||||
fprintf( stderr, "authzid: must be marked critical" );
|
||||
usage(prog);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert( authzid == NULL );
|
||||
authzid = control;
|
||||
break;
|
||||
|
||||
} else if ( strcasecmp( control, "manageDSAit" ) == 0 ) {
|
||||
if( manageDSAit ) {
|
||||
fprintf( stderr, "manageDSAit control previously specified");
|
||||
return EXIT_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user