[Patch] add --as-sddl option to getntacl and create setntacl
Matthieu Patou
mat at matws.net
Sat Oct 24 05:41:06 MDT 2009
Hello Andrew,
This is a take two on this patch as now I made it so it use getopt for
getntacl and setntacl.
I will issue a patch shortly for provision in order to get ACL on sysvol
right so that GPO really works correctly and GPMC stop yelling !
Matthieu.
On 09/24/2009 09:07 PM, Andrew Bartlett wrote:
> On Wed, 2009-09-23 at 13:21 +0400, Matthieu Patou wrote:
>> - if (argc != 2) {
>> - fprintf(stderr, "Usage: getntacl FILENAME\n");
>> + if (argc< 2 || argc>3) {
>> + fprintf(stderr, "Usage: getntacl [--as-sddl] FILENAME
>> \n");
>> return 1;
>> }
>> -
>> - status = get_ntacl(NULL, argv[1],&ntacl,&ntacl_len);
>> + if (strncmp(argv[1],AS_SDDL_TEXT,strlen(AS_SDDL_TEXT) )== 0) {
>> + status = get_ntacl(NULL, argv[2],&ntacl,&ntacl_len);
>> + print_as_sddl = 1;
>> + } else {
>> + status = get_ntacl(NULL, argv[1],&ntacl,&ntacl_len);
>> + }
>
> The main issue with this patch is that it adds -- options but does not
> use POPT. It really needs to rework the getntacl utility to use the
> common popt handler (as a separate prerequisite patch)
>
> Andrew Bartlett
>
More information about the samba-technical
mailing list