From: Thomas Daniels Date: Mon, 19 Sep 2022 22:30:05 +0000 (+0200) Subject: ITS#9917 Remove 'h' and 'p' from options[] in client tools X-Git-Tag: OPENLDAP_REL_ENG_2_6_4~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8f7fd00043e2c63b6216aeb3ba69b0d0485311b;p=thirdparty%2Fopenldap.git ITS#9917 Remove 'h' and 'p' from options[] in client tools The options -h and -p got removed from client tools in commit 66af4cfd5d3c559fcdf6d722b02fa66416b95f01. However, they were still present in the options[] array in several client tools source files. So, if one of those tools got executed with -h or -p followed by a value, this lead to the error "unrecognized option -", without mentioning which option was problematic. Removing 'h' and 'p' from options[] fixes this. --- diff --git a/clients/tools/ldapcompare.c b/clients/tools/ldapcompare.c index a83c8d4ac8..63c30408f0 100644 --- a/clients/tools/ldapcompare.c +++ b/clients/tools/ldapcompare.c @@ -104,7 +104,7 @@ static int docompare LDAP_P(( const char options[] = "z" - "Cd:D:e:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:Z"; + "Cd:D:e:H:IMnNO:o:P:QR:U:vVw:WxX:y:Y:Z"; #ifdef LDAP_CONTROL_DONTUSECOPY int dontUseCopy = 0; diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index bac4ff9971..60379732dc 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -82,7 +82,7 @@ usage( void ) const char options[] = "r" - "cd:D:e:f:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:z:Z"; + "cd:D:e:f:H:IMnNO:o:P:QR:U:vVw:WxX:y:Y:z:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldapexop.c b/clients/tools/ldapexop.c index bd6e029791..bfe6e4eac2 100644 --- a/clients/tools/ldapexop.c +++ b/clients/tools/ldapexop.c @@ -52,7 +52,7 @@ usage( void ) const char options[] = "" - "d:D:e:h:H:InNO:o:p:QR:U:vVw:WxX:y:Y:Z"; + "d:D:e:H:InNO:o:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index c94c11a3af..33b723bda0 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -125,7 +125,7 @@ usage( void ) const char options[] = "aE:rS:" - "cd:D:e:f:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:Z"; + "cd:D:e:f:H:IMnNO:o:P:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index d5cf43f7a2..40a482f5d5 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -95,7 +95,7 @@ usage( void ) const char options[] = "rs:" - "cd:D:e:f:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:Z"; + "cd:D:e:f:H:IMnNO:o:P:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 1958a30f64..9a48aabf3a 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -83,7 +83,7 @@ usage( void ) const char options[] = "Ea:As:St:T:" - "d:D:e:h:H:InNO:o:p:QR:U:vVw:WxX:y:Y:Z"; + "d:D:e:H:InNO:o:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 48793314b4..69e172c6cd 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -363,7 +363,7 @@ parse_vlv(char *cvalue) } const char options[] = "a:Ab:cE:F:l:Ls:S:tT:uz:" - "Cd:D:e:f:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:Z"; + "Cd:D:e:f:H:IMnNO:o:P:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldapvc.c b/clients/tools/ldapvc.c index 8465618479..4f35025ec1 100644 --- a/clients/tools/ldapvc.c +++ b/clients/tools/ldapvc.c @@ -86,7 +86,7 @@ usage( void ) const char options[] = "abE:" - "d:D:e:h:H:InNO:o:p:QR:U:vVw:WxX:y:Y:Z"; + "d:D:e:H:InNO:o:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i ) diff --git a/clients/tools/ldapwhoami.c b/clients/tools/ldapwhoami.c index 45d32f5d99..e8ac4b34bc 100644 --- a/clients/tools/ldapwhoami.c +++ b/clients/tools/ldapwhoami.c @@ -62,7 +62,7 @@ usage( void ) const char options[] = "" - "d:D:e:h:H:InNO:o:p:QR:U:vVw:WxX:y:Y:Z"; + "d:D:e:H:InNO:o:QR:U:vVw:WxX:y:Y:Z"; int handle_private_option( int i )