summaryrefslogtreecommitdiff
path: root/source4/heimdal/kpasswd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/kpasswd')
-rw-r--r--source4/heimdal/kpasswd/kpasswd.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source4/heimdal/kpasswd/kpasswd.c b/source4/heimdal/kpasswd/kpasswd.c
index c2f980b25f..57c989719e 100644
--- a/source4/heimdal/kpasswd/kpasswd.c
+++ b/source4/heimdal/kpasswd/kpasswd.c
@@ -117,22 +117,21 @@ main (int argc, char **argv)
krb5_error_code ret;
krb5_context context;
krb5_principal principal;
- int optind = 0;
krb5_get_init_creds_opt *opt;
krb5_ccache id = NULL;
int exit_value;
+ int optidx = 0;
- optind = krb5_program_setup(&context, argc, argv,
- args, sizeof(args) / sizeof(args[0]), usage);
+ setprogname(argv[0]);
+ if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
+ usage(1, args, sizeof(args) / sizeof(args[0]));
if (help_flag)
- usage (0, args, sizeof(args) / sizeof(args[0]));
-
- if(version_flag){
- print_version (NULL);
- exit(0);
+ usage(0, args, sizeof(args) / sizeof(args[0]));
+ if (version_flag) {
+ print_version(NULL);
+ return 0;
}
-
argc -= optind;
argv += optind;