Add -e authzid argument processing

This commit is contained in:
Kurt Zeilenga 2002-11-28 05:56:19 +00:00
parent 8754c8f2a3
commit e918c3b5a7
6 changed files with 126 additions and 6 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;