kgetcred/kvno compat example

This commit is contained in:
Love Hornquist Astrand
2010-11-24 15:24:26 -08:00
parent 60904f676e
commit 388341e149
2 changed files with 78 additions and 0 deletions

View File

@@ -42,6 +42,62 @@ command = {
help = "credential cache to list" help = "credential cache to list"
} }
} }
command = {
name = "kgetcred"
help = "Acquire a Kerberos ticket"
option = {
long = "enctype"
short = "e"
type = "string"
argument = "enctype"
help = "Encryption type to use"
}
option = {
long = "cache"
short = "c"
type = "string"
argument = "cachename"
help = "Credentials cache"
}
}
command = {
name = "kvno"
help = "Acquire a Kerberos ticket"
option = {
long = "enctype"
short = "e"
type = "string"
argument = "enctype"
help = "Encryption type to use"
}
option = {
long = "cache"
short = "c"
type = "string"
argument = "cachename"
help = "Credentials cache"
}
option = {
long = "keytab"
short = "k"
type = "string"
argument = "keytabname"
help = "Keytab to use"
}
option = {
long = "server"
short = "S"
type = "string"
argument = "principal"
help = "Server to get ticket for"
}
option = {
long = "quiet"
short = "q"
type = "flag"
help = "Quiet"
}
}
command = { command = {
name = "help" name = "help"
name = "?" name = "?"

View File

@@ -69,6 +69,28 @@ klist(struct klist_options *opt, int argc, char **argv)
return 0; return 0;
} }
int
kgetcred(struct kgetcred_options *opt, int argc, char **argv)
{
return 0;
}
/*
* Wrapper for command line compatiblity
*/
int
kvno(struct kvno_options *opt, int argc, char **argv)
{
struct kgetcred_options k;
memset(&k, 0, sizeof(k));
k.cache_string = opt->cache_string;
k.enctype_string = opt->enctype_string;
return kgetcred(&k, argc, argv);
}
static int static int
command_alias(const char *name) command_alias(const char *name)
{ {