summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-01-14 15:39:30 -0800
committerJeremy Allison <jra@samba.org>2010-01-14 15:39:30 -0800
commit6653cc43233381a941cdd85550f04b087fe880ff (patch)
tree9b49df91beac8b89bdf40cfa2a17d63cb8ef94e2 /source3
parent33a4739090416c98a4f4d1a2dc6b25bc8afdba85 (diff)
downloadsamba-6653cc43233381a941cdd85550f04b087fe880ff.tar.gz
samba-6653cc43233381a941cdd85550f04b087fe880ff.tar.bz2
samba-6653cc43233381a941cdd85550f04b087fe880ff.zip
Fix bug #7036 - net rpc getsid fails in hardened windows environments.
Fix suggested by Dave.Daugherty@Centrify.com.
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 762af716f5..3b72506cc8 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -607,6 +607,12 @@ static NTSTATUS rpc_getsid_internals(struct net_context *c,
int net_rpc_getsid(struct net_context *c, int argc, const char **argv)
{
+ int conn_flags = NET_FLAGS_PDC;
+
+ if (!c->opt_user_specified) {
+ conn_flags |= NET_FLAGS_ANONYMOUS;
+ }
+
if (c->display_usage) {
d_printf(_("Usage:\n"
"net rpc getsid\n"
@@ -615,7 +621,7 @@ int net_rpc_getsid(struct net_context *c, int argc, const char **argv)
}
return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id,
- NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
+ conn_flags,
rpc_getsid_internals,
argc, argv);
}