summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-13 17:28:39 +0200
committerKarolin Seeger <kseeger@samba.org>2009-11-26 11:40:18 +0100
commita42d8c4261cad365e1ca281c4b5147880daff402 (patch)
treed5d5b0b1524ac7a011a989e83ee34af10270cb97 /source3/utils
parent9179876168470e5065cd81c1eb8f117568cfe4e3 (diff)
downloadsamba-a42d8c4261cad365e1ca281c4b5147880daff402.tar.gz
s3-net: allow to call "net ads kerberos pac <impersonation principal> -P".
Guenther (cherry picked from commit 58184b5fd4e95bc7ad2179237808126411509eea) (cherry picked from commit 05a8ecea99d2e056d20d31d8e15d016220a3d405)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index ebc175b8c79..beef62a8f11 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2342,6 +2342,7 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
TALLOC_CTX *mem_ctx = NULL;
NTSTATUS status;
int ret = -1;
+ const char *impersonate_princ_s = NULL;
if (c->display_usage) {
d_printf(_("Usage:\n"
@@ -2355,6 +2356,10 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
goto out;
}
+ if (argc > 0) {
+ impersonate_princ_s = argv[0];
+ }
+
c->opt_password = net_prompt_pass(c, c->opt_user_name);
status = kerberos_return_pac(mem_ctx,
@@ -2363,10 +2368,11 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
0,
NULL,
NULL,
- NULL,
+ "/tmp/schrott",
true,
true,
2592000, /* one month */
+ impersonate_princ_s,
&pac);
if (!NT_STATUS_IS_OK(status)) {
d_printf(_("failed to query kerberos PAC: %s\n"),