s3-auth Change struct nt_user_token -> struct security_token
[abartlet/samba.git/.git] / source3 / registry / reg_backend_smbconf.c
index 2e4a5f1c1d7ec84e9113177e398fa01d2627321f..a2bf506e52ba0b47025e20fe9ca67ed03f820ec5 100644 (file)
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;         /* these are the default */
+extern struct registry_ops regdb_ops;          /* these are the default */
 
-static int smbconf_fetch_keys( const char *key, REGSUBKEY_CTR *subkey_ctr )
+static int smbconf_fetch_keys( const char *key, struct regsubkey_ctr *subkey_ctr )
 {
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-static bool smbconf_store_keys( const char *key, REGSUBKEY_CTR *subkeys )
+static bool smbconf_store_keys( const char *key, struct regsubkey_ctr *subkeys )
 {
        return regdb_ops.store_subkeys(key, subkeys);
 }
 
-static int smbconf_fetch_values( const char *key, REGVAL_CTR *val )
+static WERROR smbconf_create_subkey(const char *key, const char *subkey)
+{
+       return regdb_ops.create_subkey(key, subkey);
+}
+
+static WERROR smbconf_delete_subkey(const char *key, const char *subkey)
+{
+       return regdb_ops.delete_subkey(key, subkey);
+}
+
+static int smbconf_fetch_values(const char *key, struct regval_ctr *val)
 {
        return regdb_ops.fetch_values(key, val);
 }
 
-static bool smbconf_store_values( const char *key, REGVAL_CTR *val )
+static bool smbconf_store_values(const char *key, struct regval_ctr *val)
 {
        return regdb_ops.store_values(key, val);
 }
 
 static bool smbconf_reg_access_check(const char *keyname, uint32 requested,
                                     uint32 *granted,
-                                    const struct nt_user_token *token)
+                                    const struct security_token *token)
 {
        if (!(user_has_privileges(token, &se_disk_operators))) {
                return False;
@@ -74,11 +85,13 @@ static WERROR smbconf_set_secdesc(const char *key,
  * Table of function pointers for accessing smb.conf data
  */
 
-REGISTRY_OPS smbconf_reg_ops = {
+struct registry_ops smbconf_reg_ops = {
        .fetch_subkeys = smbconf_fetch_keys,
        .fetch_values = smbconf_fetch_values,
        .store_subkeys = smbconf_store_keys,
        .store_values = smbconf_store_values,
+       .create_subkey = smbconf_create_subkey,
+       .delete_subkey = smbconf_delete_subkey,
        .reg_access_check = smbconf_reg_access_check,
        .get_secdesc = smbconf_get_secdesc,
        .set_secdesc = smbconf_set_secdesc,