From: Günther Deschner Date: Fri, 28 Nov 2008 23:23:16 +0000 (+0100) Subject: s3-samr: refuse do process UserSetInfo with 0 fields_present. X-Git-Tag: samba-3.3.0rc2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff890b8e83189ec4b43b54c877226826cf1124de;p=thirdparty%2Fsamba.git s3-samr: refuse do process UserSetInfo with 0 fields_present. Guenther (cherry picked from commit bfcff837ebde5b4d726bfccd62d72e5d062adbc0) --- diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index ab230a98ff7..4f7b44a782c 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -3869,6 +3869,10 @@ static NTSTATUS set_user_info_21(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } + if (id21->fields_present == 0) { + return NT_STATUS_INVALID_PARAMETER; + } + if (id21->fields_present & SAMR_FIELD_LAST_PWD_CHANGE) { return NT_STATUS_ACCESS_DENIED; } @@ -3952,6 +3956,10 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } + if (id23->info.fields_present == 0) { + return NT_STATUS_INVALID_PARAMETER; + } + if (id23->info.fields_present & SAMR_FIELD_LAST_PWD_CHANGE) { return NT_STATUS_ACCESS_DENIED; } @@ -4125,6 +4133,10 @@ static NTSTATUS set_user_info_25(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } + if (id25->info.fields_present == 0) { + return NT_STATUS_INVALID_PARAMETER; + } + if (id25->info.fields_present & SAMR_FIELD_LAST_PWD_CHANGE) { return NT_STATUS_ACCESS_DENIED; }