From: Michael Adam Date: Wed, 9 Apr 2008 07:54:17 +0000 (+0200) Subject: libsmbconf: prevent getting/deleting value "includes". X-Git-Tag: samba-3.3.0pre1~2782 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a880c6a2f2415220557a76a9b4ce9a17c766819;p=thirdparty%2Fsamba.git libsmbconf: prevent getting/deleting value "includes". This has to be handled differently (by using get_includes / set_includes) Michael --- diff --git a/source/lib/smbconf/smbconf_reg.c b/source/lib/smbconf/smbconf_reg.c index 75b76a8de0d..fbc8577835d 100644 --- a/source/lib/smbconf/smbconf_reg.c +++ b/source/lib/smbconf/smbconf_reg.c @@ -884,6 +884,11 @@ static WERROR smbconf_reg_get_parameter(struct smbconf_ctx *ctx, goto done; } + if (!smbconf_reg_valname_valid(param)) { + werr = WERR_INVALID_PARAM; + goto done; + } + if (!smbconf_value_exists(key, param)) { werr = WERR_INVALID_PARAM; goto done; @@ -923,6 +928,11 @@ static WERROR smbconf_reg_delete_parameter(struct smbconf_ctx *ctx, goto done; } + if (!smbconf_reg_valname_valid(param)) { + werr = WERR_INVALID_PARAM; + goto done; + } + if (!smbconf_value_exists(key, param)) { werr = WERR_INVALID_PARAM; goto done;