Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 20 May 2008 09:34:00 -0700,    group: microsoft.public.platformsdk.security        back       


RegDeleteKey() and SeBackupPrivilege/SeRestorePrivilege   
Does RegDeleteKey() honor the SeBackupPrivilege/SeRestorePrivilege 
privileges?  From my experiments, it does not.  You can pass 
REG_OPTION_BACKUP_RESTORE to RegCreateKeyEx() to open the key with 
backup/restore privileges (similar to the way FILE_FLAG_BACKUP_SEMANTICS 
works), but this still does not allow key deletion.

Here is my situation.  I have a key (HKEY_CURRENT_USER\TestKey).  I have 
denied myself all access, but I am still the owner.  With SeBackupPrivilege 
and SeRestorePrivilege enabled, RegDeleteKey() fails with 
ERROR_ACCESS_DENIED.  I try opening the key with REG_OPTION_BACKUP_RESTORE, 
but this only opens it with KEY_READ and KEY_WRITE access; RegDeleteKey() 
still fails with ERROR_ACCESS_DENIED.  I guess my question is this:  is there 
a way I can delete the key without mucking with ACLs?  I am the owner of the 
key.  It is in my HKEY_CURRENT_USER hive.  I have denied myself all access to 
the key.  RegDeleteKey() appears to not honor the SeBackupPrivilege and 
SeRestorePrivileges.  DeleteFile() honors the privileges, so you would think 
that RegDeleteKey() would as well.
date: Tue, 20 May 2008 09:34:00 -0700   author:   Luke

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us