The branch, master has been updated
via 51f38ac7f3d s3:utils: Fix 'Usage:' for 'net ads enctypes'
via 445a8f25925 s3:utils: Fix 'Usage:' for 'net ads setspn'
via 1ad19c2db45 docs-xml:manpages: Fix doc for 'net ads setspn'
via 0cb2cb8137d docs-xml:manpages: Fix doc for 'net ads enctypes'
via 579aae2b18c docs-xml:manpages: Add missing ')' to ADS KEYTAB
via c4377a987e3 s3,s4: Make case spelling of sAMAccountName consistent
from 062dc07e9b9 s3-libnet: avoid using lp_dns_hostname() in join code
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 51f38ac7f3df4b3de9106b9b4861417ff317b14b
Author: Pavel Filipenský <[email protected]>
Date: Fri Jan 31 12:17:28 2025 +0100
s3:utils: Fix 'Usage:' for 'net ads enctypes'
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
Autobuild-User(master): Pavel Filipensky <[email protected]>
Autobuild-Date(master): Tue Feb 4 09:35:58 UTC 2025 on atb-devel-224
commit 445a8f259253734215e32c0349f559996a9047e6
Author: Pavel Filipenský <[email protected]>
Date: Fri Jan 31 11:14:07 2025 +0100
s3:utils: Fix 'Usage:' for 'net ads setspn'
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
commit 1ad19c2db4533c538fcfdc58816107c5baa05a40
Author: Pavel Filipenský <[email protected]>
Date: Fri Jan 31 11:22:24 2025 +0100
docs-xml:manpages: Fix doc for 'net ads setspn'
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
commit 0cb2cb8137dfd8a885198539f97749e5ee3f7194
Author: Pavel Filipenský <[email protected]>
Date: Fri Jan 31 10:43:34 2025 +0100
docs-xml:manpages: Fix doc for 'net ads enctypes'
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
commit 579aae2b18ca980487cf94f1987c5e759251f994
Author: Pavel Filipenský <[email protected]>
Date: Fri Jan 31 12:07:18 2025 +0100
docs-xml:manpages: Add missing ')' to ADS KEYTAB
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
commit c4377a987e308f2f4639d8e604b9d9dccc9b6704
Author: Pavel Filipenský <[email protected]>
Date: Thu Jan 30 22:25:29 2025 +0100
s3,s4: Make case spelling of sAMAccountName consistent
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
auth/credentials/credentials_secrets.c | 2 +-
docs-xml/manpages/net.8.xml | 30 +++++++++++++++-----------
source3/libads/ldap.c | 14 ++++++------
source3/libads/ldap_user.c | 2 +-
source3/libnet/libnet_dssync_keytab.c | 4 ++--
source3/passdb/pdb_samba_dsdb.c | 20 ++++++++---------
source3/utils/net_ads.c | 24 ++++++++++-----------
source4/dsdb/common/util_samr.c | 4 ++--
source4/dsdb/samdb/cracknames.c | 2 +-
source4/dsdb/samdb/ldb_modules/acl.c | 2 +-
source4/dsdb/samdb/ldb_modules/samldb.c | 4 ++--
source4/dsdb/samdb/ldb_modules/update_keytab.c | 2 +-
source4/kdc/db-glue.c | 2 +-
source4/rpc_server/lsa/dcesrv_lsa.c | 4 ++--
source4/rpc_server/netlogon/dcerpc_netlogon.c | 4 ++--
source4/rpc_server/samr/dcesrv_samr.c | 12 +++++------
source4/rpc_server/samr/samr_password.c | 4 ++--
source4/torture/libnet/utils.c | 4 ++--
18 files changed, 72 insertions(+), 68 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/credentials/credentials_secrets.c
b/auth/credentials/credentials_secrets.c
index 906f3ff1a21..5f4c6cd1ed1 100644
--- a/auth/credentials/credentials_secrets.c
+++ b/auth/credentials/credentials_secrets.c
@@ -129,7 +129,7 @@ static NTSTATUS cli_credentials_set_secrets_lct(struct
cli_credentials *cred,
cli_credentials_set_password_last_changed_time(cred, lct);
- machine_account = ldb_msg_find_attr_as_string(msg, "samAccountName",
NULL);
+ machine_account = ldb_msg_find_attr_as_string(msg, "sAMAccountName",
NULL);
if (!machine_account) {
machine_account = ldb_msg_find_attr_as_string(msg,
"servicePrincipalName", NULL);
diff --git a/docs-xml/manpages/net.8.xml b/docs-xml/manpages/net.8.xml
index 5ff7a6eccb0..ca34d322512 100644
--- a/docs-xml/manpages/net.8.xml
+++ b/docs-xml/manpages/net.8.xml
@@ -1579,7 +1579,7 @@ No changes are made to the computer AD account.
</refsect2>
<refsect2>
-<title>(Removed!) ADS KEYTAB <replaceable>ADD</replaceable>
<replaceable>(principal | machine | serviceclass | windows
SPN</replaceable></title>
+<title>(Removed!) ADS KEYTAB <replaceable>ADD</replaceable>
<replaceable>(principal | machine | serviceclass | windows
SPN)</replaceable></title>
<para>
This command is no longer available in Samba 4.21.0 and newer. See
<smbconfoption name="sync machine password to keytab"/> for replacement.
@@ -1641,7 +1641,7 @@ available.
</refsect2>
<refsect2>
-<title>(Removed!) ADS KEYTAB <replaceable>DELETE</replaceable>
<replaceable>(principal | machine | serviceclass | windows
SPN</replaceable></title>
+<title>(Removed!) ADS KEYTAB <replaceable>DELETE</replaceable>
<replaceable>(principal | machine | serviceclass | windows
SPN)</replaceable></title>
<para>
This command is no longer available in Samba 4.21.0 and newer. See
<smbconfoption name="sync machine password to keytab"/> for replacement.
@@ -1661,7 +1661,7 @@ net ads keytab create
</refsect2>
<refsect2>
-<title>(Removed!) ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable>
<replaceable>(principal | machine | serviceclass | windows
SPN</replaceable></title>
+<title>(Removed!) ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable>
<replaceable>(principal | machine | serviceclass | windows
SPN)</replaceable></title>
<para>
This command is no longer available in Samba 4.21.0 and newer. See
<smbconfoption name="sync machine password to keytab"/> for replacement.
</para>
@@ -1710,35 +1710,37 @@ the following entry types;
</refsect2>
<refsect2>
-<title>ADS setspn <replaceable>SETSPN LIST [machine]</replaceable></title>
+<title>ADS SETSPN LIST <replaceable>[machine]</replaceable></title>
<para>
Lists the Windows SPNs stored in the 'machine' Windows AD Computer object.
If 'machine' is not specified then computer account for this client is used
instead.
</para>
+<para>Example: <userinput>net ads setspn list --machine-pass</userinput></para>
</refsect2>
<refsect2>
-<title>ADS setspn <replaceable>SETSPN ADD SPN [machine]</replaceable></title>
+<title>ADS SETSPN ADD <replaceable>[machine] SPN</replaceable></title>
<para>
Adds the specified Windows SPN to the 'machine' Windows AD Computer object.
If 'machine' is not specified then computer account for this client is used
instead.
</para>
+<para>Example: <userinput>net ads setspn add computername
host/computername.example.com -U Administrator%Passw0rd</userinput></para>
</refsect2>
<refsect2>
-<title>ADS setspn <replaceable>SETSPN DELETE SPN
[machine]</replaceable></title>
+<title>ADS SETSPN DELETE <replaceable>[machine] SPN</replaceable></title>
<para>
DELETE the specified Window SPN from the 'machine' Windows AD Computer
object. If 'machine' is not specified then computer account for this
- client is used
- instead.
+ client is used instead.
</para>
+<para>Example: <userinput>net ads setspn delete computername
host/computername.example.com -U Administrator%Passw0rd</userinput></para>
</refsect2>
@@ -1765,6 +1767,8 @@ the following entry types;
<para>0x00000004 RC4-HMAC</para>
<para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
<para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
+<para>0x00000020 AES256-CTS-HMAC-SHA1-96-SK</para>
+<para>0x00080000 RESOURCE-SID-COMPRESSION-DISABLED</para>
</refsect2>
@@ -1772,10 +1776,10 @@ the following entry types;
<title>ADS ENCTYPES LIST
<replaceable><ACCOUNTNAME></replaceable></title>
<para>
- List the value of the "msDS-SupportedEncryptionTypes" attribute of a
given account.
+ List the value of the "msDS-SupportedEncryptionTypes" attribute of a
given account. Computer account needs '$' at the end.
</para>
-<para>Example: <userinput>net ads enctypes list Computername</userinput></para>
+<para>Example: <userinput>net ads enctypes list Computername$
--machine-pass</userinput></para>
</refsect2>
@@ -1783,10 +1787,10 @@ the following entry types;
<title>ADS ENCTYPES SET <replaceable><ACCOUNTNAME></replaceable>
<replaceable>[enctypes]</replaceable></title>
<para>
- Set the value of the "msDS-SupportedEncryptionTypes" attribute of the
LDAP object of ACCOUNTNAME to a given value. If the value is omitted, the value
is set to 31 which enables all the currently supported encryption types.
+ Set the value of the "msDS-SupportedEncryptionTypes" attribute of the
LDAP object of ACCOUNTNAME to a given value. If the value is omitted, the value
is set to 28 which enables RC4-HMAC, AES128-CTS-HMAC-SHA1-96 and
AES256-CTS-HMAC-SHA1-96 encryption types.
</para>
-<para>Example: <userinput>net ads enctypes set Computername
24</userinput></para>
+<para>Example: <userinput>net ads enctypes set Computername$ 24
--machine-pass</userinput></para>
</refsect2>
@@ -1797,7 +1801,7 @@ the following entry types;
Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP
object of ACCOUNTNAME.
</para>
-<para>Example: <userinput>net ads enctypes set Computername
24</userinput></para>
+<para>Example: <userinput>net ads enctypes delete Computername$
--machine-pass</userinput></para>
</refsect2>
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index e30f84e3ffb..016402d5ca6 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1854,7 +1854,7 @@ char *ads_parent_dn(const char *dn)
const char *attrs[] = {
/* This is how Windows checks for machine accounts */
"objectClass",
- "SamAccountName",
+ "sAMAccountName",
"userAccountControl",
"DnsHostName",
"ServicePrincipalName",
@@ -1875,7 +1875,7 @@ char *ads_parent_dn(const char *dn)
/* the easiest way to find a machine account anywhere in the tree
is to look for hostname$ */
- expr = talloc_asprintf(frame, "(samAccountName=%s$)", machine);
+ expr = talloc_asprintf(frame, "(sAMAccountName=%s$)", machine);
if (expr == NULL) {
status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
goto done;
@@ -2717,7 +2717,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads,
const char *dns_domain_name)
{
ADS_STATUS ret;
- char *samAccountName = NULL;
+ char *samaccountname = NULL;
char *controlstr = NULL;
TALLOC_CTX *ctx = NULL;
ADS_MODLIST mods;
@@ -2791,8 +2791,8 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads,
/* Create machine account */
- samAccountName = talloc_asprintf(ctx, "%s$", machine_name);
- if (samAccountName == NULL) {
+ samaccountname = talloc_asprintf(ctx, "%s$", machine_name);
+ if (samaccountname == NULL) {
ret = ADS_ERROR(LDAP_NO_MEMORY);
goto done;
}
@@ -2869,7 +2869,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads,
}
ads_mod_str(ctx, &mods, "objectClass", "Computer");
- ads_mod_str(ctx, &mods, "SamAccountName", samAccountName);
+ ads_mod_str(ctx, &mods, "sAMAccountName", samaccountname);
ads_mod_str(ctx, &mods, "userAccountControl", controlstr);
ads_mod_str(ctx, &mods, "DnsHostName", dns_hostname);
ads_mod_strlist(ctx, &mods, "ServicePrincipalName", spn_array);
@@ -2905,7 +2905,7 @@ ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const
char *machine_name,
char *computer_rdn = NULL;
bool need_move = False;
- if (asprintf(&filter, "(samAccountName=%s$)", machine_name) == -1) {
+ if (asprintf(&filter, "(sAMAccountName=%s$)", machine_name) == -1) {
rc = ADS_ERROR(LDAP_NO_MEMORY);
goto done;
}
diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c
index 55421009a7b..40c87c833d3 100644
--- a/source3/libads/ldap_user.c
+++ b/source3/libads/ldap_user.c
@@ -37,7 +37,7 @@
return ADS_ERROR(LDAP_NO_MEMORY);
}
- if (asprintf(&ldap_exp, "(samAccountName=%s)", escaped_user) == -1) {
+ if (asprintf(&ldap_exp, "(sAMAccountName=%s)", escaped_user) == -1) {
TALLOC_FREE(escaped_user);
return ADS_ERROR(LDAP_NO_MEMORY);
}
diff --git a/source3/libnet/libnet_dssync_keytab.c
b/source3/libnet/libnet_dssync_keytab.c
index 0c437da2f43..66c5688c211 100644
--- a/source3/libnet/libnet_dssync_keytab.c
+++ b/source3/libnet/libnet_dssync_keytab.c
@@ -427,11 +427,11 @@ static NTSTATUS parse_user(TALLOC_CTX *mem_ctx,
status = store_or_fetch_attribute(mem_ctx,
ctx,
object_dn,
- "SAMACCOUNTNAME",
+ "sAMAccountName",
&name);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("store_or_fetch_attribute(%s, %s, %s): %s\n",
- object_dn, "SAMACCOUNTNAME", name,
+ object_dn, "sAMAccountName", name,
nt_errstr(status));
return status;
}
diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c
index bc3fa743b08..fd75419db73 100644
--- a/source3/passdb/pdb_samba_dsdb.c
+++ b/source3/passdb/pdb_samba_dsdb.c
@@ -197,9 +197,9 @@ static NTSTATUS pdb_samba_dsdb_init_sam_from_priv(struct
pdb_methods *m,
uint64_t n;
const DATA_BLOB *blob;
- str = ldb_msg_find_attr_as_string(msg, "samAccountName", NULL);
+ str = ldb_msg_find_attr_as_string(msg, "sAMAccountName", NULL);
if (str == NULL) {
- DEBUG(10, ("no samAccountName\n"));
+ DEBUG(10, ("no sAMAccountName\n"));
goto fail;
}
pdb_set_username(sam, str, PDB_SET);
@@ -531,7 +531,7 @@ static int pdb_samba_dsdb_replace_by_sam(struct
pdb_samba_dsdb_state *state,
}
if (need_update(sam, PDB_USERNAME)) {
- ret |= ldb_msg_add_string(msg, "samAccountName",
+ ret |= ldb_msg_add_string(msg, "sAMAccountName",
pdb_get_username(sam));
}
@@ -742,7 +742,7 @@ static NTSTATUS pdb_samba_dsdb_getsampwnam(struct
pdb_methods *m,
m->private_data, struct pdb_samba_dsdb_state);
return pdb_samba_dsdb_getsampwfilter(m, state, sam_acct,
-
"(&(samaccountname=%s)(objectclass=user))",
+
"(&(sAMAccountName=%s)(objectclass=user))",
username);
}
@@ -932,7 +932,7 @@ static NTSTATUS pdb_samba_dsdb_getgrfilter(struct
pdb_methods *m, GROUP_MAP *map
{
struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
m->private_data, struct pdb_samba_dsdb_state);
- const char *attrs[] = { "objectClass", "objectSid", "description",
"samAccountName", "groupType",
+ const char *attrs[] = { "objectClass", "objectSid", "description",
"sAMAccountName", "groupType",
NULL };
struct ldb_message *msg;
va_list ap;
@@ -1015,7 +1015,7 @@ static NTSTATUS pdb_samba_dsdb_getgrfilter(struct
pdb_methods *m, GROUP_MAP *map
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- str = ldb_msg_find_attr_as_string(msg, "samAccountName",
+ str = ldb_msg_find_attr_as_string(msg, "sAMAccountName",
NULL);
if (str == NULL) {
talloc_free(tmp_ctx);
@@ -1095,7 +1095,7 @@ static NTSTATUS pdb_samba_dsdb_getgrnam(struct
pdb_methods *m, GROUP_MAP *map,
NTSTATUS status;
filter = talloc_asprintf(talloc_tos(),
- "(&(samaccountname=%s)(objectclass=group))",
+ "(&(sAMAccountName=%s)(objectclass=group))",
name);
if (filter == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -1980,7 +1980,7 @@ static bool pdb_samba_dsdb_search_filter(struct
pdb_methods *m,
e->acct_flags = samdb_result_acct_flags(res->msgs[i],
"userAccountControl");
e->account_name = ldb_msg_find_attr_as_string(
- res->msgs[i], "samAccountName", NULL);
+ res->msgs[i], "sAMAccountName", NULL);
if (e->account_name == NULL) {
talloc_free(tmp_ctx);
return false;
@@ -3173,7 +3173,7 @@ static NTSTATUS add_trust_user(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
- ret = ldb_msg_add_fmt(msg, "samAccountName", "%s$", netbios_name);
+ ret = ldb_msg_add_fmt(msg, "sAMAccountName", "%s$", netbios_name);
if (ret != LDB_SUCCESS) {
return NT_STATUS_NO_MEMORY;
}
@@ -3518,7 +3518,7 @@ static NTSTATUS delete_trust_user(TALLOC_CTX *mem_ctx,
ldb_get_default_basedn(state->ldb),
&msgs,
attrs,
- "samAccountName=%s$",
+ "sAMAccountName=%s$",
trust_user);
if (ret > 1) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index d778ec5f105..0f1193d7ec0 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -3345,7 +3345,7 @@ static int net_ads_setspn_list(struct net_context *c,
if (c->display_usage) {
d_printf("%s\n%s",
_("Usage:"),
- _("net ads setspn list <machinename>\n"));
+ _("net ads setspn list [machinename]\n"));
TALLOC_FREE(tmp_ctx);
return -1;
}
@@ -3378,7 +3378,7 @@ static int net_ads_setspn_add(struct net_context *c, int
argc, const char **argv
if (c->display_usage || argc < 1) {
d_printf("%s\n%s",
_("Usage:"),
- _("net ads setspn add <machinename> SPN\n"));
+ _("net ads setspn add [machinename] spn\n"));
TALLOC_FREE(tmp_ctx);
return -1;
}
@@ -3411,7 +3411,7 @@ static int net_ads_setspn_delete(struct net_context *c,
int argc, const char **a
if (c->display_usage || argc < 1) {
d_printf("%s\n%s",
_("Usage:"),
- _("net ads setspn delete <machinename> SPN\n"));
+ _("net ads setspn delete [machinename] spn\n"));
TALLOC_FREE(tmp_ctx);
return -1;
}
@@ -3441,7 +3441,7 @@ int net_ads_setspn(struct net_context *c, int argc, const
char **argv)
net_ads_setspn_list,
NET_TRANSPORT_ADS,
N_("List Service Principal Names (SPN)"),
- N_("net ads setspn list machine\n"
+ N_("net ads setspn list [machine]\n"
" List Service Principal Names (SPN)")
},
{
@@ -3449,7 +3449,7 @@ int net_ads_setspn(struct net_context *c, int argc, const
char **argv)
net_ads_setspn_add,
NET_TRANSPORT_ADS,
N_("Add Service Principal Names (SPN)"),
- N_("net ads setspn add machine spn\n"
+ N_("net ads setspn add [machine] spn\n"
" Add Service Principal Names (SPN)")
},
{
@@ -3457,7 +3457,7 @@ int net_ads_setspn(struct net_context *c, int argc, const
char **argv)
net_ads_setspn_delete,
NET_TRANSPORT_ADS,
N_("Delete Service Principal Names (SPN)"),
- N_("net ads setspn delete machine spn\n"
+ N_("net ads setspn delete [machine] spn\n"
" Delete Service Principal Names (SPN)")
},
{NULL, NULL, 0, NULL, NULL}
@@ -3561,7 +3561,7 @@ static int net_ads_enctypes_list(struct net_context *c,
int argc, const char **a
if (c->display_usage || (argc < 1)) {
d_printf( "%s\n"
- "net ads enctypes list\n"
+ "net ads enctypes list <account_name>\n"
" %s\n",
_("Usage:"),
_("List supported enctypes"));
@@ -3743,7 +3743,7 @@ static int net_ads_enctypes(struct net_context *c, int
argc, const char **argv)
net_ads_enctypes_list,
NET_TRANSPORT_ADS,
N_("List the supported encryption types"),
- N_("net ads enctypes list\n"
+ N_("net ads enctypes list <account_name>\n"
" List the supported encryption types")
},
{
@@ -3751,16 +3751,16 @@ static int net_ads_enctypes(struct net_context *c, int
argc, const char **argv)
net_ads_enctypes_set,
NET_TRANSPORT_ADS,
N_("Set the supported encryption types"),
- N_("net ads enctypes set\n"
+ N_("net ads enctypes set <account_name> [enctypes]\n"
" Set the supported encryption types")
},
{
"delete",
net_ads_enctypes_delete,
NET_TRANSPORT_ADS,
- N_("Delete the supported encryption types"),
- N_("net ads enctypes delete\n"
- " Delete the supported encryption types")
+ N_("Delete the msDS-SupportedEncryptionTypes
attribute"),
+ N_("net ads enctypes delete <account_name>\n"
+ " Delete the LDAP attribute")
},
{NULL, NULL, 0, NULL, NULL}
diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c
index 0a48fcf5b92..fb7571cbef3 100644
--- a/source4/dsdb/common/util_samr.c
+++ b/source4/dsdb/common/util_samr.c
@@ -559,7 +559,7 @@ NTSTATUS dsdb_lookup_rids(struct ldb_context *ldb,
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
- rc = dsdb_search_one(ldb, tmp_ctx, &msg, dn, LDB_SCOPE_BASE,
attrs, 0, "samAccountName=*");
+ rc = dsdb_search_one(ldb, tmp_ctx, &msg, dn, LDB_SCOPE_BASE,
attrs, 0, "sAMAccountName=*");
if (rc == LDB_ERR_NO_SUCH_OBJECT) {
continue;
} else if (rc != LDB_SUCCESS) {
@@ -567,7 +567,7 @@ NTSTATUS dsdb_lookup_rids(struct ldb_context *ldb,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- names[i] = ldb_msg_find_attr_as_string(msg, "samAccountName",
NULL);
+ names[i] = ldb_msg_find_attr_as_string(msg, "sAMAccountName",
NULL);
if (names[i] == NULL) {
DEBUG(10, ("no samAccountName\n"));
continue;
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index 91e02f9d94d..c04d4aed572 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -982,7 +982,7 @@ static WERROR DsCrackNameOneFilter(struct ldb_context
*sam_ctx, TALLOC_CTX *mem_
const char * const _result_attrs_spn[] = { "servicePrincipalName",
NULL};
const char * const _domain_attrs_display[] = { "ncName", "dnsRoot",
NULL};
- const char * const _result_attrs_display[] = { "displayName",
"samAccountName", NULL};
+ const char * const _result_attrs_display[] = { "displayName",
"sAMAccountName", NULL};
const char * const _domain_attrs_sid[] = { "ncName", "dnsRoot", NULL};
const char * const _result_attrs_sid[] = { "objectSid", NULL};
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c
b/source4/dsdb/samdb/ldb_modules/acl.c
index 720d71c7a4a..3e5588c95bb 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -645,7 +645,7 @@ static int acl_check_spn(TALLOC_CTX *mem_ctx,
const struct ldb_message *search_res = NULL;
static const char *acl_attrs[] = {
- "samAccountName",
+ "sAMAccountName",
"dnsHostName",
"userAccountControl",
NULL
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c
b/source4/dsdb/samdb/ldb_modules/samldb.c
index 30f4fddc098..99d183e14e5 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -547,7 +547,7 @@ static int samldb_sam_accountname_valid_check(struct
samldb_ctx *ac)
ret = dsdb_get_expected_new_values(ac,
ac->msg,
- "samAccountName",
+ "sAMAccountName",
&el,
ac->req->operation);
if (ret != LDB_SUCCESS) {
@@ -565,7 +565,7 @@ static int samldb_sam_accountname_valid_check(struct
samldb_ctx *ac)
}
}
- ret = samldb_unique_attr_check(ac, "samAccountName", NULL,
+ ret = samldb_unique_attr_check(ac, "sAMAccountName", NULL,
ldb_get_default_basedn(
ldb_module_get_ctx(ac->module)));
diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c
b/source4/dsdb/samdb/ldb_modules/update_keytab.c
index 780eb81d998..ecbae8057ba 100644
--- a/source4/dsdb/samdb/ldb_modules/update_keytab.c
+++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c
@@ -432,7 +432,7 @@ static int update_kt_prepare_commit(struct ldb_module
*module)
krb5_ret = smb_krb5_update_keytab(tmp_ctx,
smb_krb5_context->krb5_context,
keytab_name_from_msg(tmp_ctx,
ldb, p->msg),
-
ldb_msg_find_attr_as_string(p->msg, "samAccountName", NULL),
+
ldb_msg_find_attr_as_string(p->msg, "sAMAccountName", NULL),
realm, SPNs, num_SPNs,
ldb_msg_find_attr_as_string(p->msg, "saltPrincipal", NULL),
ldb_msg_find_attr_as_string(p->msg, "secret", NULL),
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index dd1c95cb925..e626f230684 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -1232,7 +1232,7 @@ static krb5_error_code
samba_kdc_message2entry(krb5_context context,
config_kdc_enctypes != 0 ?
config_kdc_enctypes :
ENC_ALL_TYPES;
- const char *samAccountName = ldb_msg_find_attr_as_string(msg,
"samAccountName", NULL);
+ const char *samAccountName = ldb_msg_find_attr_as_string(msg,
"sAMAccountName", NULL);
--
Samba Shared Repository