Commit 72ba00ff authored by Alexandre Julliard's avatar Alexandre Julliard

server: Only require REG_OPTION_VOLATILE when creating a new key.

parent 9adbd8ab
...@@ -612,11 +612,6 @@ static struct key *create_key( struct key *key, const struct unicode_str *name, ...@@ -612,11 +612,6 @@ static struct key *create_key( struct key *key, const struct unicode_str *name,
set_error( STATUS_KEY_DELETED ); set_error( STATUS_KEY_DELETED );
return NULL; return NULL;
} }
if (!(flags & KEY_VOLATILE) && (key->flags & KEY_VOLATILE))
{
set_error( STATUS_CHILD_MUST_BE_VOLATILE );
return NULL;
}
token.str = NULL; token.str = NULL;
if (!get_path_token( name, &token )) return NULL; if (!get_path_token( name, &token )) return NULL;
...@@ -632,6 +627,11 @@ static struct key *create_key( struct key *key, const struct unicode_str *name, ...@@ -632,6 +627,11 @@ static struct key *create_key( struct key *key, const struct unicode_str *name,
/* create the remaining part */ /* create the remaining part */
if (!token.len) goto done; if (!token.len) goto done;
if (!(flags & KEY_VOLATILE) && (key->flags & KEY_VOLATILE))
{
set_error( STATUS_CHILD_MUST_BE_VOLATILE );
return NULL;
}
*created = 1; *created = 1;
if (flags & KEY_DIRTY) make_dirty( key ); if (flags & KEY_DIRTY) make_dirty( key );
if (!(key = alloc_subkey( key, &token, index, modif ))) return NULL; if (!(key = alloc_subkey( key, &token, index, modif ))) return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment