summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-27 23:13:14 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-28 14:51:05 +0200
commit3c1a9fb87fe165485abaa694e9d9616e46c8cf6e (patch)
treecca8f846166ccd4b28108d0207a7cc995b33028a
parentea83d21341306dfab1f14c9491856a9414a29669 (diff)
downloadsamba-3c1a9fb87fe165485abaa694e9d9616e46c8cf6e.tar.gz
samba-3c1a9fb87fe165485abaa694e9d9616e46c8cf6e.tar.bz2
samba-3c1a9fb87fe165485abaa694e9d9616e46c8cf6e.zip
s4:dcesrv_samr_SetUserInfo - deny operations when "fields_present" is 0
Taken from s3
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c9
1 files changed, 9 insertions, 0 deletions
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");