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

s3-netlogon: make sure we protect some function codes in _netr_LogonControl2Ex().

Guenther
This commit is contained in:
Günther Deschner 2009-11-04 00:34:29 +01:00
parent bb2e1ff631
commit ccdd1462cc

View File

@ -192,6 +192,19 @@ WERROR _netr_LogonControl2Ex(pipes_struct *p,
return WERR_INVALID_PARAM;
}
switch (r->in.function_code) {
case NETLOGON_CONTROL_TC_VERIFY:
case NETLOGON_CONTROL_CHANGE_PASSWORD:
case NETLOGON_CONTROL_REDISCOVER:
if (!nt_token_check_domain_rid(p->server_info->ptok, DOMAIN_GROUP_RID_ADMINS) &&
!nt_token_check_sid(&global_sid_Builtin_Administrators, p->server_info->ptok)) {
return WERR_ACCESS_DENIED;
}
break;
default:
break;
}
tc_status = WERR_NO_SUCH_DOMAIN;
switch (r->in.function_code) {