[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sat Dec 5 00:25:15 UTC 2015


The branch, master has been updated
       via  dd9b12a ntlm_auth: Add --offline-logon
      from  bd569c3 docs-xml: Document range parameter for idmap_autorid

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit dd9b12ad45e0b2d9013c0843c54c306479efc220
Author: Wolfgang Ocker <weo at recco.de>
Date:   Fri Dec 4 11:05:30 2015 +0100

    ntlm_auth: Add --offline-logon
    
    Signed-off-by: Wolfgang Ocker <weo at recco.de>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Sat Dec  5 01:24:56 CET 2015 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/ntlm_auth.1.xml |  6 ++++++
 source3/utils/ntlm_auth.c         | 11 ++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/ntlm_auth.1.xml b/docs-xml/manpages/ntlm_auth.1.xml
index 97477af..3dfcc03 100644
--- a/docs-xml/manpages/ntlm_auth.1.xml
+++ b/docs-xml/manpages/ntlm_auth.1.xml
@@ -381,6 +381,12 @@
 	</varlistentry>
 
 	<varlistentry>
+	<term>--offline-logon</term>
+	<listitem><para>Allow offline logons for plain text auth.
+	</para></listitem>
+	</varlistentry>
+
+	<varlistentry>
 	<term>--configfile=<configuration file></term>
 	<listitem><para>The file specified contains the
 	configuration details required by the server.  The
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index a5fd249..4878aa1 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -166,6 +166,7 @@ static DATA_BLOB opt_nt_response;
 static int request_lm_key;
 static int request_user_session_key;
 static int use_cached_creds;
+static int offline_logon;
 
 static const char *require_membership_of;
 static const char *require_membership_of_sid;
@@ -463,6 +464,10 @@ static bool check_plaintext_auth(const char *user, const char *pass,
 			sizeof(request.data.auth.require_membership_of_sid));
 	}
 
+	if (offline_logon) {
+		request.flags |= WBFLAG_PAM_CACHED_LOGIN;
+	}
+
 	result = winbindd_request_response(NULL, WINBINDD_PAM_AUTH, &request, &response);
 
 	/* Display response */
@@ -2713,7 +2718,8 @@ enum {
 	OPT_USE_CACHED_CREDS,
 	OPT_PAM_WINBIND_CONF,
 	OPT_TARGET_SERVICE,
-	OPT_TARGET_HOSTNAME
+	OPT_TARGET_HOSTNAME,
+	OPT_OFFLINE_LOGON
 };
 
  int main(int argc, const char **argv)
@@ -2750,6 +2756,9 @@ enum {
 		{ "request-lm-key", 0, POPT_ARG_NONE, &request_lm_key, OPT_LM_KEY, "Retrieve LM session key"},
 		{ "request-nt-key", 0, POPT_ARG_NONE, &request_user_session_key, OPT_USER_SESSION_KEY, "Retrieve User (NT) session key"},
 		{ "use-cached-creds", 0, POPT_ARG_NONE, &use_cached_creds, OPT_USE_CACHED_CREDS, "Use cached credentials if no password is given"},
+		{ "offline-logon", 0, POPT_ARG_NONE, &offline_logon,
+		  OPT_OFFLINE_LOGON,
+		  "Use cached passwords when DC is offline"},
 		{ "diagnostics", 0, POPT_ARG_NONE, &diagnostics,
 		  OPT_DIAGNOSTICS,
 		  "Perform diagnostics on the authentication chain"},


-- 
Samba Shared Repository



More information about the samba-cvs mailing list