diff options
author | Jeremy Allison <jra@samba.org> | 2010-01-14 15:50:02 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-02-24 16:25:09 +0100 |
commit | 2e6435952779134614c2a8adbfffb83eff5bd96e (patch) | |
tree | a10d857f205b75de4fc7a303f01a7741bdcf98a4 /source/utils/net_rpc.c | |
parent | 3df467f2f38809d0b41c76463bd73c36e1853238 (diff) | |
download | samba-2e6435952779134614c2a8adbfffb83eff5bd96e.tar.gz samba-2e6435952779134614c2a8adbfffb83eff5bd96e.tar.xz samba-2e6435952779134614c2a8adbfffb83eff5bd96e.zip |
Fix bug #7036 - net rpc getsid fails in hardened windows environments.
Fix suggested by Dave.Daugherty@Centrify.com.
(cherry picked from commit a92d42cf8ae37fe579061f762af601dc49ed71af)
Diffstat (limited to 'source/utils/net_rpc.c')
-rw-r--r-- | source/utils/net_rpc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c index 826b6d9ac87..b73f98fc6e7 100644 --- a/source/utils/net_rpc.c +++ b/source/utils/net_rpc.c @@ -587,6 +587,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" @@ -595,7 +601,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); } |