aboutsummaryrefslogtreecommitdiff
path: root/client/wallet.c
diff options
context:
space:
mode:
authorJon Robertson <jonrober@stanford.edu>2010-07-27 12:40:12 -0700
committerJon Robertson <jonrober@stanford.edu>2010-07-27 12:40:12 -0700
commit534f2111ab41ed63024d811a3d8f5b81256d83a9 (patch)
tree7419aed995a22abee9a4418c8287b1551b693051 /client/wallet.c
parentc75eb196a37ce8ca1acd791267cfb36ee30fdcdb (diff)
Adding wallet rekey capability -- work in progress, testing
First, testing version of wallet rekey code, committed in order to get feedback from Russ. This code will eventually take an existing keytab file, and for every principal belonging to our default realm in it, get new versions of that keytab and merge them into the file. This allows for quietly rekeying principals automatically.
Diffstat (limited to 'client/wallet.c')
-rw-r--r--client/wallet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/wallet.c b/client/wallet.c
index e6d8eb9..9c1eb09 100644
--- a/client/wallet.c
+++ b/client/wallet.c
@@ -194,7 +194,7 @@ main(int argc, char *argv[])
}
argc -= optind;
argv += optind;
- if (argc < 3)
+ if (argc < 3 && strcmp(argv[0], "rekey") != 0)
usage(1);
/* -f is only supported for get and store and -S with get keytab. */
@@ -242,6 +242,10 @@ main(int argc, char *argv[])
} else {
status = get_file(r, options.type, argv[1], argv[2], file);
}
+ } else if (strcmp(argv[0], "rekey") == 0) {
+ if (argc > 2)
+ die("too many arguments");
+ status = rekey_keytab(r, ctx, "keytab", argv[1]);
} else {
count = argc + 1;
if (strcmp(argv[0], "store") == 0) {