mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix setting domain_sid
'sid' is a stack variable, by assigning its address to the domain_sid pointer we were later referencing grabage (whatever on the stack ha[ppened to be at that address. Properly copy the sid and allocate it on the provided memory context.
This commit is contained in:
@@ -415,7 +415,7 @@ static krb5_error_code ipadb_fill_info3(struct ipadb_context *ipactx,
|
||||
}
|
||||
|
||||
/* we got the domain SID for the user sid */
|
||||
info3->base.domain_sid = &sid;
|
||||
info3->base.domain_sid = talloc_memdup(memctx, &sid, sizeof(sid));
|
||||
|
||||
/* always zero out, not used for Krb, only NTLM */
|
||||
memset(&info3->base.LMSessKey, '\0', sizeof(info3->base.key));
|
||||
|
||||
Reference in New Issue
Block a user