[patch]setfiles/restorecon applet
Yuichi Nakamura
ynakam at hitachisoft.jp
Wed Jul 18 18:17:59 PDT 2007
Hi.
Thanks for review and fixes.
On Tue, 17 Jul 2007 22:48:20 +0100
Denis Vlasenko wrote:
> Hi SELinux people,
>
> Sorry, late reply :((
>
> On Monday 02 July 2007 06:29, Yuichi Nakamura wrote:
> > I would like to submit setfiles/restorecon applet.
> > setfiles and restorecon are SELinux commands that
> > label files according to configuration file
> > (in configuration file, relationship between file and label is
> > described).
> >
> > These applets are very important for SELinux enabled system.
> > Please review and consider merging this patch.
>
> Took a look:
>
> * Trimmed help text a bit
> * Removed \n at the end of bb_[p]error
> * Removed progname (using applet_name)
> * Removed restorecon.c - USE_RESTORECON(APPLET_ODDNAME...) handles that
> * int -> smallint for many flag variables
> This needs improvement - many of those flags are already accessible
> as (option_mask32 & BIT_MASK), you don't need separate variables
>
> Please take a look at:
> * Do you really have to have fork()?
I looked code again and found it unnecessary so removed.
> * Maybe use xstrdup instead of strdupa
Fixed.
> * nftw() is not used in bbox. We have recursive_action().
> It will be better if we won't pull in nftw() into busybox
> just for this applet.
Fixed to use recursive_action instead of nftw.
> * Do not do "if (applet_is_restorecon && option_x) bb_show_usage()"
> Just remove 'x' flag from optarg32 instead.
Fixed.
>
> If some of the above is not feasible, explain that.
>
> Please see attached updated patch.
> --
> vda
In addition, I am using struct globals for static data.
Attached is revised patch, please look at.
Regards,
--
Yuichi Nakamura
Hitachi Software Engineering Co., Ltd.
Japan SELinux Users Group(JSELUG): http://www.selinux.gr.jp/
SELinux Policy Editor: http://seedit.sourceforge.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setfiles.2.patch
Type: application/octet-stream
Size: 21155 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070719/0ec9d1b4/attachment-0001.obj
More information about the busybox
mailing list