diff options
author | Michael Adam <obnox@samba.org> | 2008-05-07 13:48:28 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-05-08 18:29:09 +0200 |
commit | 7d35d4e2a4063f7a9daa65e8f748cbeb57eb9dc0 (patch) | |
tree | 77701f1878b7da2037fa9cd0f43fd7827b28e892 /source3/registry | |
parent | ba94ab2ed830f75ac6593d5e057c26e7f1fbfbd3 (diff) | |
download | samba-7d35d4e2a4063f7a9daa65e8f748cbeb57eb9dc0.tar.gz samba-7d35d4e2a4063f7a9daa65e8f748cbeb57eb9dc0.tar.bz2 samba-7d35d4e2a4063f7a9daa65e8f748cbeb57eb9dc0.zip |
registry: check for existence of key in regdb_get_secdesc() before proceeding.
Michael
(This used to be commit 727e5a87c0ed3e0a2b9c2b508b1f81e6a6d26732)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 44a60cf030..372ee3f18f 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -1077,6 +1077,11 @@ static WERROR regdb_get_secdesc(TALLOC_CTX *mem_ctx, const char *key, DEBUG(10, ("regdb_get_secdesc: Getting secdesc of key [%s]\n", key)); + if (!regdb_key_exists(key)) { + err = WERR_BADFILE; + goto done; + } + tdbkey = talloc_asprintf(tmp_ctx, "%s/%s", REG_SECDESC_PREFIX, key); if (tdbkey == NULL) { err = WERR_NOMEM; |