[Toybox] integration of SMACK

enh enh at google.com
Tue May 5 08:53:08 PDT 2015


a few comments...

+config MKNOD_SMACK
we should probably call these something more generic because we know i'll
be along a day later after the hard part is done adding the SELinux variant
:-) right now (including your patch) it looks like we have TOY_SELINUX,
TOY_SMACK, TOY_SECURITY, and TOY_Z all in circulation. although i added
TOY_Z just the other day, maybe TOY_SECURITY is the best choice? anyway, if
rob lets us know which he prefers, it's probably helpful if we stick to one
idiom.

(using SMACK at least lets me grep for stuff i need to look at, but i don't
know whether to use SECURITY or Z when i do.)

+ if (smack_set_label_for_path(*s, XATTR_NAME_SMACK, 0, TT.arg_context) < 0)
{+ unlink(*s);+ error_exit("Unable to create fifo '%s' with '%s' as context.
", *s, TT.arg_context);+ }
this seems to be duplicated a few times, and we'll need the SELinux
equivalent too. add a set_security_label to lib? you can pass a boolean to
distinguish unlink from rmdir (or just use rename if we don't care since
this is the failure case anyway).

+ if (mknod(*s, S_IFIFO | TT.mode, 0) < 0) {+ perror_msg("%s", *s);+ }+ if
(CFG_MKFIFO_SMACK) {

i think you missed an 'else' here?

On Tue, May 5, 2015 at 8:18 AM, José Bollo <jobol at nonadev.net> wrote:

> Hi all,
>
> I rebased the works made for Smack on the head of toybox. This fruit can
> be picked here.
>
> https://github.com/jobol/toybox/tree/smack-7
>
> Best regards
> José
>
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
>



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20150505/f0b9ac41/attachment-0004.htm>


More information about the Toybox mailing list