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:42:42 +0000 (16:42 -0700)
committerKarolin Seeger <kseeger@samba.org>
Wed, 1 Jun 2016 10:35:23 +0000 (12:35 +0200)
commit0ab3ef3aae8431790173eb41999239ad6b10af9c
tree4551819fe4369ff2b32823871c97c1876429f23a
parent615516bcabb08b0c4947b3fe030439c41f62d9bf
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.

Back-port from master: 1b3b89345480d16222da00753f973e36e2e0f92d

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Wed Jun  1 12:35:23 CEST 2016 on sn-devel-104
source3/auth/token_util.c