summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2014-03-11 16:34:36 +0100
committerGünther Deschner <gd@samba.org>2014-03-12 10:13:20 +0100
commit35a1ed22f65473fabb2f4846f6d2b50da1847f6a (patch)
tree01c8aa0b255814f5c8daaf0b3593078a58ecbd59
parent9725a86e60bb6ef6e912621e81acc955ae2f70a8 (diff)
downloadsamba-35a1ed22f65473fabb2f4846f6d2b50da1847f6a.tar.gz
samba-35a1ed22f65473fabb2f4846f6d2b50da1847f6a.tar.xz
samba-35a1ed22f65473fabb2f4846f6d2b50da1847f6a.zip
s3-net: allow to provide custom local_service in "net ads kerberos pac".
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/utils/net_ads.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index ac6346f5b1..c53c8c6ab6 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2623,6 +2623,12 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
return -1;
}
}
+ if (strnequal(argv[i], "local_service", strlen("local_service"))) {
+ local_service = get_string_param(argv[i]);
+ if (local_service == NULL) {
+ return -1;
+ }
+ }
}
mem_ctx = talloc_init("net_ads_kerberos_pac");
@@ -2630,10 +2636,12 @@ static int net_ads_kerberos_pac(struct net_context *c, int argc, const char **ar
goto out;
}
- local_service = talloc_asprintf(mem_ctx, "%s$@%s",
- lp_netbios_name(), lp_realm());
if (local_service == NULL) {
- goto out;
+ 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);