[PATCH] Compilation warning
Matthias Dieter Wallnöfer
mdw at samba.org
Wed Aug 26 20:04:27 UTC 2015
Here the attachment, hopefully it passes the filter.
Matthias
Matthias Dieter Wallnöfer schrieb:
> This is a similar case.
>
> Matthias Dieter Wallnöfer schrieb:
>> Please find attached the patch. ULL literals on i386 need to be declared
>> as such, otherwise they get truncated.
>>
>> Matthias
>>
>> Ira Cooper schrieb:
>>> Any chance we can get the commit message etc?
>>>
>>> -Ira
>>>
>>> Matthias Dieter Wallnöfer <mdw at samba.org> writes:
>>>
>>>> Stumbled over when building on a 32 bit system. Please review!
>>>>
>>>> Matthias
>>>> diff --git a/source4/torture/ndr/samr.c b/source4/torture/ndr/samr.c
>>>> index 91bb4d7..589ce72 100644
>>>> --- a/source4/torture/ndr/samr.c
>>>> +++ b/source4/torture/ndr/samr.c
>>>> @@ -294,8 +294,8 @@ static bool samr_changepassworduser3_w2k8r2_out_check(struct torture_context *tc
>>>> torture_assert_int_equal(tctx, dominfo->min_password_length, 7, "min_password_length");
>>>> torture_assert_int_equal(tctx, dominfo->password_history_length, 0, "password_history_length");
>>>> torture_assert_int_equal(tctx, dominfo->password_properties, DOMAIN_PASSWORD_COMPLEX, "password_properties");
>>>> - torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000, "max_password_age");
>>>> - torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000, "min_password_age");
>>>> + torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000ULL, "max_password_age");
>>>> + torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000ULL, "min_password_age");
>>>>
>>>> torture_assert_int_equal(tctx, reject->extendedFailureReason, SAM_PWD_CHANGE_NOT_COMPLEX, "extendedFailureReason");
>>>> torture_assert_int_equal(tctx, reject->filterModuleName.length, 0, "filterModuleName.length");
-------------- next part --------------
commit 9172a96de31736f7c6cf30f78cc6ea0f8c65ea30
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Aug 1 23:18:28 2015 +0200
s4:torture/ndr/samr.c - 64 bit unsigned long long constants
diff --git a/source4/torture/ndr/samr.c b/source4/torture/ndr/samr.c
index 91bb4d7..589ce72 100644
--- a/source4/torture/ndr/samr.c
+++ b/source4/torture/ndr/samr.c
@@ -294,8 +294,8 @@ static bool samr_changepassworduser3_w2k8r2_out_check(struct torture_context *tc
torture_assert_int_equal(tctx, dominfo->min_password_length, 7, "min_password_length");
torture_assert_int_equal(tctx, dominfo->password_history_length, 0, "password_history_length");
torture_assert_int_equal(tctx, dominfo->password_properties, DOMAIN_PASSWORD_COMPLEX, "password_properties");
- torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000, "max_password_age");
- torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000, "min_password_age");
+ torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000ULL, "max_password_age");
+ torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000ULL, "min_password_age");
torture_assert_int_equal(tctx, reject->extendedFailureReason, SAM_PWD_CHANGE_NOT_COMPLEX, "extendedFailureReason");
torture_assert_int_equal(tctx, reject->filterModuleName.length, 0, "filterModuleName.length");
commit 3304a78d15f9d4a1c431921876cca00439443a06
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Aug 8 20:54:48 2015 +0200
s4:operational LDB module - "maxPwdAge" constant
It is bigger than 32 bit long (= int), hence needs to be declared as ULL.
Converted it in hex to match the upper limit (as in the following check).
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index 8390230..7d36ffd 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -708,14 +708,14 @@ static NTTIME get_msds_user_password_expiry_time_computed(struct ldb_module *mod
*
* Possible values are in the range of:
*
- * maxPwdAge: -864000000001
+ * maxPwdAge: -864000000001 (-0xC92A69C001ULL)
* to
* maxPwdAge: -9223372036854775808 (-0x8000000000000000ULL)
*
*/
maxPwdAge = samdb_search_int64(ldb_module_get_ctx(module), msg, 0,
domain_dn, "maxPwdAge", NULL);
- if (maxPwdAge >= -864000000000) {
+ if (maxPwdAge > -0xC92A69C001ULL) {
/*
* This is not really possible...
*/
More information about the samba-technical
mailing list