summaryrefslogtreecommitdiff
path: root/source3/nsswitch/idmap_nss.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-06-09 19:29:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:13 -0500
commit22a7d90bfe94a1bb16c1d3d1070d1aad8dc4803f (patch)
tree5f3b2e2d6cf1ea872a0d8a08a14d8df2925b303c /source3/nsswitch/idmap_nss.c
parent6c5805aa70c6d928b38247bb6cf0f5ad9428cc69 (diff)
downloadsamba-22a7d90bfe94a1bb16c1d3d1070d1aad8dc4803f.tar.gz
samba-22a7d90bfe94a1bb16c1d3d1070d1aad8dc4803f.tar.bz2
samba-22a7d90bfe94a1bb16c1d3d1070d1aad8dc4803f.zip
r23406: 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 (This used to be commit 86f532c1b0cf7961b8331bb212c3ed2084fda3fc)
Diffstat (limited to 'source3/nsswitch/idmap_nss.c')
-rw-r--r--source3/nsswitch/idmap_nss.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/nsswitch/idmap_nss.c b/source3/nsswitch/idmap_nss.c
index e3e425f105..fbdd391965 100644
--- a/source3/nsswitch/idmap_nss.c
+++ b/source3/nsswitch/idmap_nss.c
@@ -45,6 +45,10 @@ static NTSTATUS idmap_nss_unixids_to_sids(struct idmap_domain *dom, struct id_ma
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 @@ static NTSTATUS idmap_nss_sids_to_unixids(struct idmap_domain *dom, struct id_ma
TALLOC_CTX *ctx;
int i;
+ if (! dom->initialized) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));