move rcsid, make afs optional

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24365 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-01-25 00:32:11 +00:00
parent 25f6aea96d
commit 97b2277b95

View File

@@ -360,6 +360,8 @@ check_for_tgt (krb5_context context,
* Print a list of all AFS tokens * Print a list of all AFS tokens
*/ */
#ifndef NO_AFS
static void static void
display_tokens(int do_verbose) display_tokens(int do_verbose)
{ {
@@ -425,6 +427,7 @@ display_tokens(int do_verbose)
putchar('\n'); putchar('\n');
} }
} }
#endif
/* /*
* display the ccache in `cred_cache' * display the ccache in `cred_cache'
@@ -551,7 +554,9 @@ static int help_flag = 0;
static int do_verbose = 0; static int do_verbose = 0;
static int do_list_caches = 0; static int do_list_caches = 0;
static int do_test = 0; static int do_test = 0;
#ifndef NO_AFS
static int do_tokens = 0; static int do_tokens = 0;
#endif
static int do_v5 = 1; static int do_v5 = 1;
static char *cred_cache; static char *cred_cache;
static int do_flags = 0; static int do_flags = 0;
@@ -564,8 +569,10 @@ static struct getargs args[] = {
{ "test", 't', arg_flag, &do_test, { "test", 't', arg_flag, &do_test,
NP_("test for having tickets", ""), NULL }, NP_("test for having tickets", ""), NULL },
{ NULL, 's', arg_flag, &do_test }, { NULL, 's', arg_flag, &do_test },
#ifndef NO_AFS
{ "tokens", 'T', arg_flag, &do_tokens, { "tokens", 'T', arg_flag, &do_tokens,
NP_("display AFS tokens", ""), NULL }, NP_("display AFS tokens", ""), NULL },
#endif
{ "v5", '5', arg_flag, &do_v5, { "v5", '5', arg_flag, &do_v5,
NP_("display v5 cred cache", ""), NULL}, NP_("display v5 cred cache", ""), NULL},
{ "list-caches", 'l', arg_flag, &do_list_caches, { "list-caches", 'l', arg_flag, &do_list_caches,
@@ -633,11 +640,13 @@ main (int argc, char **argv)
do_verbose, do_flags, do_hidden); do_verbose, do_flags, do_hidden);
if (!do_test) { if (!do_test) {
#ifndef NO_AFS
if (do_tokens && k_hasafs ()) { if (do_tokens && k_hasafs ()) {
if (do_v5) if (do_v5)
printf ("\n"); printf ("\n");
display_tokens (do_verbose); display_tokens (do_verbose);
} }
#endif
} }
return exit_status; return exit_status;