From: Andreas Schneider Date: Fri, 11 Jan 2019 14:26:38 +0000 (+0100) Subject: s3:utils: Use C99 initializer for poptOption in smbcacls X-Git-Tag: ldb-1.6.1~412 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5990980cc92cf15a2077990b74178fdc214e3d4e;p=thirdparty%2Fsamba.git s3:utils: Use C99 initializer for poptOption in smbcacls Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 7a39de9e5e7..a3a40e9eeb9 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -791,24 +791,125 @@ int main(int argc, char *argv[]) struct poptOption long_options[] = { POPT_AUTOHELP - { "delete", 'D', POPT_ARG_STRING, NULL, 'D', "Delete an acl", "ACL" }, - { "modify", 'M', POPT_ARG_STRING, NULL, 'M', "Modify an acl", "ACL" }, - { "add", 'a', POPT_ARG_STRING, NULL, 'a', "Add an acl", "ACL" }, - { "set", 'S', POPT_ARG_STRING, NULL, 'S', "Set acls", "ACLS" }, - { "chown", 'C', POPT_ARG_STRING, NULL, 'C', "Change ownership of a file", "USERNAME" }, - { "chgrp", 'G', POPT_ARG_STRING, NULL, 'G', "Change group ownership of a file", "GROUPNAME" }, - { "inherit", 'I', POPT_ARG_STRING, NULL, 'I', "Inherit allow|remove|copy" }, - { "numeric", 0, POPT_ARG_NONE, &numeric, 1, "Don't resolve sids or masks to names" }, - { "sddl", 0, POPT_ARG_NONE, &sddl, 1, "Output and input acls in sddl format" }, - { "query-security-info", 0, POPT_ARG_INT, &query_sec_info, 1, - "The security-info flags for queries" + { + .longName = "delete", + .shortName = 'D', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'D', + .descrip = "Delete an acl", + .argDescrip = "ACL", }, - { "set-security-info", 0, POPT_ARG_INT, &set_sec_info, 1, - "The security-info flags for modifications" + { + .longName = "modify", + .shortName = 'M', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'M', + .descrip = "Modify an acl", + .argDescrip = "ACL", + }, + { + .longName = "add", + .shortName = 'a', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'a', + .descrip = "Add an acl", + .argDescrip = "ACL", + }, + { + .longName = "set", + .shortName = 'S', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'S', + .descrip = "Set acls", + .argDescrip = "ACLS", + }, + { + .longName = "chown", + .shortName = 'C', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'C', + .descrip = "Change ownership of a file", + .argDescrip = "USERNAME", + }, + { + .longName = "chgrp", + .shortName = 'G', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'G', + .descrip = "Change group ownership of a file", + .argDescrip = "GROUPNAME", + }, + { + .longName = "inherit", + .shortName = 'I', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'I', + .descrip = "Inherit allow|remove|copy", + }, + { + .longName = "numeric", + .shortName = 0, + .argInfo = POPT_ARG_NONE, + .arg = &numeric, + .val = 1, + .descrip = "Don't resolve sids or masks to names", + }, + { + .longName = "sddl", + .shortName = 0, + .argInfo = POPT_ARG_NONE, + .arg = &sddl, + .val = 1, + .descrip = "Output and input acls in sddl format", + }, + { + .longName = "query-security-info", + .shortName = 0, + .argInfo = POPT_ARG_INT, + .arg = &query_sec_info, + .val = 1, + .descrip = "The security-info flags for queries" + }, + { + .longName = "set-security-info", + .shortName = 0, + .argInfo = POPT_ARG_INT, + .arg = &set_sec_info, + .val = 1, + .descrip = "The security-info flags for modifications" + }, + { + .longName = "test-args", + .shortName = 't', + .argInfo = POPT_ARG_NONE, + .arg = &test_args, + .val = 1, + .descrip = "Test arguments" + }, + { + .longName = "domain-sid", + .shortName = 0, + .argInfo = POPT_ARG_STRING, + .arg = &domain_sid, + .val = 0, + .descrip = "Domain SID for sddl", + .argDescrip = "SID"}, + { + .longName = "max-protocol", + .shortName = 'm', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'm', + .descrip = "Set the max protocol level", + .argDescrip = "LEVEL", }, - { "test-args", 't', POPT_ARG_NONE, &test_args, 1, "Test arguments"}, - { "domain-sid", 0, POPT_ARG_STRING, &domain_sid, 0, "Domain SID for sddl", "SID"}, - { "max-protocol", 'm', POPT_ARG_STRING, NULL, 'm', "Set the max protocol level", "LEVEL" }, POPT_COMMON_SAMBA POPT_COMMON_CONNECTION POPT_COMMON_CREDENTIALS