If the object is resolvable with CreateFile then it doesn't matter if it's a file, directory, named pipe, or some other miscellaneous thing. I templated part 2 after how GetSecurityInfo works (it also ignores the SE_OBJECT_TYPE), I'm not even sure what type of object you'd call the function with where it might matter.
Erich On Sun, Nov 4, 2012 at 3:15 PM, Charles Davis <[email protected]> wrote: > > On Nov 4, 2012, at 1:30 AM, Erich E. Hoover wrote: > >> This patch implements GetNamedSecurityInfoW on top of the more >> fundamental GetSecurityInfo function, permitting the return of more >> accurate ownership information for files. PlayReady uses this >> information to determine if its files have the appropriate >> permissions, without the correct permissions it will attempt to recopy >> the individualization file (and fail). Additionally, this patch adds >> tests for retrieving the ACL information set on files. >> >> This version fixes some problems in the tests on older Windows >> versions, sorry I didn't catch that earlier. It now also fixes a >> mistake I made between testing try 2 and pushing it out :/ > >> + hfile = CreateFileW( name, access, >> FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, >> + NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 >> ); > Only works on files right now, huh? You might then want to check to make sure > the caller says it's a file by comparing the 'type' against SE_FILE_OBJECT, > and return ERROR_CALL_NOT_IMPLEMENTED if they didn't. After all, part of the > point of that parameter is to tell you which function you need to call to > open the object in the first place :). (Same for patch 2.) > > Chip >
