summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/acl.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-14 17:01:39 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-16 10:54:46 +0200
commitc2918581996b58c3e2a2416e6dd693978becd3a2 (patch)
treed460eb0c2c6cd2a9aabdf846fac2c7e0cccc6e58 /source4/dsdb/samdb/ldb_modules/acl.c
parenta72ffb0d0157dce2ac45e3b228f168a56c89f26e (diff)
downloadsamba-c2918581996b58c3e2a2416e6dd693978becd3a2.tar.gz
samba-c2918581996b58c3e2a2416e6dd693978becd3a2.tar.bz2
samba-c2918581996b58c3e2a2416e6dd693978becd3a2.zip
s4:dsdb - fix unsigned integer save problems using the "%u" specifier
The issue here is that we have not yet first cast to int32_t explicitly, before we cast to an signed int to printf() into the %d or cast to a int64_t before we then cast to a long long to printf into a %lld. There are *no* unsigned integers in Active Directory LDAP, even the RID allocations and ms-DS-Secondary-KrbTgt-Number are *signed* quantities. (See the schema, and the syntax definitions in schema_syntax.c). The failure has been detected by Matthieu Patou on the buildfarm host "tridge" due to a malformed "groupType" attribute. The solution is to use the "%d" specifier. Either to use it directly - or better (when possible) use the call "samdb_msg_add_uint" (which encapsulates it). This patch changes such problematic situations.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/acl.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 660b4df818..3e302ef4ef 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -425,8 +425,8 @@ static int acl_sDRightsEffective(struct ldb_module *module,
flags |= SECINFO_SACL;
}
}
- ldb_msg_add_fmt(msg, "sDRightsEffective", "%u", flags);
- return LDB_SUCCESS;
+ return samdb_msg_add_uint(ldb_module_get_ctx(module), msg, msg,
+ "sDRightsEffective", flags);
}
static int acl_add(struct ldb_module *module, struct ldb_request *req)