diff options
author | Jeremy Allison <jra@samba.org> | 2012-08-08 15:35:28 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-08-09 12:06:54 -0700 |
commit | 526e875cec15761099438e17df3f56bc2bd5b761 (patch) | |
tree | 8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/passdb | |
parent | e1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff) | |
download | samba-526e875cec15761099438e17df3f56bc2bd5b761.tar.gz samba-526e875cec15761099438e17df3f56bc2bd5b761.tar.bz2 samba-526e875cec15761099438e17df3f56bc2bd5b761.zip |
Check error returns from strupper_m() (in all reasonable places).
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/lookup_sid.c | 5 | ||||
-rw-r--r-- | source3/passdb/machine_account_secrets.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 8e14cec3e8..a2d793feb3 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -339,7 +339,10 @@ bool lookup_name(TALLOC_CTX *mem_ctx, TALLOC_FREE(tmp_ctx); return false; } - strupper_m(tmp_dom); + if (!strupper_m(tmp_dom)) { + TALLOC_FREE(tmp_ctx); + return false; + } *ret_domain = tmp_dom; } diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c index 30f5f822ff..a4b5709b28 100644 --- a/source3/passdb/machine_account_secrets.c +++ b/source3/passdb/machine_account_secrets.c @@ -148,7 +148,9 @@ bool secrets_store_domain_guid(const char *domain, struct GUID *guid) #endif slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); - strupper_m(key); + if (!strupper_m(key)) { + return false; + } return secrets_store(key, guid, sizeof(struct GUID)); } @@ -160,7 +162,9 @@ bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid) struct GUID new_guid; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); - strupper_m(key); + if (!strupper_m(key)) { + return false; + } dyn_guid = (struct GUID *)secrets_fetch(key, &size); if (!dyn_guid) { |