summaryrefslogtreecommitdiff
path: root/source3/nsswitch/idmap_passdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/idmap_passdb.c')
-rw-r--r--source3/nsswitch/idmap_passdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/nsswitch/idmap_passdb.c b/source3/nsswitch/idmap_passdb.c
index 665ead5bb1..c4533aa3a5 100644
--- a/source3/nsswitch/idmap_passdb.c
+++ b/source3/nsswitch/idmap_passdb.c
@@ -43,6 +43,10 @@ static NTSTATUS idmap_pdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma
{
int i;
+ if (! dom->initialized) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
for (i = 0; ids[i]; i++) {
/* unmapped by default */
@@ -75,6 +79,10 @@ static NTSTATUS idmap_pdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma
{
int i;
+ if (! dom->initialized) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
for (i = 0; ids[i]; i++) {
enum lsa_SidType type;
union unid_t id;