#ifdef LANGUAGES_SUPPORTED
static const char *kpwd_usage_error_fmt = "%s: usage is %s [-u user] [-l language]\n";
+static const char *kpwd_getoptstring = "l:u:";
#else /* LANGUAGES_SUPPORTED */
static const char *kpwd_usage_error_fmt = "%s: usage is %s [-u user]\n";
+static const char *kpwd_getoptstring = "u:";
#endif /* LANGUAGES_SUPPORTED */
static const char *kpwd_extra_args = "extra arguments";
static const char *kpwd_bad_option_fmt = "%s: unrecognized option -%c.\n";
* Usage is:
* kpasswd [-u user] [-l language]
*/
- while ((option = getopt(argc, argv, "l:mu:")) != EOF) {
+ while ((option = getopt(argc, argv, kpwd_getoptstring)) != EOF) {
switch (option) {
case 'u':
if ((name = (char *) malloc(strlen(optarg)+1)) == NULL) {
#ifdef LANGUAGES_SUPPORTED
static const char *usage_format = "%s: usage is %s [-a aclfile] [-d database] [-e enctype] [-i]\n\t[-k mkeytype] [-l langlist] [-r realm] [-t timeout]\n\t[-D dbg] [-M mkeyname].\n";
+static const char *getopt_string = "a:d:e:ik:l:r:t:D:M:";
#else /* LANGUAGES_SUPPORTED */
static const char *usage_format = "%s: usage is %s [-a aclfile] [-d database] [-e enctype] [-i]\n\t[-k mkeytype] [-r realm] [-t timeout]\n\t[-D dbg] [-M mkeyname].\n";
+static const char *getopt_string = "a:d:e:ik:r:t:D:M:";
#endif /* LANGUAGES_SUPPORTED */
static const char *fval_not_number = "%s: value (%s) specified for -%c is not numeric.\n";
static const char *extra_params = "%s extra paramters beginning with %s... \n";
* [-M masterkeyname]
*/
error = 0;
- while ((option = getopt(argc, argv, "a:d:e:ik:l:m:r:t:D:M:")) != EOF) {
+ while ((option = getopt(argc, argv, getopt_string)) != EOF) {
switch (option) {
case 'a':
acl_file = optarg;