 |
|
 |
AddACEToDACL() function does not work on Windows 7.
Can't add ACE.
|
|
|
|
 |
|
 |
Thank you for posting this article, I found it very helpful.
int CNTFS::ResolveSID(CString & I_securityPrincipal, PSID O_pSID, BOOL O_isUser)
Should be
BOOL& O_isUser
?
|
|
|
|
 |
|
 |
I test on 2T Disk,a tool, 2T Disk Simulator,it simulate a 2TB disk,1024,2048,4096 bytes/secotr,this app can not work.I found this tool on http://www.2tdisk.com
|
|
|
|
 |
|
 |
You did a gr8 job with code but some things were missing as explaination ..
Kushagra
|
|
|
|
 |
|
 |
Hi, I have a problem, if i press delete DACL, then program will delete all account of the file, how can I delete a appoint account with me, for example: I want to delete administrators account , but when I press delete DACL, that will delete all account with this file, so, how can I change the delete methed? Thank you!
BYE BYE
|
|
|
|
 |
|
 |
When trying to set the permissions on a FAT file system a null pointer is followed, leading to a crash.
It can be solved by checking the value of the DACL after GetNamedSecurityInfo();
if( pOldDACL == NULL ){
returnCode = ERROR_NOT_SUPPORTED;
}
see: http://msdn.microsoft.com/en-us/library/aa446648(VS.85).aspx on the bottom for more information.
|
|
|
|
 |
|
 |
Hi buddy!
its nice stuff!.
can you please provide me a Java code sameple for CNTFS for adding permission for a user on a folder, if possible?
tx!
Max.
|
|
|
|
 |
|
 |
your code is very good!!
but it's not working in this case
Enviroment : Windows XP Pro
step1. Longon / Account Name "ABC" (Account Name is Example)
Step2. Set Folder Option : Set Everyone have a one permission
Step3. Set Folder make a Private Folder
Step4. Logoff and Logon / Account Name "KKK" (Account Name is Example)
Step5. use CNTFS (Set Owner to Administrators)
Step6. Set Folder Option : Set Everyone Have a One Permission to Disable
Step7. Check Folder's Owner : it not working
hu!... it too hard to write English (i don't know english ... T.T;;;)
Please help/...
|
|
|
|
 |
|
 |
Hello
This looks good, but can this help me with NetFileEnum() - this function is only available to users that are an Administrator onthe Server - and have access to the root of the drive.
Any idea?
Thanks
Alex
alex.evans@iinet.net.au
|
|
|
|
 |
|
 |
Hey, this really saved me tons of time, as understanding the DACL structures is a pain in the neck. Thanks for your contribution.
BTW, I think you've gotten WAY too much slack about the Platform SDK thing. CLEARLY if a developer doesn't have the correct SDK to compile a project, it is THEIR job to update to the correct version, not your job to give them all the new #defines that are in it, especially since you specified that they would need to upgrade to compile the project! Anyway, thanks again for your great code.
~Steve
|
|
|
|
 |
|
 |
Hi Steve
This looks good, but can this help me with NetFileEnum() - this function is only available to users that are an Administrator onthe Server - and have access to the root of the drive.
Any idea?
Thanks
Alex
alex.evans@iinet.net.au
|
|
|
|
 |
|
 |
Let me say thank you to the author for provideing the define for:
#define PROTECTED_SACL_SECURITY_INFORMATION (0x40000000L)
HOWEVER, it still will NOT compile unless someone will be kind enough to supply one more define, namely:
#define PROTECTED_DACL_SECURITY_INFORMATION ????????????
Let me explain to the author why assuming people can download the SDK is simply NOT true! Many programmers do not have the bandwidth or time to download the SDK and the other more interesting thing is that Microsoft has changed their policy and limited downloads severely of SDK-it is now required that you use Internet Expression AND that you have FrontPage Extension Installed or you can NOT download the SDK bros!
So, if some will be so kind as to provide the define for PROTECTED_DACL_SECURITY_INFORMATION it would be appreciated or the header file would do fine and the header or all defdines should have been included in this project since MOST people will NOT have either.
Great article by the way, even if it is impossible for most people to compile!
Bill SerGio, The Infomercial King
|
|
|
|
 |
|
 |
TV Mogul wrote:
Many programmers do not have the bandwidth or time to download the SDK and the other more interesting thing is that Microsoft has changed their policy and limited downloads severely of SDK-it is now required that you use Internet Expression AND that you have FrontPage Extension Installed or you can NOT download the SDK bros!
And all this only because you havent made your Gb-transfer-in-0-time method available to them. Shame on you.
#define PROTECTED_DACL_SECURITY_INFORMATION (0x80000000L)
#define PROTECTED_SACL_SECURITY_INFORMATION (0x40000000L)
#define UNPROTECTED_DACL_SECURITY_INFORMATION (0x20000000L)
#define UNPROTECTED_SACL_SECURITY_INFORMATION (0x10000000L)
Off to in ~60 days
|
|
|
|
 |
|
 |
Here are the extra W2K flags as I found them at
http://samba.org/doxygen/samba/rpc__secdes_8h-source.html
#define UNPROTECTED_SACL_SECURITY_INFORMATION 0x10000000
#define UNPROTECTED_DACL_SECURITY_INFORMATION 0x20000000
#define PROTECTED_SACL_SECURITY_INFORMATION 0x40000000
#define PROTECTED_DACL_SECURITY_INFORMATION 0x80000000
YG
|
|
|
|
 |
|
 |
Hi ,
I didn't understand your comment. I assume you meant "Internet Explorer" and not "Internet Expression". However, I don't understand the "Front Page" requirement at all. I've never had MS FrontPage installed and have downloaded various SDK's (Windows SDK, Platform SDK, etc) without any problem. Personally, I use GetRight (A FABULOUS downloader, in which I have no financial interest) and it all works reliably. I have recently subscribed to MS TechNet and, unfortunately, they provide their own unique "File Transfer" utility with the subscription that you must use to download authorized sample programs, but I haven't had any problem with it (it supports concurrent downloads like GetRight, but is not nearly as flexible or configurable).
Can you explain what you saw or mean when you're talking about FrontPage?
Thanks, Tom
|
|
|
|
 |
|
 |
This function is not availabe on NT4.0. This means the compiled program will no longer start on NT 4, Win98, Win95 and WinME because of missing imports (the win9x-series also doesn't include support for any of the security functions). if you intend your software to also work on these operating systems I suggest to use LoadLibrary()/GetProcAddr() for all security functions instead of linking to the dlls trough AdvApi32.lib. On nt4 there is a function called AddAccessAllowedAce(), but you have to set the AceFlags manually. Here the code snippet I'm using for this: BOOL call_AddAccessAllowedAceEx( PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid ) { BOOL bErg = TRUE; _ACE_HEADER* pACE; DWORD dwIdxACE = 1; ACL_SIZE_INFORMATION AclSizeInfo; HMODULE hmodAdvAPI = LoadLibrary( "AdvApi32.dll" ); tpfnAddAccessAllowedAceEx pfnAddAccessAllowedAceEx; (FARPROC&)pfnAddAccessAllowedAceEx = GetProcAddress( hmodAdvAPI, "AddAccessAllowedAceEx" ); if( pfnAddAccessAllowedAceEx ) { bErg = pfnAddAccessAllowedAceEx( pAcl, dwAceRevision, AceFlags, AccessMask, pSid ); } else { //nicht vorhanden -> winnt 4.0 bErg = AddAccessAllowedAce( pAcl, dwAceRevision, AccessMask, pSid ); GetAclInformation( pAcl, &AclSizeInfo, sizeof(AclSizeInfo), AclSizeInformation ); pACE = NULL; dwIdxACE = AclSizeInfo.AceCount-1; if( GetAce( pAcl, dwIdxACE, (void**)&pACE ) ) { pACE->AceFlags = BYTE(AceFlags); } } FreeLibrary( hmodAdvAPI ); return bErg; }
|
|
|
|
 |
|
 |
I didn't consider supporting 9x/ME since NTFS permissions don't exist in those OSs. Good point though, for NT4.
|
|
|
|
 |
|
 |
Visual Sudio 6.0's file "Aclapi.h" does NOT include the define for "PROTECTED_SACL_SECURITY_INFORMATION" and the code here will NOT compile.
You need to either add to your sample an UPDATED version of "Aclapi.h" from Visual Sudio 7, or add this define if you want to compile this code!
Bill SerGio, The Infomercial King
|
|
|
|
 |
|
 |
Of course it doesn't. It's in winnt.h
However, you'll have to download the new SDK to get it as it didn't exist when VC6 was released. Every SDK since VC6 was released has had it defined.
But here it is, although I strongly recommend you download the SDK.
#define PROTECTED_SACL_SECURITY_INFORMATION (0x40000000L)
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
|
|
|
|
 |
|
 |
Thank you. This may surprise you but many of us have not gotten around to upgrading things and I did notice that although MSDN said it was in winnt.h, it wasn't in my copy of winnt.h. Thanks for clearing that up. Actually I did install the first SDK after Visual Studio 6 and it didn't have it !
Bill SerGio, The Infomercial King
|
|
|
|
 |
|
 |
You're welcome.
TV Mogul wrote:
Actually I did install the first SDK after Visual Studio 6 and it didn't have it !
I must have missed that one
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
|
|
|
|
 |
|
 |
That's why I included the sentence about the Platform SDK. You'll see the path to the SDK referenced in the project settings.
|
|
|
|
 |
|
 |
Several errors including this one are resolved by installing visual studio service pack 2 or later, the latest one is available at:
http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp6/default.aspx
|
|
|
|
 |
|
 |
If you drop the Devstudio temporary files (.ncb, .opt, .plg) from the zip package, then the demo project might only be something like 10KB and would have more chances to get downloaded and tried.
|
|
|
|
 |
|
 |
Done
|
|
|
|
 |