diff options
author | Günther Deschner <gd@samba.org> | 2007-06-29 09:01:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:41 -0500 |
commit | a2618aa8d5a46305c02a083b880ce299681810c3 (patch) | |
tree | 78a0f480aa3ac35d242b7004c697ddbc3d238dd7 /source3/utils | |
parent | 6fff735da0f9243761c410b39b876358a99fb9a8 (diff) | |
download | samba-a2618aa8d5a46305c02a083b880ce299681810c3.tar.gz samba-a2618aa8d5a46305c02a083b880ce299681810c3.tar.bz2 samba-a2618aa8d5a46305c02a083b880ce299681810c3.zip |
r23648: Allow to list a custom krb5 keytab file with:
net ads keytab list /path/to/krb5.keytab
Guenther
(This used to be commit a2befee3f240543ea02ea99cebad886b54ae64eb)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index a1206bbd52..29d7e386d8 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -2423,12 +2423,13 @@ static int net_ads_keytab_usage(int argc, const char **argv) " FLUSH Flushes out all keytab entries\n"\ " HELP Prints this help message\n"\ " LIST List the keytab\n"\ -"The ADD command will take arguments, the other commands\n"\ +"The ADD and LIST command will take arguments, the other commands\n"\ "will not take any arguments. The arguments given to ADD\n"\ "should be a list of principals to add. For example, \n"\ " net ads keytab add srv1 srv2\n"\ "will add principals for the services srv1 and srv2 to the\n"\ "system's keytab.\n"\ +"The LIST command takes a keytabname.\n"\ "\n" ); return -1; @@ -2479,15 +2480,21 @@ static int net_ads_keytab_create(int argc, const char **argv) static int net_ads_keytab_list(int argc, const char **argv) { - return ads_keytab_list(); + const char *keytab = NULL; + + if (argc >= 1) { + keytab = argv[0]; + } + + return ads_keytab_list(keytab); } int net_ads_keytab(int argc, const char **argv) { struct functable func[] = { - {"CREATE", net_ads_keytab_create}, {"ADD", net_ads_keytab_add}, + {"CREATE", net_ads_keytab_create}, {"FLUSH", net_ads_keytab_flush}, {"HELP", net_ads_keytab_usage}, {"LIST", net_ads_keytab_list}, |