summaryrefslogtreecommitdiffstats
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2014-01-17 14:29:03 +0100
committerGünther Deschner <gd@samba.org>2014-03-12 10:13:19 +0100
commit932490ae08578c37523e00e537017603ee00ce7c (patch)
tree0089a80fd0649196cc54aa425fa8987c248d54cd /source3/utils
parent41d8d99d8ac9e53405868bf5e34f48a01550c1f4 (diff)
downloadsamba-932490ae08578c37523e00e537017603ee00ce7c.tar.gz
samba-932490ae08578c37523e00e537017603ee00ce7c.tar.xz
samba-932490ae08578c37523e00e537017603ee00ce7c.zip
s3-libads: pass down local_service to kerberos_return_pac().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 89eebf3388..5a073b1cc7 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2604,6 +2604,7 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
NTSTATUS status;
int ret = -1;
const char *impersonate_princ_s = NULL;
+ const char *local_service = NULL;
if (c->display_usage) {
d_printf( "%s\n"
@@ -2623,6 +2624,12 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
impersonate_princ_s = argv[0];
}
+ local_service = talloc_asprintf(mem_ctx, "%s$@%s",
+ lp_netbios_name(), lp_realm());
+ if (local_service == NULL) {
+ goto out;
+ }
+
c->opt_password = net_prompt_pass(c, c->opt_user_name);
status = kerberos_return_pac(mem_ctx,
@@ -2636,6 +2643,7 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
true,
2592000, /* one month */
impersonate_princ_s,
+ local_service,
&info);
if (!NT_STATUS_IS_OK(status)) {
d_printf(_("failed to query kerberos PAC: %s\n"),