From fcf14ebee21378064187dd4389c01d8eaea3ca2a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 26 Nov 2005 21:35:43 +0000 Subject: r11921: samr_open_domain can only open "our" domain and BUILTIN. Volker (This used to be commit 049920ce4f78723bc884c46b2ee4ef22f25c482c) --- source3/rpc_server/srv_samr_nt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index ec2bc3fe4a..ac774355a7 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -562,6 +562,11 @@ NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN if ( !NT_STATUS_IS_OK(status) ) return status; + if (!sid_check_is_domain(&q_u->dom_sid.sid) && + !sid_check_is_builtin(&q_u->dom_sid.sid)) { + return NT_STATUS_NO_SUCH_DOMAIN; + } + /* associate the domain SID with the (unique) handle. */ if ((info = get_samr_info_by_sid(&q_u->dom_sid.sid))==NULL) return NT_STATUS_NO_MEMORY; -- cgit