Microsoft KB Archive/257176

{|
 * width="100%"|

BUG: RegCreateKeyEx May Fail When Using REG_OPTION_BACKUP_RESTORE

 * }

Q257176

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * the operating system: Microsoft Windows 2000

-

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 this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbKernBase kbRegistry kbDSupport kbGrpDSKernBase

Issue type : kbbug

Technology : kbAudDeveloper kbWin32sSearch kbWin32API