[patch]setfiles/restorecon applet

Yuichi Nakamura ynakam at hitachisoft.jp
Wed Jul 25 00:25:21 UTC 2007


On Tue, 24 Jul 2007 07:01:36 +0100
Denis Vlasenko  wrote:
> On Tuesday 24 July 2007 01:08, Yuichi Nakamura wrote:
> > Attached is update.
> 
> Applied to svn. Further reductions are possible:
> 
>         if (flags & OPT_e) {
>                 if (exclude_dir == NULL) {
>                         bb_show_usage();
>                 }
> 
> I think it is already handled inside getopt32. IOW:
> if() above is not needed at all, ok to remove?
> 
>                 while (exclude_dir) {
>                         if (add_exclude(llist_pop(&exclude_dir)))
>                                 exit(1);
>                 }
> 
> add_exclude is used only once here. Obviously you can make
> it a void function which exits on errors.
> 
>         }
> 
> Can you test it?
I've tested, and it worked.
Attached is a patch.

> Can you point me to FAQ/whetever how to install SELinux libs
> so that I can at least compile this stuff myself? I suppose
> this doesn't require SELinux-enabled kernel?
> --
> vda
Yes, it does not require SELinux enabled kernel.
You have to obtain libselinux, libsepol.

If you install from source, obtain source from below.
http://www.nsa.gov/selinux/archives/libsepol-1.16.1.tgz
http://www.nsa.gov/selinux/archives/libselinux-1.34.7.tgz

And  run 
make ARCH=<your arch> CC=<your cross compiler>
If your cross compiler does not support thread local storage,
you have to define __thread as NULL, like below
make ARCH=<your arch> CC=<your cross compiler> CFLAGS=-D__thread=
Then, libselinux, libsepol is made under src.
Header files exists under include dir.

-- 
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.patch
Type: application/octet-stream
Size: 1611 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070725/1c74da02/attachment-0002.obj 


More information about the busybox mailing list