dsdb-acl: Change error codes so we pass acl.py test for SeMachineAccountPrivilege

Change-Id: I2155dd97789ac9a61f6cbedaad4587f0fcc76052
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
selftest: Improve acl.py test to pass against Windows and Samba for SeMachineAccountPrivilege tests

The only difference between Windows and Samba is that Windows users already have the privilege.  We do not yet set that by default in Samba

Change-Id: I63acd7010113a65f2f88d08c11d08ebacf6ead86
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
selftest: Fix and run machine_account_privilege.py in make test

This test still needs work, but at least this demonstrates how to hook it in.

Andrew Bartlett

Change-Id: I2afe0e4e5eb98c513b0bbe3db10cdd12ebb04125
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
dsdb-tests: Add comparison of the SD between a computer created normally and created with this special right

This currently fails against windows 2012R2, because it shows that we MUST NOT give the creator of the computer object the SD and DT rights, which are Delete and Delete Tree, over the computer account they create.  We need to specifically filter these out.

Andrew Bartlett

Change-Id: I3e7d0d6bf63104b06d35637ae4664260000e94d1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
dsdb-tests: Respect expected and observed parameter order

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
dsdb-tests: Remote SEC_STD_DELETE and SEC_ADS_DELETE_TREE bits from reference SD

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
dsdb-tests: Search created computer account with subtree scope

Accounts created through LDAP interface will be in the custom OU and accounts
created through SAM-R in the default computers container

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
dsdb-acl: Generate proper security descriptor when seMachinePrivilege is used

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
s4:dsdb/util_samr: Check ldb error string to return proper error code

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>