summaryrefslogtreecommitdiff
path: root/source4/heimdal/kpasswd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-01-12 18:16:45 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-03-27 11:51:27 +1100
commit89eaef025376339ef25d07cdc4748920fceaa968 (patch)
treef514f4632c9d54a372a7f1f0ca845a0c3a488fbf /source4/heimdal/kpasswd
parentfac8ca52ade6e490eea3cf3d0fc98287da321c13 (diff)
downloadsamba-89eaef025376339ef25d07cdc4748920fceaa968.tar.gz
samba-89eaef025376339ef25d07cdc4748920fceaa968.tar.bz2
samba-89eaef025376339ef25d07cdc4748920fceaa968.zip
s4:heimdal: import lorikeet-heimdal-201001120029 (commit a5e675fed7c5db8a7370b77ed0bfa724196aa84d)
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;