|
No navigation frame on the left? Click here. Taking ownership
|
The accompanying sample demonstrates how to take ownership of a file or directory. To succeed, one or more of the following conditions must be satisfied:
The sample was written using my fksec classes; not counting error handling and reporting, the actual meat of the code consists of three lines: fksec::GetFileSecurity(), fksec::sd::SetOwnerSid(), and fksec::SetFileSecurity(). If you choose to enable privileges, you can add fksec::priv::Enable() to that list. ownership.cpp, 5 KB |