1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r11921: samr_open_domain can only open "our" domain and BUILTIN.

Volker
(This used to be commit 049920ce4f)
This commit is contained in:
Volker Lendecke 2005-11-26 21:35:43 +00:00 committed by Gerald (Jerry) Carter
parent d36eb68cb5
commit fcf14ebee2

View File

@ -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;