All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chad Sellers <csellers@tresys.com>
To: Daniel J Walsh <dwalsh@redhat.com>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Fix boolean handling in semanage
Date: Tue, 10 Nov 2009 17:58:23 -0500	[thread overview]
Message-ID: <C71F5A3F.AFD53%csellers@tresys.com> (raw)
In-Reply-To: <4AC3A237.3050908@redhat.com>

On 9/30/09 2:23 PM, "Daniel J Walsh" <dwalsh@redhat.com> wrote:

> Also fix error message triggered by broken boolean handling.
> 
> diff --git a/policycoreutils/semanage/semanage
> b/policycoreutils/semanage/semanage
> index ffaca5b..437eca3 100644
> --- a/policycoreutils/semanage/semanage
> +++ b/policycoreutils/semanage/semanage
> @@ -315,6 +315,7 @@ Object-specific Options (see above):
>          
>          if object == "boolean":
>              OBJECT = seobject.booleanRecords(store)
> +                        modify = True
>          
Not sure I see what was broken here. The usage and man page say you have to
specify -d or -m to semanage boolean (which is just like all the other
subcommands). Here you're trying to make that optional, and default to -m if
not specified (unless I'm guessing wrong at your intentions). I'd be fine
with that, but you broke -d in the process:

# semanage boolean -d xen_use_nfs
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 461, in <module>
    process_args(sys.argv[1:])
  File "/usr/sbin/semanage", line 370, in process_args
    OBJECT.modify(target, value, use_file)
  File "/usr/lib/python2.6/site-packages/seobject.py", line 1642, in modify
    self.__mod(name, value)
  File "/usr/lib/python2.6/site-packages/seobject.py", line 1610, in __mod
    if value.upper() in self.dict:
AttributeError: 'NoneType' object has no attribute 'upper'

>          if object == "permissive":
>              OBJECT = seobject.permissiveRecords(store)
> @@ -404,7 +405,7 @@ Object-specific Options (see above):
>  
>                          return
>  
> -                raise ValueError(_("Invalid command") % " ".join(argv))
> +                raise ValueError(_("Invalid command: semanage %s") % "
> ".join(argv))
>  
>      #
>      # 
> 
> 


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

      reply	other threads:[~2009-11-10 22:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 18:23 Fix boolean handling in semanage Daniel J Walsh
2009-11-10 22:58 ` Chad Sellers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C71F5A3F.AFD53%csellers@tresys.com \
    --to=csellers@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.