diff options
author | Simo Sorce <ssorce@redhat.com> | 2012-05-29 17:41:38 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2012-05-29 18:01:21 -0400 |
commit | 43701d273525b01fd7a0f3611166653218daf11d (patch) | |
tree | c8fbf2df3ff0885e3e1cb1e323f647d951af9b64 /daemons/ipa-kdb/ipa_kdb_mspac.c | |
parent | 51bd68eaf5e2b21ce79f6b848a67f88abe9f7e11 (diff) | |
download | freeipa-43701d273525b01fd7a0f3611166653218daf11d.tar.gz freeipa-43701d273525b01fd7a0f3611166653218daf11d.tar.xz freeipa-43701d273525b01fd7a0f3611166653218daf11d.zip |
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.
Diffstat (limited to 'daemons/ipa-kdb/ipa_kdb_mspac.c')
-rw-r--r-- | daemons/ipa-kdb/ipa_kdb_mspac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c index c59dcbb32..bb05dce98 100644 --- a/daemons/ipa-kdb/ipa_kdb_mspac.c +++ b/daemons/ipa-kdb/ipa_kdb_mspac.c @@ -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)); |