provision: Fallback to assumption root-UID==zero
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 2 Oct 2018 19:56:45 +0000 (08:56 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 31 May 2019 05:18:21 +0000 (05:18 +0000)
commitf2f0ebb073353196f381fe2e01e4001983710255
tree66b050680034c7dd5ba371f75d9b313bead1f790
parent900af92e8684ba9c13d28f0cbbe8ab599a9b3b44
provision: Fallback to assumption root-UID==zero

Which is not a terrible assumption to make. The super-user on linux will
always have UID of zero, however, the super-user will not necessarily be
called "root".

This makes the provision/join commands work better when run in a
container. (And while deploying Samba in a container is perhaps not the
smartest move, this gives us some versatility when testing Samba).

This is needed to get the provision commands working in the domain_backup
tests when run with USE_NAMESPACES=1.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/provision/__init__.py