svn commit: samba r23406 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

idra at samba.org idra at samba.org
Sat Jun 9 19:29:36 GMT 2007


Author: idra
Date: 2007-06-09 19:29:35 +0000 (Sat, 09 Jun 2007)
New Revision: 23406

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23406

Log:

Evn if not strictly currently necessary do check for correct
init also in idmap_nss and idmap_passdb for coherency and to
prevent errors in future if we change the init functions to
actually do something and not just return NT_STATUS_OK


Modified:
   branches/SAMBA_3_0/source/nsswitch/idmap_nss.c
   branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_nss.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/idmap_nss.c	2007-06-09 19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_nss.c	2007-06-09 19:29:35 UTC (rev 23406)
@@ -45,6 +45,10 @@
 	TALLOC_CTX *ctx;
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	ctx = talloc_new(dom);
 	if ( ! ctx) {
 		DEBUG(0, ("Out of memory!\n"));
@@ -131,6 +135,10 @@
 	TALLOC_CTX *ctx;
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	ctx = talloc_new(dom);
 	if ( ! ctx) {
 		DEBUG(0, ("Out of memory!\n"));

Modified: branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c	2007-06-09 19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c	2007-06-09 19:29:35 UTC (rev 23406)
@@ -43,6 +43,10 @@
 {
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	for (i = 0; ids[i]; i++) {
 
 		/* unmapped by default */
@@ -75,6 +79,10 @@
 {
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	for (i = 0; ids[i]; i++) {
 		enum lsa_SidType type;
 		union unid_t id;

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c
===================================================================
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c	2007-06-09 19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c	2007-06-09 19:29:35 UTC (rev 23406)
@@ -45,6 +45,10 @@
 	TALLOC_CTX *ctx;
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	ctx = talloc_new(dom);
 	if ( ! ctx) {
 		DEBUG(0, ("Out of memory!\n"));
@@ -131,6 +135,10 @@
 	TALLOC_CTX *ctx;
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	ctx = talloc_new(dom);
 	if ( ! ctx) {
 		DEBUG(0, ("Out of memory!\n"));

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c
===================================================================
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c	2007-06-09 19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c	2007-06-09 19:29:35 UTC (rev 23406)
@@ -43,6 +43,10 @@
 {
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	for (i = 0; ids[i]; i++) {
 
 		/* unmapped by default */
@@ -75,6 +79,10 @@
 {
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	for (i = 0; ids[i]; i++) {
 		enum lsa_SidType type;
 		union unid_t id;

Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c	2007-06-09 19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c	2007-06-09 19:29:35 UTC (rev 23406)
@@ -45,6 +45,10 @@
 	TALLOC_CTX *ctx;
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	ctx = talloc_new(dom);
 	if ( ! ctx) {
 		DEBUG(0, ("Out of memory!\n"));
@@ -131,6 +135,10 @@
 	TALLOC_CTX *ctx;
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	ctx = talloc_new(dom);
 	if ( ! ctx) {
 		DEBUG(0, ("Out of memory!\n"));

Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c	2007-06-09 19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c	2007-06-09 19:29:35 UTC (rev 23406)
@@ -43,6 +43,10 @@
 {
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	for (i = 0; ids[i]; i++) {
 
 		/* unmapped by default */
@@ -75,6 +79,10 @@
 {
 	int i;
 
+	if (! dom->initialized) {
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	for (i = 0; ids[i]; i++) {
 		enum lsa_SidType type;
 		union unid_t id;



More information about the samba-cvs mailing list