-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/22/2013 04:17 AM, Miroslav Grepl wrote:
On 04/21/2013 02:02 AM, Dave Quigley wrote:
> Hello, I added more help text to the semanage-argparse rewrite and also
> implemented support for login. I would like anyone and everyone to look
> at the code and give me feedback. I am in no way shape or form a python
> guru so I'm glad to have any and all constructive feedback. Please let me
> know what you think.
>
>
https://github.com/dpquigl/semanage-argparse/
>
> Dave -- selinux mailing list selinux(a)lists.fedoraproject.org
>
https://admin.fedoraproject.org/mailman/listinfo/selinux
Will check later today.
Mirek -- selinux mailing list selinux(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/selinux
createCommandParser()
Should not do the egroup adding the --add or -d...
No reason to pass in the locapPaser or everyone parser. Any option that is
not common to everyone should just be added in each individual.
DELETE
#Create the parent parser which is use to handle valid_everyone arguments
everyoneParser = argparse.ArgumentParser(add_help=False)
egroup = everyoneParser.add_mutually_exclusive_group(required=True)
egroup.add_argument('-a', '--add', dest='action',
action='store_const',
const='add', help='Add a record of the specified object type')
egroup.add_argument('-d', '--delete', dest='action',
action='store_const',
const='delete', help='Delete a record of the specified object type')
egroup.add_argument('-m', '--modify', dest='action',
action='store_const',
const='modify', help='Modify a record of the specified object type')
egroup.add_argument('-l', '--list', dest='action',
action='store_const',
const='list', help='List records of the specified object type')
#This is not inuitive but its how the underlying seobject code works.
Just added these to the commandParser
everyoneParser.add_argument('-n', '--noheading',
action='store_false',
default=True, help='Do not print heading when listing the specified object type')
everyoneParser.add_argument('-S', '--store', nargs=1, help='Select
an
alternate SELinux Policy Store to manage')
Or maybe just the -S and -h.
The idea would be
semanage -S targeted fcontext -a ...
Should be legal.
If -n is not supported for everyone just add it individually.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iEYEARECAAYFAlF1Nv0ACgkQrlYvE4MpobPjqQCfbZh0+GLD0JV+dV522TWDSUHf
FZkAoKMnnGEV/tlhO3DcqMmeVRL0LA3F
=iYkf
-----END PGP SIGNATURE-----