diff options
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/idmap_nss.c | 8 | ||||
-rw-r--r-- | source3/nsswitch/idmap_passdb.c | 8 |
2 files changed, 16 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")); 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; |