This is following the same design as other similar properties like samdb.domain_sid, only it doesn't need a setter.
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
msg = self.search(base="", scope=ldb.SCOPE_BASE, attrs=["tokenGroups"])[0]
return str(ndr_unpack(security.dom_sid, msg["tokenGroups"][0]))
+ connecting_user_sid = property(get_connecting_user_sid,
+ doc="SID of the connecting user")
+
def set_invocation_id(self, invocation_id):
"""Set the invocation id for this SamDB handle.
cls.base_dn = f"CN=Managed Service Accounts,{cls.samdb.domain_dn()}"
cls.user_dn = f"CN={cls.username},{cls.base_dn}"
- connecting_user_sid = cls.samdb.get_connecting_user_sid()
+ connecting_user_sid = cls.samdb.connecting_user_sid
domain_sid = security.dom_sid(cls.samdb.get_domain_sid())
allow_sddl = f"O:SYD:(A;;RP;;;{connecting_user_sid})"