summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-17 11:22:01 +0100
committerMichael Adam <obnox@samba.org>2008-01-17 16:25:11 +0100
commit32a8e740785147256c008730a69ae6d60a294884 (patch)
tree3fb3ea6a4206364a571b2d8abdd60488f4683731 /source3
parent7f8e4bc68ea727ab999c3f60927adbc8acc5a651 (diff)
downloadsamba-32a8e740785147256c008730a69ae6d60a294884.tar.gz
samba-32a8e740785147256c008730a69ae6d60a294884.tar.bz2
samba-32a8e740785147256c008730a69ae6d60a294884.zip
Add a reg_getversion() function to reg_api and use it in srv_winreg_nt.c.
Michael (This used to be commit 903223b160eef6ba6ff19a8bfef19e5fe7008631)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_api.c12
-rw-r--r--source3/rpc_server/srv_winreg_nt.c4
2 files changed, 12 insertions, 4 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index a4c88e2e88..18435ff033 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -50,7 +50,7 @@
* 0x17 winreg_UnLoadKey
* 0x18 winreg_InitiateSystemShutdown
* 0x19 winreg_AbortSystemShutdown
- * 0x1a winreg_GetVersion
+ * 0x1a winreg_GetVersion reg_getversion
* 0x1b winreg_OpenHKCC
* 0x1c winreg_OpenHKDD
* 0x1d winreg_QueryMultipleValues
@@ -692,6 +692,16 @@ WERROR reg_setkeysecurity(struct registry_key *key,
return regkey_set_secdesc(key->key, psecdesc);
}
+WERROR reg_getversion(uint32_t *version)
+{
+ if (version == NULL) {
+ return WERR_INVALID_PARAM;
+ }
+
+ *version = 0x00000005; /* Windows 2000 registry API version */
+ return WERR_OK;
+}
+
/**********************************************************************
* Higher level utility functions
**********************************************************************/
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index 939bf723d2..92c178042f 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -370,9 +370,7 @@ WERROR _winreg_GetVersion(pipes_struct *p, struct winreg_GetVersion *r)
if ( !regkey )
return WERR_BADFID;
- *r->out.version = 0x00000005; /* Windows 2000 registry API version */
-
- return WERR_OK;
+ return reg_getversion(r->out.version);
}