diff options
author | Michael Adam <obnox@samba.org> | 2007-12-23 15:07:20 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2007-12-24 00:18:35 +0100 |
commit | 8f163d5c5ae48a3ff1974e936b9316781eceff8a (patch) | |
tree | f467b48f72c2d3f034abf7d5a50b7fb6e0a9ccfc /source3/libnet | |
parent | 4e53afccb1470b8d889f7300ad77a497f38ed418 (diff) | |
download | samba-8f163d5c5ae48a3ff1974e936b9316781eceff8a.tar.gz samba-8f163d5c5ae48a3ff1974e936b9316781eceff8a.tar.bz2 samba-8f163d5c5ae48a3ff1974e936b9316781eceff8a.zip |
Move logic of net_conf_getparm() to libnet_conf.c.
Michael
(This used to be commit d3a20c4d5a8109334cd3ed665ba60cfcc4425059)
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_conf.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index 69a105f8f5..121ec35468 100644 --- a/source3/libnet/libnet_conf.c +++ b/source3/libnet/libnet_conf.c @@ -271,6 +271,30 @@ WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx, return werr; } +WERROR libnet_smbconf_getparm(TALLOC_CTX *mem_ctx, + const char *service, + const char *param, + struct registry_value **value) +{ + WERROR werr; + struct registry_key *key = NULL; + + if (!libnet_smbconf_key_exists(mem_ctx, service)) { + return WERR_NO_SUCH_SERVICE; + } + + werr = libnet_smbconf_open_path(mem_ctx, service, REG_KEY_READ, &key); + W_ERROR_NOT_OK_RETURN(werr); + + if (!libnet_smbconf_value_exists(mem_ctx, key, param)) { + return WERR_INVALID_PARAM; + } + + werr = reg_queryvalue(mem_ctx, key, param, value); + + return werr; +} + WERROR libnet_smbconf_delparm(TALLOC_CTX *mem_ctx, const char *service, const char *param) |