git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3df467f
)
Fix bug #7036 - net rpc getsid fails in hardened windows environments.
author
Jeremy Allison
<jra@samba.org>
Thu, 14 Jan 2010 23:50:02 +0000
(15:50 -0800)
committer
Karolin Seeger
<kseeger@samba.org>
Wed, 24 Feb 2010 15:25:09 +0000
(16:25 +0100)
Fix suggested by Dave.Daugherty@Centrify.com.
(cherry picked from commit
a92d42cf8ae37fe579061f762af601dc49ed71af
)
source/utils/net_rpc.c
patch
|
blob
|
history
diff --git
a/source/utils/net_rpc.c
b/source/utils/net_rpc.c
index 826b6d9ac87ad8817b641b630bf633885669723c..b73f98fc6e7c217b2f085cd7d854de954ec2c800 100644
(file)
--- 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);
}