summaryrefslogtreecommitdiff
path: root/source3/nsswitch/idmap_nss.c
diff options
context:
space:
mode:
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"));