[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2722-gc17b125

Simo Sorce idra at samba.org
Sun Jul 13 02:03:47 GMT 2008


The branch, v3-2-test has been updated
       via  c17b125e1fdb9b71877200b2419d7f682bb52e87 (commit)
      from  2c097e7f333553ff4a540aef7668de7382723a74 (commit)

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


- Log -----------------------------------------------------------------
commit c17b125e1fdb9b71877200b2419d7f682bb52e87
Author: Simo Sorce <idra at samba.org>
Date:   Sat Jul 12 21:28:18 2008 -0400

    Fix regression introduced with 4086ef15b395f1a536fb669af2103a33ecc14de4
    We must not return an error here just because we are offline.
    We must instead fix the mappings to the best of our knowledge
    (ie mark as mapped, expired ones, and as unmapped, unknown ones)

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

Summary of changes:
 source/winbindd/idmap.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/idmap.c b/source/winbindd/idmap.c
index c9eae33..a1c2b1f 100644
--- a/source/winbindd/idmap.c
+++ b/source/winbindd/idmap.c
@@ -1361,16 +1361,16 @@ NTSTATUS idmap_unixids_to_sids(struct id_map **ids)
 
 	/* let's see if there is any id mapping to be retieved
 	 * from the backends */
-	if (bi) {
+	if (bids) {
+		bool online;
+
 		/* Only do query if we are online */
-		if ( IS_DOMAIN_OFFLINE(our_domain) ) {
-			ret = NT_STATUS_FILE_IS_OFFLINE;
-			goto done;
+		online = !IS_DOMAIN_OFFLINE(our_domain);
+		if (online) {
+			ret = idmap_backends_unixids_to_sids(bids);
+			IDMAP_CHECK_RET(ret);
 		}
 
-		ret = idmap_backends_unixids_to_sids(bids);
-		IDMAP_CHECK_RET(ret);
-
 		/* update the cache */
 		for (i = 0; i < bi; i++) {
 			if (bids[i]->status == ID_MAPPED) {
@@ -1388,7 +1388,7 @@ NTSTATUS idmap_unixids_to_sids(struct id_map **ids)
 				 * unmapped and hope next time things will
 				 * settle down. */
 				bids[i]->status = ID_UNMAPPED;
-			} else { /* unmapped */
+			} else if (online) { /* unmapped */
 				ret = idmap_cache_set_negative_id(idmap_cache,
 								  bids[i]);
 			}
@@ -1480,15 +1480,15 @@ NTSTATUS idmap_sids_to_unixids(struct id_map **ids)
 	/* let's see if there is any id mapping to be retieved
 	 * from the backends */
 	if (bids) {
+		bool online;
+
 		/* Only do query if we are online */
-		if ( IS_DOMAIN_OFFLINE(our_domain) ) {
-			ret = NT_STATUS_FILE_IS_OFFLINE;
-			goto done;
+		online = !IS_DOMAIN_OFFLINE(our_domain);
+		if (online) {
+			ret = idmap_backends_sids_to_unixids(bids);
+			IDMAP_CHECK_RET(ret);
 		}
 
-		ret = idmap_backends_sids_to_unixids(bids);
-		IDMAP_CHECK_RET(ret);
-
 		/* update the cache */
 		for (i = 0; bids[i]; i++) {
 			if (bids[i]->status == ID_MAPPED) {
@@ -1506,7 +1506,7 @@ NTSTATUS idmap_sids_to_unixids(struct id_map **ids)
 				 * unmapped and hope next time things will
 				 * settle down. */
 				bids[i]->status = ID_UNMAPPED;
-			} else { /* unmapped */
+			} else if (online) { /* unmapped */
 				ret = idmap_cache_set_negative_sid(idmap_cache,
 								   bids[i]);
 			}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list