summaryrefslogtreecommitdiff
path: root/source3/auth/auth_domain.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-11-26 06:47:04 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-11-26 06:47:04 +0000
commit4499007e45637f172c4afb0ec2e048cf795a3cbe (patch)
tree3baebd215a4f88e90800c8811f54f916ceb2c526 /source3/auth/auth_domain.c
parenta131c2cfdcd4e10d85e21bcf4b3e45b99054a96c (diff)
downloadsamba-4499007e45637f172c4afb0ec2e048cf795a3cbe.tar.gz
samba-4499007e45637f172c4afb0ec2e048cf795a3cbe.tar.bz2
samba-4499007e45637f172c4afb0ec2e048cf795a3cbe.zip
A number of things to clean up the auth subsytem a bit...
We now default encrypt passwords = yes We now check plaintext passwords (however aquired) with the 'sam' backend rather than unix, if encrypt passwords = yes. (this kills off the 'local' backed. The sam backend may be renamed in its place) The new 'samstrict' wrapper backend checks that the user's domain is one of our netbios aliases - this ensures that we don't get fallback crazies with security = domain. Similarly, the code in the 'ntdomain' and 'smbserver' backends now checks that the user was not local before contacting the DC. The default ordering has changed, we now check the local stuff first - but becouse of the changes above, we will really only ever contact one auth source. Andrew Bartlett (This used to be commit e89b47f65e7eaf5eb288a3d6ba2d3d115c628e7e)
Diffstat (limited to 'source3/auth/auth_domain.c')
-rw-r--r--source3/auth/auth_domain.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index c605356af8..a41e43bd82 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -285,17 +285,6 @@ static NTSTATUS domain_client_validate(const auth_usersupplied_info *user_info,
NTSTATUS status;
struct passwd *pass;
- /*
- * Check that the requested domain is not our own machine name.
- * If it is, we should never check the PDC here, we use our own local
- * password file.
- */
-
- if(strequal(user_info->domain.str, global_myname)) {
- DEBUG(3,("domain_client_validate: Requested domain was for this machine.\n"));
- return NT_STATUS_LOGON_FAILURE;
- }
-
/*
* At this point, smb_apasswd points to the lanman response to
* the challenge in local_challenge, and smb_ntpasswd points to
@@ -445,6 +434,22 @@ static NTSTATUS check_ntdomain_security(void *my_private_data,
unsigned char trust_passwd[16];
time_t last_change_time;
+ if (!user_info || !server_info || !auth_info) {
+ DEBUG(1,("check_ntdomain_security: Critical variables not present. Failing.\n"));
+ return NT_STATUS_LOGON_FAILURE;
+ }
+
+ /*
+ * Check that the requested domain is not our own machine name.
+ * If it is, we should never check the PDC here, we use our own local
+ * password file.
+ */
+
+ if(is_netbios_alias_or_name(user_info->domain.str)) {
+ DEBUG(3,("check_ntdomain_security: Requested domain was for this machine.\n"));
+ return NT_STATUS_LOGON_FAILURE;
+ }
+
become_root();
/*