1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

netcmd: models: move group msa membership default to constants

This means the constant can be imported and used by the tests

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Rob van der Linde 2024-02-23 18:02:56 +13:00 committed by Andrew Bartlett
parent dccafff1b3
commit 611403d401
2 changed files with 5 additions and 1 deletions

View File

@ -23,3 +23,6 @@
# Keeps track of registered models.
# This gets populated by the ModelMeta class.
MODELS = {}
# Default SDDL for GroupManagedServiceAccount msDS-GroupMSAMembership field.
GROUP_MSA_MEMBERSHIP_DEFAULT = "O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;LA)"

View File

@ -24,6 +24,7 @@ from samba.dcerpc import security
from samba.dsdb import DS_GUID_MANAGED_SERVICE_ACCOUNTS_CONTAINER
from .computer import Computer
from .constants import GROUP_MSA_MEMBERSHIP_DEFAULT
from .exceptions import FieldError
from .fields import BinaryField, EnumField, IntegerField, SDDLField, StringField
from .types import SupportedEncryptionTypes
@ -34,7 +35,7 @@ class GroupManagedServiceAccount(Computer):
managed_password_interval = IntegerField("msDS-ManagedPasswordInterval")
dns_host_name = StringField("dNSHostName")
group_msa_membership = SDDLField("msDS-GroupMSAMembership",
default="O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;LA)")
default=GROUP_MSA_MEMBERSHIP_DEFAULT)
managed_password_id = BinaryField("msDS-ManagedPasswordId",
readonly=True, hidden=True)
managed_password_previous_id = BinaryField("msDS-ManagedPasswordPreviousId",