[patch]setfiles/restorecon applet

Denis Vlasenko vda.linux at googlemail.com
Tue Jul 17 14:48:20 PDT 2007


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()?
* Maybe use xstrdup instead of strdupa
* 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.
* Do not do "if (applet_is_restorecon && option_x) bb_show_usage()"
  Just remove 'x' flag from optarg32 instead.

If some of the above is not feasible, explain that.

Please see attached updated patch.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4.patch
Type: text/x-diff
Size: 22528 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070717/36e1aa72/attachment.bin 


More information about the busybox mailing list