summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-26 00:53:19 +0100
committerMichael Adam <obnox@samba.org>2007-12-26 00:53:19 +0100
commite8cfbb0f4c58b45eb2585a8f130af017fd83adc8 (patch)
tree7074582d4b7c8061be82f39785b10d1e1558a02d
parent8b88fa53b5f1f344b30b3409acf765ee46005396 (diff)
downloadsamba-e8cfbb0f4c58b45eb2585a8f130af017fd83adc8.tar.gz
samba-e8cfbb0f4c58b45eb2585a8f130af017fd83adc8.tar.bz2
samba-e8cfbb0f4c58b45eb2585a8f130af017fd83adc8.zip
Rename libnet_smbconf_open_path_q() to libnet_smbconf_open_path()
removing previouse libnet_smbconf_open_path() and adding DEBUG output (instead of d_fprintf error output) to new libnet_smbconf_open_path(). Michael (This used to be commit e63cc54fab8a0b03573f76305eab366a3ee4eda1)
-rw-r--r--source3/libnet/libnet_conf.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index bb0e637b33..3598f6c23c 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -29,12 +29,11 @@
/*
* Open a subkey of KEY_SMBCONF (i.e a service)
- * - variant without error output (q = quiet)-
*/
-static WERROR libnet_smbconf_open_path_q(TALLOC_CTX *ctx,
- const char *subkeyname,
- uint32 desired_access,
- struct registry_key **key)
+WERROR libnet_smbconf_open_path(TALLOC_CTX *ctx,
+ const char *subkeyname,
+ uint32 desired_access,
+ struct registry_key **key)
{
WERROR werr = WERR_OK;
char *path = NULL;
@@ -54,6 +53,11 @@ static WERROR libnet_smbconf_open_path_q(TALLOC_CTX *ctx,
werr = reg_open_path(ctx, path, desired_access,
token, key);
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(1, ("Error opening registry path '%s': %s\n",
+ path, dos_errstr(werr)));
+ }
+
done:
TALLOC_FREE(path);
return werr;
@@ -69,7 +73,7 @@ bool libnet_smbconf_key_exists(const char *subkeyname)
TALLOC_CTX *mem_ctx = talloc_stackframe();
struct registry_key *key = NULL;
- werr = libnet_smbconf_open_path_q(mem_ctx, subkeyname, REG_KEY_READ, &key);
+ werr = libnet_smbconf_open_path(mem_ctx, subkeyname, REG_KEY_READ, &key);
if (W_ERROR_IS_OK(werr)) {
ret = true;
}
@@ -96,27 +100,6 @@ static bool libnet_smbconf_value_exists(struct registry_key *key,
}
/*
- * Open a subkey of KEY_SMBCONF (i.e a service)
- * - variant with error output -
- */
-WERROR libnet_smbconf_open_path(TALLOC_CTX *ctx, const char *subkeyname,
- uint32 desired_access,
- struct registry_key **key)
-{
- WERROR werr = WERR_OK;
-
- werr = libnet_smbconf_open_path_q(ctx, subkeyname, desired_access, key);
- if (!W_ERROR_IS_OK(werr)) {
- d_fprintf(stderr, "Error opening registry path '%s\\%s': %s\n",
- KEY_SMBCONF,
- (subkeyname == NULL) ? "" : subkeyname,
- dos_errstr(werr));
- }
-
- return werr;
-}
-
-/*
* open the base key KEY_SMBCONF
*/
WERROR libnet_smbconf_open_basepath(TALLOC_CTX *ctx, uint32 desired_access,