All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Lautrbach <lautrbach@redhat.com>
To: James Carter <jwcart2@gmail.com>, Vit Mojzis <vmojzis@redhat.com>
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH] checkpolicy/test: Show all options for dispol and dismod in -h
Date: Fri, 15 May 2026 16:06:17 +0200	[thread overview]
Message-ID: <87h5o8hina.fsf@redhat.com> (raw)
In-Reply-To: <CAP+JOzTSxCP9LASNMKS=QT4TdKpb3ri9NKsu09hdtE5++UV=fw@mail.gmail.com>

James Carter <jwcart2@gmail.com> writes:

> On Mon, Apr 20, 2026 at 8:41 AM Vit Mojzis <vmojzis@redhat.com> wrote:
>>
>> Show the following options, which were hidden in the usage message,
>> because they require additional input:
>>
>> dispol:
>>   7    change a boolean value
>>   f    set output file
>>   m    display menu
>>   q    quit
>>
>> dismod:
>>   l    Link in a module
>>   f    set output file
>>   m    display menu
>>   q    quit
>>
>> Fixes:
>>   $dispol -h
>>   Usage:
>>    sedispol [OPTIONS] binary_pol_file
>>
>>   Options:
>>    -h, --help   print this help message
>>    -a, --actions ACTIONS   run non-interactively
>>
>>   Actions:
>>     1    display unconditional AVTAB
>>     2    display conditional AVTAB (entirely)
>>     3    display conditional AVTAB (only ENABLED rules)
>>     4    display conditional AVTAB (only DISABLED rules)
>>     5    display booleans
>>     6    display conditional expressions
>>     8    display role transitions
>>     c    display policy capabilities
>>     C    display classes
>>     u    display users
>>     r    display roles
>>     t    display types
>>     a    display type attributes
>>     p    display the list of permissive types
>>     U    display unknown handling setting
>>     F    display filename_trans rules
>>
>>   With the patch:
>>
>>   Actions:
>>     1    display unconditional AVTAB
>>     2    display conditional AVTAB (entirely)
>>     3    display conditional AVTAB (only ENABLED rules)
>>     4    display conditional AVTAB (only DISABLED rules)
>>     5    display booleans
>>     6    display conditional expressions
>>     7    change a boolean value
>>     8    display role transitions
>>     c    display policy capabilities
>>     C    display classes
>>     u    display users
>>     r    display roles
>>     t    display types
>>     a    display type attributes
>>     p    display the list of permissive types
>>     U    display unknown handling setting
>>     F    display filename_trans rules
>>     f    set output file
>>     m    display menu
>>     q    quit
>>
>> Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>

Merged, thanks!

>> ---
>>  checkpolicy/test/dismod.c | 3 +--
>>  checkpolicy/test/dispol.c | 3 +--
>>  2 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/checkpolicy/test/dismod.c b/checkpolicy/test/dismod.c
>> index 4868190f..ed5aaa45 100644
>> --- a/checkpolicy/test/dismod.c
>> +++ b/checkpolicy/test/dismod.c
>> @@ -106,8 +106,7 @@ static __attribute__((__noreturn__)) void usage(const char *progname)
>>         puts("");
>>         puts("Actions:");
>>         for (unsigned int i = 0; commands[i].meta != EOL; i++) {
>> -               if (commands[i].meta == HEADER
>> -                   || commands[i].meta & NOOPT)
>> +               if (!(commands[i].meta & CMD))
>>                         continue;
>>                 printf("  %c    %s\n", commands[i].cmd, commands[i].desc);
>>         }
>> diff --git a/checkpolicy/test/dispol.c b/checkpolicy/test/dispol.c
>> index 3f80c1a2..c3339b88 100644
>> --- a/checkpolicy/test/dispol.c
>> +++ b/checkpolicy/test/dispol.c
>> @@ -79,8 +79,7 @@ static __attribute__((__noreturn__)) void usage(const char *progname)
>>         puts("");
>>         puts("Actions:");
>>         for (unsigned int i = 0; commands[i].meta != EOL; i++) {
>> -               if (commands[i].meta == HEADER
>> -                   || commands[i].meta & NOOPT)
>> +               if (!(commands[i].meta & CMD))
>>                         continue;
>>                 printf("  %c    %s\n", commands[i].cmd, commands[i].desc);
>>         }
>> --
>> 2.53.0
>>
>>


      reply	other threads:[~2026-05-15 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 12:41 [PATCH] checkpolicy/test: Show all options for dispol and dismod in -h Vit Mojzis
2026-05-13 15:03 ` James Carter
2026-05-15 14:06   ` Petr Lautrbach [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=87h5o8hina.fsf@redhat.com \
    --to=lautrbach@redhat.com \
    --cc=jwcart2@gmail.com \
    --cc=selinux@vger.kernel.org \
    --cc=vmojzis@redhat.com \
    /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.