Rev 602: store both forward and reverse mappings when the script gives us a result in http://samba.org/~tridge/3_0-ctdb

tridge at samba.org tridge at samba.org
Mon Jun 18 23:30:04 GMT 2007


------------------------------------------------------------
revno: 602
revision-id: tridge at samba.org-20070618233003-z1g7kv5uce3qr0p2
parent: tridge at samba.org-20070618231102-yosa0a9c5s1bna3r
committer: Andrew Tridgell <tridge at samba.org>
branch nick: s3-ctdb-tridge
timestamp: Tue 2007-06-19 09:30:03 +1000
message:
  store both forward and reverse mappings when the script gives us a result
modified:
  source/nsswitch/idmap_tdb2.c   idmap_tdb2.c-20070531053925-e5x7av5etjs83rk0-1
=== modified file 'source/nsswitch/idmap_tdb2.c'
--- a/source/nsswitch/idmap_tdb2.c	2007-06-18 23:11:02 +0000
+++ b/source/nsswitch/idmap_tdb2.c	2007-06-18 23:30:03 +0000
@@ -606,8 +606,11 @@
 			if (NT_STATUS_IS_OK(ret)) {
 				fstring sidstr;
 				if (sid_to_string(sidstr, map->sid)) {
+					/* both forward and reverse mappings */
 					tdb2_store_bystring(keystr, string_term_tdb_data(sidstr), 
 							    TDB_REPLACE);
+					tdb2_store_bystring(sidstr, string_term_tdb_data(keystr), 
+							    TDB_REPLACE);
 				}
 			}
 		} else {
@@ -663,7 +666,9 @@
 				snprintf(idstr, sizeof(idstr), "%cID %lu", 
 					 map->xid.type == ID_TYPE_UID?'U':'G',
 					 (unsigned long)map->xid.id);
+				/* store both forward and reverse mappings */
 				tdb2_store_bystring(keystr, string_term_tdb_data(idstr), TDB_REPLACE);
+				tdb2_store_bystring(idstr, string_term_tdb_data(keystr), TDB_REPLACE);
 			}
 		} else {
 			ret = NT_STATUS_NONE_MAPPED;



More information about the samba-cvs mailing list