s3-rpc_server: limit allowed transports for samr_ValidatePassword().
authorGünther Deschner <gd@samba.org>
Tue, 11 Dec 2012 13:41:34 +0000 (14:41 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Dec 2012 10:29:33 +0000 (11:29 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_server/samr/srv_samr_nt.c

index 1065f2a..580638b 100644 (file)
@@ -6807,6 +6807,11 @@ NTSTATUS _samr_ValidatePassword(struct pipes_struct *p,
        struct samr_GetDomPwInfo pw;
        struct samr_PwInfo dom_pw_info;
 
+       if (p->transport != NCACN_IP_TCP && p->transport != NCALRPC) {
+               p->fault_state = DCERPC_FAULT_ACCESS_DENIED;
+               return NT_STATUS_ACCESS_DENIED;
+       }
+
        if (r->in.level < 1 || r->in.level > 3) {
                return NT_STATUS_INVALID_INFO_CLASS;
        }