s3: auth: Move the declaration of struct dom_sid tmp_sid to function level scope.
authorJeremy Allison <jra@samba.org>
Thu, 26 May 2016 23:31:55 +0000 (16:31 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 31 May 2016 06:58:21 +0000 (08:58 +0200)
commit211938fc6bb869f6ca7e2fd70e9c7e09afa7124d
treeb1d0f31ec73b81c532e9d24673866f5c56fe8064
parent6a10012e5233e1ca2d77b4e12d0219b8d63da7ba
s3: auth: Move the declaration of struct dom_sid tmp_sid to function level scope.

It's referred to outside of the {} brace scope it was defined in by
the following code:

                uid_to_unix_users_sid(*uid, &tmp_sid);
                user_sid = &tmp_sid;

As tmp_sid was going out of scope, user_sid was
being incorrectly set in the token sid list.

I think this *may* be the root cause of:

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10618

But even if not this is an obvious error that must
be fixed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 27 11:28:18 CEST 2016 on sn-devel-144

(cherry picked from commit 1b3b89345480d16222da00753f973e36e2e0f92d)
source3/auth/token_util.c