]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: Use C99 initializer for poptOption in smbcacls
authorAndreas Schneider <asn@samba.org>
Fri, 11 Jan 2019 14:26:38 +0000 (15:26 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:13 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/utils/smbcacls.c

index 7a39de9e5e757a556857d99a2610ceba34aa4b2a..a3a40e9eeb97023b9a5138a495cbd3b95e948933 100644 (file)
@@ -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