summaryrefslogtreecommitdiff
path: root/source3/services
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-19 11:11:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:55 -0500
commitbfad4421449d7f49287b1ebe81bf572c271f8fca (patch)
tree5371fffd1d7201e556f0255412144164bcc25cc1 /source3/services
parent76b320c8dfedf9912f0f22a662d765510acb5054 (diff)
downloadsamba-bfad4421449d7f49287b1ebe81bf572c271f8fca.tar.gz
samba-bfad4421449d7f49287b1ebe81bf572c271f8fca.tar.bz2
samba-bfad4421449d7f49287b1ebe81bf572c271f8fca.zip
r19780: Ok, regkey_open_internal needs a regkey_close_internal. Giving a talloc ctx is
misleading here. This needs fixing properly :-) Volker (This used to be commit f808182346aa16bb2f3a9383e28d318099a5e14e)
Diffstat (limited to 'source3/services')
-rw-r--r--source3/services/services_db.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/source3/services/services_db.c b/source3/services/services_db.c
index 7573d3ba2d..5b4f58d766 100644
--- a/source3/services/services_db.c
+++ b/source3/services/services_db.c
@@ -322,8 +322,8 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys,
/* open the new service key */
pstr_sprintf( path, "%s\\%s", KEY_SERVICES, name );
- wresult = regkey_open_internal( NULL, &key_service, path,
- get_root_nt_token(), REG_KEY_ALL );
+ wresult = regkey_open_internal( &key_service, path, get_root_nt_token(),
+ REG_KEY_ALL );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));
@@ -360,8 +360,8 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys,
/* now add the security descriptor */
pstr_sprintf( path, "%s\\%s\\%s", KEY_SERVICES, name, "Security" );
- wresult = regkey_open_internal( NULL, &key_secdesc, path,
- get_root_nt_token(), REG_KEY_ALL );
+ wresult = regkey_open_internal( &key_secdesc, path, get_root_nt_token(),
+ REG_KEY_ALL );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("add_new_svc_name: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));
@@ -412,8 +412,8 @@ void svcctl_init_keys( void )
/* bad mojo here if the lookup failed. Should not happen */
- wresult = regkey_open_internal( NULL, &key, KEY_SERVICES,
- get_root_nt_token(), REG_KEY_ALL );
+ wresult = regkey_open_internal( &key, KEY_SERVICES, get_root_nt_token(),
+ REG_KEY_ALL );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("init_services_keys: key lookup failed! (%s)\n",
@@ -476,7 +476,7 @@ SEC_DESC* svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *
/* now add the security descriptor */
pstr_sprintf( path, "%s\\%s\\%s", KEY_SERVICES, name, "Security" );
- wresult = regkey_open_internal( NULL, &key, path, token, REG_KEY_ALL );
+ wresult = regkey_open_internal( &key, path, token, REG_KEY_ALL );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));
@@ -535,7 +535,7 @@ BOOL svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc,
/* now add the security descriptor */
pstr_sprintf( path, "%s\\%s\\%s", KEY_SERVICES, name, "Security" );
- wresult = regkey_open_internal( NULL, &key, path, token, REG_KEY_ALL );
+ wresult = regkey_open_internal( &key, path, token, REG_KEY_ALL );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("svcctl_get_secdesc: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));
@@ -581,8 +581,7 @@ char* svcctl_lookup_dispname( const char *name, NT_USER_TOKEN *token )
/* now add the security descriptor */
pstr_sprintf( path, "%s\\%s", KEY_SERVICES, name );
- wresult = regkey_open_internal( NULL, &key, path, token,
- REG_KEY_READ );
+ wresult = regkey_open_internal( &key, path, token, REG_KEY_READ );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("svcctl_lookup_dispname: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));
@@ -628,8 +627,7 @@ char* svcctl_lookup_description( const char *name, NT_USER_TOKEN *token )
/* now add the security descriptor */
pstr_sprintf( path, "%s\\%s", KEY_SERVICES, name );
- wresult = regkey_open_internal( NULL, &key, path, token,
- REG_KEY_READ );
+ wresult = regkey_open_internal( &key, path, token, REG_KEY_READ );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("svcctl_lookup_dispname: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));
@@ -668,8 +666,7 @@ REGVAL_CTR* svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token )
/* now add the security descriptor */
pstr_sprintf( path, "%s\\%s", KEY_SERVICES, name );
- wresult = regkey_open_internal( NULL, &key, path, token,
- REG_KEY_READ );
+ wresult = regkey_open_internal( &key, path, token, REG_KEY_READ );
if ( !W_ERROR_IS_OK(wresult) ) {
DEBUG(0,("svcctl_fetch_regvalues: key lookup failed! [%s] (%s)\n",
path, dos_errstr(wresult)));