MSDN Remark regards Security Descriptors

大城市里の小女人 提交于 2019-12-11 11:22:52

问题


I'm trying to extract and restore a Security Descriptor of a NTFS file, via Windows API - XP SP3, I'm trying to understand which functions are actually able to do it properly, but I simply fail.

I found this Remark over MSDN: http://msdn.microsoft.com/en-us/library/aa379573%28VS.85%29.aspx

"Some SECURITY_INFORMATION members work only with the SetNamedSecurityInfo function. These members are not returned in the structure returned by other security functions such as GetNamedSecurityInfo..."

"Some members..." Which members? Why?

"Other Security functions such as..." Which functions? Why?

Anybody have any experience with extracting and restoring a security descriptor of a NTFS file?


回答1:


In general MSDN API documentation supposes a basic level of familiarity with programming and Win32.

You're supposed to understand that some security information can be inherited, for instance. That means that when setting it, you can tell Windows to copy it from the parent. But when you get it, you cannot determine why it has the value it has. Hence, the "inherit" flag is a typical example of a flag that only makes sense in a Set context, and not retrieval context. MSDN doesn't spell out exactly which functions belong in which context, as they assume you can figure that out.



来源:https://stackoverflow.com/questions/2845606/msdn-remark-regards-security-descriptors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!