diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-12-01 20:01:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:18 -0500 |
commit | ecf90c495eb850cd6f376fb4e090640b69f0c029 (patch) | |
tree | f3f30d71daab2abb56f50bac558fb9a43f28d6f1 /source3/smbd/service.c | |
parent | e57de5730cd65bca08ea2dabcf2d74d52825285e (diff) | |
download | samba-ecf90c495eb850cd6f376fb4e090640b69f0c029.tar.gz samba-ecf90c495eb850cd6f376fb4e090640b69f0c029.tar.xz samba-ecf90c495eb850cd6f376fb4e090640b69f0c029.zip |
r19991: Sorry for this 2000-liner...
The main thing here is a rewrite of srv_winreg_nt.c. The core functionality
has moved to registry/reg_api.c which is then usable by the rest of Samba as
well.
On that way it fixes creating keys with more than one element in the
path. This did not work before.
Two things that sneaked in (sorry :-) is the change of some routines from
NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal.
Volker
(This used to be commit fea52801de8c7b85c578d200c599475680c5339f)
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r-- | source3/smbd/service.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index e63bc01a7d3..048c0f00b1a 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -234,7 +234,6 @@ static int load_registry_service(const char *servicename) REGISTRY_KEY *key; char *path; WERROR err; - NTSTATUS status; uint32 i, num_values; char **value_names; @@ -250,7 +249,7 @@ static int load_registry_service(const char *servicename) return -1; } - err = regkey_open_internal(NULL, NULL, &key, path, get_root_nt_token(), + err = regkey_open_internal(NULL, &key, path, get_root_nt_token(), REG_KEY_READ); SAFE_FREE(path); @@ -258,12 +257,12 @@ static int load_registry_service(const char *servicename) return -1; } - status = registry_fetch_values(NULL, key, &num_values, &value_names, - &values); + err = registry_fetch_values(NULL, key, &num_values, &value_names, + &values); TALLOC_FREE(key); - if (!NT_STATUS_IS_OK(status)) { + if (!W_ERROR_IS_OK(err)) { goto error; } @@ -320,7 +319,7 @@ void load_registry_shares(void) goto done; } - err = regkey_open_internal(keys, NULL, &key, KEY_SMBCONF, + err = regkey_open_internal(keys, &key, KEY_SMBCONF, get_root_nt_token(), REG_KEY_READ); if (!(W_ERROR_IS_OK(err))) { goto done; |