s3:auth: fix dereference level in talloc checks in create_token_from_sid()
authorMichael Adam <obnox@samba.org>
Tue, 11 Dec 2012 17:05:31 +0000 (18:05 +0100)
committerAndreas Schneider <asn@samba.org>
Tue, 11 Dec 2012 17:22:15 +0000 (18:22 +0100)
commita20c47410fb74716c0c8b2583fd4d0ae0145fd7d
treeb23a30bb06ca46fdd72c91f97b8b9f5c72e46594
parent9ee3343529d2897e900b8824e49b253cfc53bff9
s3:auth: fix dereference level in talloc checks in  create_token_from_sid()

Commit c5b150b33fc54ed97dbd0736cc6f4c15977d6e70 introduced these checks.
The current check "found_username == NULL" is wrong (we would segfault earlier
in this case). We need to check *found_username == NULL instead as
noted by Günter.

Reported-by: Günter Kukkukk <linux@kukkukk.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/auth/token_util.c