Re: DACL Strings
From: Garfield Lewis (galewis_at_SPAM-NO-MOREca.ibm.com)
Date: 12/28/04
- Next message: Nick: "MSDN help on the CMSG_HASHED_ENCODE_INFO structure"
- Previous message: tlviewer: "Re: Is it possible to create a "sha1 dsa" certificate with makecert"
- In reply to: Niptomomys: "DACL Strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 27 Dec 2004 20:21:48 -0500
Hi,
I don't believel this security attribute has been properly initialized. You
will need to also to the following:
sa.nLength=sizeof(SECURITY_ATTRIBYTES);
sa.bInheritHandle=TRUE; // or FALSE
otherwise, you don't know what you are actually passing to CreateDirectory
in these structure members.
-- Garfield A. Lewis DB2 UDB Development, IBM Canada Laboratory "Niptomomys" <Niptomomys@discussions.microsoft.com> wrote in message news:BF8236B4-E303-4C7A-8C53-2A85D57E4609@microsoft.com... > As part of an installation, I need to programatically create a folder > C:\foldername and set permissions so that any non-priveleged user has > RW access. For legacy reasons the folder must be at the root and not > in All Users\Shared Documents. Via SDK references I found that using: > > SECURITY_ATTRIBUTES sa; > char *pwszSD = "D:(A;OICI;GA;;;BA)"; > ConvertStringSecurityDescriptorToSecurityDescriptor( > pwszSD, > SDDL_REVISION_1, > &(sa.lpSecurityDescriptor), > NULL); > CreateDirectory(pathname,&sa); > > Works as needed on Win2000, but not on XP. Can you suggest a > string that will set permissions for all users? >
- Next message: Nick: "MSDN help on the CMSG_HASHED_ENCODE_INFO structure"
- Previous message: tlviewer: "Re: Is it possible to create a "sha1 dsa" certificate with makecert"
- In reply to: Niptomomys: "DACL Strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|