[Patch] add --as-sddl option to getntacl and create setntacl
Andrew Bartlett
abartlet at samba.org
Thu Sep 24 11:07:52 MDT 2009
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
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090924/4ac40345/attachment.pgp>
More information about the samba-technical
mailing list