When the "(status == LDB_SUCCESS && msg != NULL)" condition in this
routine is not evaluating to true, "new_rid" is read uninitialized,
comparing it against ~0. Initialize new_rid and compare it against
UINT32_MAX instead of ~0.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
const int status)
{
TALLOC_CTX *ctx = talloc_new(NULL);
- uint32_t new_rid;
+ uint32_t new_rid = UINT32_MAX;
struct dom_sid *account_sid = NULL;
int ret;
const struct ldb_message *msg = dsdb_audit_get_message(acc->request);
* Otherwise only log if the primary group has actually changed.
*/
if (account_sid != NULL &&
- new_rid != ~0 &&
+ new_rid != UINT32_MAX &&
acc->primary_group != new_rid) {
const char* group = get_primary_group_dn(
ctx,