summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-11 00:04:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:04 -0500
commitacc4a837aad67e7ade0289d67d05e5d57241dce3 (patch)
tree2fc960af57a4f6b9afb753f8411f6205f0adf517 /source3
parent8675ab8787729cd453fce71963362a6f88497d14 (diff)
downloadsamba-acc4a837aad67e7ade0289d67d05e5d57241dce3.tar.gz
samba-acc4a837aad67e7ade0289d67d05e5d57241dce3.tar.bz2
samba-acc4a837aad67e7ade0289d67d05e5d57241dce3.zip
r13449: Ensure we don't crash if no dc struct on pipe.
Jeremy. (This used to be commit a9e1d0f3b4fd7a0732a5023d0b4dcc2c4b1b03f8)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/rpc_lsa.h3
-rw-r--r--source3/rpc_server/srv_lsa_nt.c5
-rw-r--r--source3/rpc_server/srv_netlog_nt.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index 2c35eb0614..7cb5fbfdfd 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -78,7 +78,10 @@
#define LSA_OPENTRUSTDOMBYNAME 0x37
#define LSA_LOOKUPSIDS2 0x39
+#define LSA_LOOKUPNAMES2 0x3a
+#define LSA_LOOKUPNAMES3 0x44
#define LSA_LOOKUPSIDS3 0x4c
+#define LSA_LOOKUPNAMES4 0x4d
/* XXXX these are here to get a compile! */
#define LSA_LOOKUPRIDS 0xFD
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index d13ddf387a..f7a462d2b2 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -858,6 +858,11 @@ NTSTATUS _lsa_lookup_sids3(pipes_struct *p,
}
/* No policy handle on this call. Restrict to crypto connections. */
+ if (p->auth.auth_type != PIPE_AUTH_TYPE_SCHANNEL) {
+ DEBUG(0,("_lsa_lookup_sids3: client %s not using schannel for netlogon\n",
+ get_remote_machine_name() ));
+ return NT_STATUS_INVALID_PARAMETER;
+ }
if (num_sids > MAX_LOOKUP_SIDS) {
DEBUG(5,("_lsa_lookup_sids3: limit of %d exceeded, requested %d\n",
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index c21a72965d..2b98314722 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -937,7 +937,7 @@ NTSTATUS _net_sam_logon_ex(pipes_struct *p, NET_Q_SAM_LOGON_EX *q_u, NET_R_SAM_L
/* Only allow this if the pipe is protected. */
if (p->auth.auth_type != PIPE_AUTH_TYPE_SCHANNEL) {
DEBUG(0,("_net_sam_logon_ex: client %s not using schannel for netlogon\n",
- p->dc->remote_machine ));
+ get_remote_machine_name() ));
return NT_STATUS_INVALID_PARAMETER;
}