All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@kaigai.gr.jp>
To: selinux@tycho.nsa.gov
Subject: Re: libselinux utilities applets - please test
Date: Wed, 07 Feb 2007 06:04:26 +0900	[thread overview]
Message-ID: <45C8ED5A.30907@kaigai.gr.jp> (raw)
In-Reply-To: <200702062029.33013.vda.linux@googlemail.com>

FYI,

The first serious of SELinux'ed-busybox patches (libselinux utilities)
are merged. It enables the following facilities:

 - When ENABLE_SELINUX=1, '-lselinux -lsepol' was added as a LDFLAGS
 - "Selinux Utilities" group was added onto menuconfig list.
 - 'getenforce' new applet was added.
 - 'getsebool' new applet was added.
 - 'matchpathcon' new applet was added.
 - 'selinuxenabled' new applet was added.
 - 'setenforce' new applet was added.

Now, we are preparing to submit next serious of patches.
see, http://code.google.com/p/sebusybox/

Thanks,

Denis Vlasenko wrote:
> int getsebool_main(int argc, char **argv)
> {
> ...
>         if (!len) {
>                 if (argc < 2)
>                         bb_show_usage();
>                 len = argc - 1;
>                 names = xmalloc(sizeof(char *) * len);
>                 for (i = 0; i < len; i++)
>                         names[i] = xstrdup(argv[i + 1]);
>         }
> 
> Is it necessary to allocate names and xstrdup argv[i]?
> Maybe just do "names = argv + 1"?
> 
> 
> bb_perror_msg_and_die("error while processing %s: ", prefix);
> 
> bb_perror prints: "<applet>: message: <strerror>" - that thrailing
> ": " in your code is not needed.
> 
> 
> +#define matchpathcon_trivial_usage \
> +       "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
> +#define matchpathcon_full_usage \
> +       "\t-n\tDo not display path.\n" \
> +       "\t-N\tDo not use translations.\n" \
> +       "\t-f\tfile_context_file Use alternate file_context file\n" \
> +       "\t-p\tprefix Use prefix to speed translations\n" \
> +       "\t-V\tVerify file context on disk matches defaults"
> 
> Ehhh.... usage.h has such a nice comment at the top:
> 
> /*
>  * This file suffers from chronically incorrect tabification
>  * of messages. Before editing this file:
>  * 1. Switch you editor to 8-space tab mode.
>  * 2. Do not use \t in messages, use real tab character.
>  * 3. Start each source line with message as follows:
>  *    |<7 spaces>"text with tabs"....
>  */
> 
> 
> Okay. I applied your patch to svn and did some changes.
> Please review & test - I can't run-test it at the moment
> (my kernel and userspace is not selinux-enabled).
> 
> Patch is attached for easy review. Thanks.
> --
> vda

-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>

--
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:[~2007-02-06 21:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200702062029.33013.vda.linux@googlemail.com>
2007-02-06 21:04 ` KaiGai Kohei [this message]
2007-02-07  3:45   ` libselinux utilities applets - please test KaiGai Kohei

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=45C8ED5A.30907@kaigai.gr.jp \
    --to=kaigai@kaigai.gr.jp \
    --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.