diff options
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 10 | ||||
-rw-r--r-- | source4/librpc/idl/samr.idl | 2 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/samsync.c | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 65f818b37d..9a677249eb 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -556,14 +556,14 @@ struct samr_LogonHours samdb_result_logon_hours(TALLOC_CTX *mem_ctx, struct ldb_ const int units_per_week = 168; const struct ldb_val *val = ldb_msg_find_ldb_val(msg, attr); ZERO_STRUCT(hours); - hours.bitmap = talloc_array_p(mem_ctx, uint8, units_per_week); - if (!hours.bitmap) { + hours.bits = talloc_array_p(mem_ctx, uint8, units_per_week); + if (!hours.bits) { return hours; } hours.units_per_week = units_per_week; - memset(hours.bitmap, 0xFF, units_per_week); + memset(hours.bits, 0xFF, units_per_week); if (val) { - memcpy(hours.bitmap, val->data, MIN(val->length, units_per_week)); + memcpy(hours.bits, val->data, MIN(val->length, units_per_week)); } return hours; } @@ -888,7 +888,7 @@ int samdb_msg_add_logon_hours(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message struct ldb_wrap *sam_ctx = ctx; struct ldb_val val; val.length = hours->units_per_week / 8; - val.data = hours->bitmap; + val.data = hours->bits; return ldb_msg_add_value(sam_ctx->ldb, msg, attr_name, &val); } diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl index ac5a6d269a..95f5fdbd0e 100644 --- a/source4/librpc/idl/samr.idl +++ b/source4/librpc/idl/samr.idl @@ -568,7 +568,7 @@ /* this is also used in samr and netlogon */ typedef [public, flag(NDR_PAHEX)] struct { uint16 units_per_week; - [size_is(1260), length_is(units_per_week/8)] uint8 *bitmap; + [size_is(1260), length_is(units_per_week/8)] uint8 *bits; } samr_LogonHours; typedef struct { diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index ea645d72d4..5d20587d26 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -245,11 +245,11 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, s2.in.level = lvl1; \ u = *q.out.info; \ if (lvl1 == 21) { \ - uint8_t *bitmap = u.info21.logon_hours.bitmap; \ + uint8_t *bits = u.info21.logon_hours.bits; \ ZERO_STRUCT(u.info21); \ if (fpval == SAMR_FIELD_LOGON_HOURS) { \ u.info21.logon_hours.units_per_week = 168; \ - u.info21.logon_hours.bitmap = bitmap; \ + u.info21.logon_hours.bits = bits; \ } \ u.info21.fields_present = fpval; \ } \ @@ -324,10 +324,10 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, TEST_USERINFO_INT(21, code_page, 21, code_page, __LINE__, SAMR_FIELD_CODE_PAGE); - TEST_USERINFO_INT(4, logon_hours.bitmap[3], 3, logon_hours.bitmap[3], 1, 0); - TEST_USERINFO_INT(4, logon_hours.bitmap[3], 5, logon_hours.bitmap[3], 2, 0); - TEST_USERINFO_INT(4, logon_hours.bitmap[3], 21, logon_hours.bitmap[3], 3, 0); - TEST_USERINFO_INT(21, logon_hours.bitmap[3], 21, logon_hours.bitmap[3], 4, + TEST_USERINFO_INT(4, logon_hours.bits[3], 3, logon_hours.bits[3], 1, 0); + TEST_USERINFO_INT(4, logon_hours.bits[3], 5, logon_hours.bits[3], 2, 0); + TEST_USERINFO_INT(4, logon_hours.bits[3], 21, logon_hours.bits[3], 3, 0); + TEST_USERINFO_INT(21, logon_hours.bits[3], 21, logon_hours.bits[3], 4, SAMR_FIELD_LOGON_HOURS); TEST_USERINFO_INT_EXP(16, acct_flags, 5, acct_flags, diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index e85fa8db4f..171e615196 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -453,7 +453,7 @@ static BOOL samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsy TEST_INT_EQUAL(q.out.info->info21.logon_hours.units_per_week, user->logon_hours.units_per_week); if (ret) { - if (memcmp(q.out.info->info21.logon_hours.bitmap, user->logon_hours.bitmap, + if (memcmp(q.out.info->info21.logon_hours.bits, user->logon_hours.bits, q.out.info->info21.logon_hours.units_per_week/8) != 0) { printf("Logon hours mismatch\n"); ret = False; |