s4:registry - on key add operations we have to handle with paths not always only...
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Tue, 29 Jun 2010 16:08:47 +0000 (18:08 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 1 Jul 2010 13:48:05 +0000 (15:48 +0200)
Recursive key generations are allowed.

source4/lib/registry/interface.c
source4/lib/registry/registry.h
source4/lib/registry/rpc.c

index c5d5ce8d5f9215c726d3114b05d11a3e5e07641a..07e606d05b60488d98d9c1a512499f1e35b38342 100644 (file)
@@ -202,7 +202,7 @@ _PUBLIC_ WERROR reg_key_del(TALLOC_CTX *mem_ctx, struct registry_key *parent,
  */
 _PUBLIC_ WERROR reg_key_add_name(TALLOC_CTX *mem_ctx,
                                 struct registry_key *parent,
-                                const char *name, const char *key_class,
+                                const char *path, const char *key_class,
                                 struct security_descriptor *desc,
                                 struct registry_key **newkey)
 {
@@ -215,7 +215,7 @@ _PUBLIC_ WERROR reg_key_add_name(TALLOC_CTX *mem_ctx,
                return WERR_NOT_SUPPORTED;
        }
 
-       return parent->context->ops->create_key(mem_ctx, parent, name,
+       return parent->context->ops->create_key(mem_ctx, parent, path,
                                                key_class, desc, newkey);
 }
 
index 76247528b2fc645d19e95a004ce5f08eb0124a33..8fc025777b84a5fde7886e16f18305a9507f48ea 100644 (file)
@@ -69,7 +69,7 @@ struct hive_operations {
         * Add a new key.
         */
        WERROR (*add_key) (TALLOC_CTX *ctx,
-                          const struct hive_key *parent_key, const char *name,
+                          const struct hive_key *parent_key, const char *path,
                           const char *classname,
                           struct security_descriptor *desc,
                           struct hive_key **key);
index 7948f7cb408865ae2b89c03031610c3ecc60bd7d..bc49045ef7ffd4a2f025b211354a26346698da91 100644 (file)
@@ -331,7 +331,7 @@ static WERROR rpc_get_subkey_by_index(TALLOC_CTX *mem_ctx,
 }
 
 static WERROR rpc_add_key(TALLOC_CTX *mem_ctx,
-                         struct registry_key *parent, const char *name,
+                         struct registry_key *parent, const char *path,
                          const char *key_class,
                          struct security_descriptor *sec,
                          struct registry_key **key)
@@ -344,7 +344,7 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx,
 
        ZERO_STRUCT(r);
        r.in.handle = &parentkd->pol;
-       r.in.name.name = name;
+       r.in.name.name = path;
        r.in.keyclass.name = NULL;
        r.in.options = 0;
        r.in.access_mask = 0x02000000;