[PATCH] libds flagmask rename
Ralph Böhme
slow at samba.org
Tue Mar 13 16:08:50 UTC 2018
Hi!
Attached is a small improvemtn for libds. Please review&push if ok. Thanks!
-slow
--
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
GPG Key Fingerprint: FAE2 C608 8A24 2520 51C5
59E4 AA1E 9B71 2639 9E46
-------------- next part --------------
From d3dae412f1661c913f2e8d4028c5bf7690aca204 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Thu, 8 Mar 2018 17:34:08 +0100
Subject: [PATCH 1/2] libds: rename UF_MACHINE_ACCOUNT_MASK to
UF_TRUST_ACCOUNT_MASK
The name UF_TRUST_ACCOUNT_MASK better reflects the use case and it's not
yet used.
Signed-off-by: Ralph Boehme <slow at samba.org>
---
libds/common/flags.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libds/common/flags.h b/libds/common/flags.h
index d431bd54d90..d436f2bafd8 100644
--- a/libds/common/flags.h
+++ b/libds/common/flags.h
@@ -53,7 +53,7 @@
#define UF_PARTIAL_SECRETS_ACCOUNT 0x04000000
#define UF_USE_AES_KEYS 0x08000000
-#define UF_MACHINE_ACCOUNT_MASK (\
+#define UF_TRUST_ACCOUNT_MASK (\
UF_INTERDOMAIN_TRUST_ACCOUNT |\
UF_WORKSTATION_TRUST_ACCOUNT |\
UF_SERVER_TRUST_ACCOUNT \
--
2.13.6
From 06d4e467bf1b191820a28545cdab330a1ab3e178 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Thu, 8 Mar 2018 17:35:15 +0100
Subject: [PATCH 2/2] s4: dsdb/password_hash: use UF_TRUST_ACCOUNT_MASK
Signed-off-by: Ralph Boehme <slow at samba.org>
---
source4/dsdb/samdb/ldb_modules/password_hash.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 1ddafb34101..1e9661be33f 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -3211,9 +3211,7 @@ static int setup_io(struct ph_context *ac,
/* Only non-trust accounts have restrictions (possibly this test is the
* wrong way around, but we like to be restrictive if possible */
- io->u.restrictions = !(io->u.userAccountControl
- & (UF_INTERDOMAIN_TRUST_ACCOUNT | UF_WORKSTATION_TRUST_ACCOUNT
- | UF_SERVER_TRUST_ACCOUNT));
+ io->u.restrictions = !(io->u.userAccountControl & UF_TRUST_ACCOUNT_MASK);
if (io->u.is_krbtgt) {
io->u.restrictions = 0;
--
2.13.6
More information about the samba-technical
mailing list