winbind: Fix idmap initialization
commit63552f1c4c05a710143f12c2269754d0e547d945
authorVolker Lendecke <vl@samba.org>
Thu, 22 Jan 2015 12:08:52 +0000 (22 12:08 +0000)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 22 Jan 2015 16:58:16 +0000 (22 17:58 +0100)
tree30a14552c9441d1e4f14be05f874dfc79eac5cd1
parent0cb9b28acb7008cd30c6de3add9876eb5607a5a6
winbind: Fix idmap initialization

The fix is in the sscanf line: %u in the sscanf format mandates the use of
a pointer to an "unsigned". idmap_domain->[low|high]_id are uint32_t. On
little endian 64-bit this might at least put the correct values into
low_id and high_id, but might overwrite the read_only bit set earlier,
depending on structure alignment and packing. On big endian 64-bit,
this will just fail.

Automatic conversion to uint32_t will happen only at assignment, not
when you take a pointer of such a thing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 22 17:58:16 CET 2015 on sn-devel-104
source3/winbindd/idmap.c