lib: Introduce winbind_xid_to_sid
authorVolker Lendecke <vl@samba.org>
Tue, 26 Feb 2019 13:45:32 +0000 (14:45 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 13 Mar 2019 08:34:15 +0000 (08:34 +0000)
commit10a0d77f17caf49ba35f2f23974c9518c2f37c83
tree2dedca8fd03109e2eeb297574c34768d56036d9d
parentba6dd781d4ae3d6111b16a8c8cd22132ee3e945e
lib: Introduce winbind_xid_to_sid

This does not merge a winbind communication error into
"global_sid_NULL" (S-1-0-0), which by the way non-intuitively does not
go along with is_null_sid(). Instead, this just touches the output sid
when winbind returned success. This success might well be a negative
mapping indicated by S-0-0, which *is* is_null_sid()...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813
(cherry picked from commit ef706a3e63b3e25edd27e0f99c3e2d8ff7209cb6)
source3/lib/winbind_util.c
source3/lib/winbind_util.h