r13449: Ensure we don't crash if no dc struct on pipe.
authorJeremy Allison <jra@samba.org>
Sat, 11 Feb 2006 00:04:39 +0000 (00:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:10:04 +0000 (11:10 -0500)
Jeremy.

source/include/rpc_lsa.h
source/rpc_server/srv_lsa_nt.c
source/rpc_server/srv_netlog_nt.c

index 2c35eb06140747f677d6f9b9ea1ffde75cdc1bdd..7cb5fbfdfde777dd1359fdbe8d70e7f4a92e565f 100644 (file)
 #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
index d13ddf387a984dec7cf0e3e0dabad78a8a419a1a..f7a462d2b2261ca2211793582ce15cbf7b392d8f 100644 (file)
@@ -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",
index c21a72965d566d26d631a2c41e3ec5e29970f8e4..2b98314722a1fea17d19393256dbea104fe63784 100644 (file)
@@ -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;
         }