From 3c1a9fb87fe165485abaa694e9d9616e46c8cf6e Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 27 Jun 2010 23:13:14 +0200 Subject: s4:dcesrv_samr_SetUserInfo - deny operations when "fields_present" is 0 Taken from s3 --- source4/rpc_server/samr/dcesrv_samr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 0b4e8e25ec..9556c86783 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -3183,6 +3183,9 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL break; case 21: + if (r->in.info->info21.fields_present == 0) + return NT_STATUS_INVALID_PARAMETER; + #define IFSET(bit) if (bit & r->in.info->info21.fields_present) IFSET(SAMR_FIELD_ACCT_EXPIRY) SET_UINT64(msg, info21.acct_expiry, "accountExpires"); @@ -3253,6 +3256,9 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL break; case 23: + if (r->in.info->info23.info.fields_present == 0) + return NT_STATUS_INVALID_PARAMETER; + #define IFSET(bit) if (bit & r->in.info->info23.info.fields_present) IFSET(SAMR_FIELD_ACCT_EXPIRY) SET_UINT64(msg, info23.info.acct_expiry, "accountExpires"); @@ -3320,6 +3326,9 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL break; case 25: + if (r->in.info->info25.info.fields_present == 0) + return NT_STATUS_INVALID_PARAMETER; + #define IFSET(bit) if (bit & r->in.info->info25.info.fields_present) IFSET(SAMR_FIELD_ACCT_EXPIRY) SET_UINT64(msg, info25.info.acct_expiry, "accountExpires"); -- cgit