diff options
author | Jeremy Allison <jra@samba.org> | 2009-07-17 21:50:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-07-17 21:50:33 -0700 |
commit | 0259a303f4cd69b2db0b059335421f8d0dbc74f5 (patch) | |
tree | b18d6202c4b0bb7c6d43b7cf3204dca65508b910 /source3/passdb | |
parent | 0bd13fda76d8cb4f345411b847d5be233e12bcc0 (diff) | |
download | samba-0259a303f4cd69b2db0b059335421f8d0dbc74f5.tar.gz samba-0259a303f4cd69b2db0b059335421f8d0dbc74f5.tar.bz2 samba-0259a303f4cd69b2db0b059335421f8d0dbc74f5.zip |
Fix Coverity CIDs 887, 888. Don't pass NULL's to functions
that deref them.
Jeremy.
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_wbc_sam.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c index 2161d2ff5c..df80411a7a 100644 --- a/source3/passdb/pdb_wbc_sam.c +++ b/source3/passdb/pdb_wbc_sam.c @@ -316,13 +316,12 @@ static NTSTATUS pdb_wbc_sam_getgrnam(struct pdb_methods *methods, GROUP_MAP *map const char *name) { NTSTATUS result = NT_STATUS_OK; - char *user_name = NULL; - char *domain = NULL; + const char *domain = ""; DOM_SID sid; gid_t gid; enum lsa_SidType name_type; - if (!winbind_lookup_name(domain, user_name, &sid, &name_type)) { + if (!winbind_lookup_name(domain, name, &sid, &name_type)) { result = NT_STATUS_NO_SUCH_GROUP; goto done; } @@ -340,7 +339,7 @@ static NTSTATUS pdb_wbc_sam_getgrnam(struct pdb_methods *methods, GROUP_MAP *map goto done; } - if (!_make_group_map(methods, domain, user_name, name_type, gid, &sid, map)) { + if (!_make_group_map(methods, domain, name, name_type, gid, &sid, map)) { result = NT_STATUS_NO_SUCH_GROUP; goto done; } |