[SCM] Samba Shared Repository - branch v3-6-test updated

Volker Lendecke vlendec at samba.org
Sun Dec 19 16:33:05 MST 2010


The branch, v3-6-test has been updated
       via  f1c3c4b s3: Fix bug 7066 -- wbcAuthenticateEx gives unix times
       via  71b20bb s3: Document wbinfo -P/--ping-dc
       via  f17dfc0 s3: Add -P as an alias for --ping-dc
       via  c007933 s3: Fix serverid_exists
      from  9e3d524 Rename vfs operation posix_fallocate to just fallocate and add the vfs_fallocate_mode parameter.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit f1c3c4b8fe5e25c2f4c06f668815de7b3b309aeb
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Dec 18 16:02:09 2010 +0100

    s3: Fix bug 7066 -- wbcAuthenticateEx gives unix times
    
    We might eventually want to change this, but right now we get unix times
    out of the winbind pipe struct

commit 71b20bb48735bf3cf6be55e8d46fb0412535b7b9
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Dec 4 18:47:56 2010 +0100

    s3: Document wbinfo -P/--ping-dc

commit f17dfc0b2603b15cb3448871d1b2da5073d747fb
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Dec 4 18:43:27 2010 +0100

    s3: Add -P as an alias for --ping-dc
    
    This is a much less intrusive version of the DC connectivity check
    than wbinfo -t is. Make it simple to use.

commit c0079336142db86cae55e696c2bb9e9ea525fb66
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Dec 3 01:34:02 2010 -0700

    s3: Fix serverid_exists
    
    In the cluster case it can happen that a node just died and we did not yet have
    the time to clean up serverid.tdb. If the corresponding serverid.tdb record
    that represented a process was migrated away from the dead record, it
    represents existence of a process where it is already dead.

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

Summary of changes:
 docs-xml/manpages-3/wbinfo.1.xml |   10 ++++++++++
 nsswitch/wbinfo.c                |    5 ++---
 source3/auth/server_info.c       |    8 +++++---
 source3/lib/serverid.c           |    4 ++++
 4 files changed, 21 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/wbinfo.1.xml b/docs-xml/manpages-3/wbinfo.1.xml
index 720715c..f708508 100644
--- a/docs-xml/manpages-3/wbinfo.1.xml
+++ b/docs-xml/manpages-3/wbinfo.1.xml
@@ -39,6 +39,7 @@
 		<arg choice="opt">-N netbios-name</arg>
 		<arg choice="opt">--own-domain</arg>
 		<arg choice="opt">-p</arg>
+		<arg choice="opt">-P</arg>
 		<arg choice="opt">-r user</arg>
 		<arg choice="opt">--remove-uid-mapping uid,sid</arg>
 		<arg choice="opt">--remove-gid-mapping gid,sid</arg>
@@ -239,6 +240,15 @@
 		</varlistentry>
 
 		<varlistentry>
+		<term>-P|--ping-dc</term>
+		<listitem><para>Issue a no-effect command to our DC. This
+		    checks if our secure channel connection to our domain
+		    controller is still alive. It has much less impact than
+		    wbinfo -t.
+		</para></listitem>
+		</varlistentry>
+
+		<varlistentry>
 		<term>-r|--user-groups <replaceable>username</replaceable></term>
 		<listitem><para>Try to obtain the list of UNIX group ids
 		to which the user belongs.  This only works for users
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 801f92f..6ff66f8 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -1940,7 +1940,6 @@ enum {
 	OPT_VERBOSE,
 	OPT_ONLINESTATUS,
 	OPT_CHANGE_USER_PASSWORD,
-	OPT_PING_DC,
 	OPT_CCACHE_SAVE,
 	OPT_SID_TO_FULLNAME,
 	OPT_NTLMV2,
@@ -1997,7 +1996,7 @@ int main(int argc, char **argv, char **envp)
 		{ "remove-gid-mapping", 0, POPT_ARG_STRING, &string_arg, OPT_REMOVE_GID_MAPPING, "Remove gid to sid mapping in idmap", "GID,SID" },
 		{ "check-secret", 't', POPT_ARG_NONE, 0, 't', "Check shared secret" },
 		{ "change-secret", 'c', POPT_ARG_NONE, 0, 'c', "Change shared secret" },
-		{ "ping-dc", 0, POPT_ARG_NONE, 0, OPT_PING_DC,
+		{ "ping-dc", 'P', POPT_ARG_NONE, 0, 'P',
 		  "Check the NETLOGON connection" },
 		{ "trusted-domains", 'm', POPT_ARG_NONE, 0, 'm', "List trusted domains" },
 		{ "all-domains", 0, POPT_ARG_NONE, 0, OPT_LIST_ALL_DOMAINS, "List all domains (trusted and own domain)" },
@@ -2246,7 +2245,7 @@ int main(int argc, char **argv, char **envp)
 				goto done;
 			}
 			break;
-		case OPT_PING_DC:
+		case 'P':
 			if (!wbinfo_ping_dc()) {
 				d_fprintf(stderr, "Could not ping our DC\n");
 				goto done;
diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index d288a0c..01c7a96 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -620,9 +620,11 @@ struct netr_SamInfo3 *wbcAuthUserInfo_to_netr_SamInfo3(TALLOC_CTX *mem_ctx,
 	info3->base.last_logon = info->logon_time;
 	info3->base.last_logoff = info->logoff_time;
 	info3->base.acct_expiry = info->kickoff_time;
-	info3->base.last_password_change = info->pass_last_set_time;
-	info3->base.allow_password_change = info->pass_can_change_time;
-	info3->base.force_password_change = info->pass_must_change_time;
+	unix_to_nt_time(&info3->base.last_password_change, info->pass_last_set_time);
+	unix_to_nt_time(&info3->base.allow_password_change,
+			info->pass_can_change_time);
+	unix_to_nt_time(&info3->base.force_password_change,
+			info->pass_must_change_time);
 
 	if (info->account_name) {
 		info3->base.account_name.string	=
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index dd02e51..ded7298 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -234,6 +234,10 @@ bool serverid_exists(const struct server_id *id)
 	struct serverid_key key;
 	TDB_DATA tdbkey;
 
+	if (lp_clustering() && !process_exists(*id)) {
+		return false;
+	}
+
 	db = serverid_db();
 	if (db == NULL) {
 		return false;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list