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>
Tue, 12 Mar 2019 12:47:30 +0000 (12:47 +0000)
commit713c48eb9bd79e7b25b31e206ce21daabe2c4f9d
tree0e2f518f5a191eb0e0e14cc025c7e07684b31e3c
parent5bf41f42bb32f427ab46a95bfde91a893f0e5d40
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