Fix semanage argparse bugs
This commit is contained in:
		
							parent
							
								
									f8c8b42b7a
								
							
						
					
					
						commit
						04c19314d5
					
				| @ -318093,7 +318093,7 @@ index 0000000..e2befdb | |||||||
| +      packages=["policycoreutils"],
 | +      packages=["policycoreutils"],
 | ||||||
| +)
 | +)
 | ||||||
| diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage
 | diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage
 | ||||||
| index 6e33c85..da33e6d 100644
 | index 6e33c85..37fff6e 100644
 | ||||||
| --- a/policycoreutils/semanage/semanage
 | --- a/policycoreutils/semanage/semanage
 | ||||||
| +++ b/policycoreutils/semanage/semanage
 | +++ b/policycoreutils/semanage/semanage
 | ||||||
| @@ -1,5 +1,7 @@
 | @@ -1,5 +1,7 @@
 | ||||||
| @ -318105,7 +318105,7 @@ index 6e33c85..da33e6d 100644 | |||||||
|  # see file 'COPYING' for use and warranty information |  # see file 'COPYING' for use and warranty information | ||||||
|  # |  # | ||||||
|  # semanage is a tool for managing SELinux configuration files |  # semanage is a tool for managing SELinux configuration files | ||||||
| @@ -19,564 +21,798 @@
 | @@ -19,564 +21,797 @@
 | ||||||
|  #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA      |  #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA      | ||||||
|  #                                        02111-1307  USA |  #                                        02111-1307  USA | ||||||
|  # |  # | ||||||
| @ -318291,7 +318291,7 @@ index 6e33c85..da33e6d 100644 | |||||||
| +
 | +
 | ||||||
| +def handleLogin(args):
 | +def handleLogin(args):
 | ||||||
| +    # {action:[conflict_opts,require_opts]}
 | +    # {action:[conflict_opts,require_opts]}
 | ||||||
| +    login_args = {'list':[('login','seuser'),('')],'add':[('locallist'),('seuser','login')],'modify':[('locallist'),('seuser','login')], 'delete':[('locallist'),('login')],'extract':[('locallist','login','range','seuser'),('')],'deleteall':[('locallist','login','range','seuser'),('')]}
 | +    login_args = {'list':[('login','seuser'),('')],'add':[('locallist'),('seuser','login')],'modify':[('locallist'),('seuser','login')], 'delete':[('locallist'),('login')],'extract':[('locallist','login','seuser'),('')],'deleteall':[('locallist','login','seuser'),('')]}
 | ||||||
| +
 | +
 | ||||||
| +    handle_opts(args,login_args,args.action)
 | +    handle_opts(args,login_args,args.action)
 | ||||||
| +
 | +
 | ||||||
| @ -318405,7 +318405,6 @@ index 6e33c85..da33e6d 100644 | |||||||
| +        if args.equal:
 | +        if args.equal:
 | ||||||
| +            OBJECT.add_equal(args.file_spec, args.equal)
 | +            OBJECT.add_equal(args.file_spec, args.equal)
 | ||||||
| +        else:
 | +        else:
 | ||||||
| +            print "Dan", args.file_spec, args.type, args.ftype, args.range, args.seuser
 |  | ||||||
| +            OBJECT.add(args.file_spec, args.type, args.ftype, args.range, args.seuser)
 | +            OBJECT.add(args.file_spec, args.type, args.ftype, args.range, args.seuser)
 | ||||||
| +    if args.action is "modify":
 | +    if args.action is "modify":
 | ||||||
| +        if args.equal:
 | +        if args.equal:
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user