BUG: RegCreateKeyEx May Fail When Using REG_OPTION_BACKUP_RESTORE

This article was previously published under Q257176
This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
A user within the Backup Operators group may not be able to create a key by using the RegCreateKeyEx function with the REG_OPTION_BACKUP_RESTORE flag, even though the "Restore files and directories" (SE_RESTORE_NAME) privilege is granted and enabled.
CAUSE
If the SE_RESTORE_NAME privilege has been enabled and the parent key is opened by using the REG_OPTION_BACKUP_RESTORE flag, the parent key should be opened with KEY_WRITE access, which includes KEY_CREATE_SUB_KEY access. However, a bug in the operating system prevents the parent key from being opened with KEY_CREATE_SUB_KEY access, unless the user explicitly has KEY_CREATE_SUB_KEY access to that parent key. As a result, the call to create the subkey fails with error code 5 (ERROR_ACCESS_DENIED).
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Properties

Article ID: 257176 - Last Review: 02/28/2014 00:31:33 - Revision: 4.3

Microsoft Win32 Application Programming Interface

  • kbnosurvey kbarchive kbbug kbkernbase kbpending kbregistry KB257176
Feedback