<div dir="ltr"><div>nice! that worked out even better than i'd hoped.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 7, 2015 at 7:51 AM, José Bollo <span dir="ltr"><<a href="mailto:jobol@nonadev.net" target="_blank">jobol@nonadev.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le mercredi 06 mai 2015 à 13:19 -0700, James McMechan a écrit :<br>
</span><span class="">> Looking at the fixes:<br>
><br>
> toys/other/stat.c for group name outputting the user name seems like a good catch<br>
><br>
> toys/posix/cp.c you are treating -p like --preserve=all not like -p which only does mode,ownership,timestamps<br>
> according to the man page -p does not copy over xattrs at all, which seems kind of odd...<br>
><br>
> toys/posix/id.c seems to lose the TOYBOX_USR flag which I think insures it is in /usr/bin like the regular version.<br>
><br>
> this is the second case where your are using<br>
> (TOYBOX_SELINUX || TOYBOX_SMACK)<br>
> perhaps you should add a hidden symbol like TOYBOX_SECURITY that could have all the various versions || together and use that in place of doing it by hand each time for the ??_SECURITY symbol.<br>
><br>
> also you pulled the<br>
> if (CFG_TOYBOX_FREE) free(context);<br>
> up into the two if statements rather leaving it after both like it was. It should work as a good compiler will do tail combining but just having it sitting at the end is both clearer and shorter because both cases fall through to the same code.<br>
> The lines 151-169 look like a extra string e.g. "LSM Smack Disabled" vs "SELinux Disabled" and a slight shuffling of the if statements could make that much shorter both halves seem to be almost identical...<br>
><br>
><br>
> toybox/posix/mkdir.c does the normal mkdir really reset the process label for all future use when you use -p & -Z ? should it set it back to normal when the command is done? or is that per process context that vanishes on exit?<br>
><br>
><br>
><br>
> toys/posix/mkfifo.c lost TOYBOX_USR<br>
><br>
><br>
> I could not find any way to comment on git hub directly though.<br>
><br>
> Jim<br>
</span>(snip)<br>
<br>
Hello,<br>
<br>
>From your comments, I made big changes that can be seen here<br>
<br>
<a href="https://github.com/jobol/toybox/tree/smack-9" target="_blank">https://github.com/jobol/toybox/tree/smack-9</a><br>
<br>
It introduces the files lib/security.[ch] to coalesce security stuff, as<br>
was suggested Elliott.<br>
<br>
It also introduce SECURITY_(NONE|SMACK|SELINUX) macros... To be<br>
discussed I think.<br>
<br>
It also fix some bugs that I found.<br>
<br>
Remains 2 problems:<br>
- the cp -p that I want to fix now<br>
- the good alignment of special files in ls<br>
<br>
Thank you again for the review<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">José Bollo<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Elliott Hughes - <a href="http://who/enh" target="_blank">http://who/enh</a> - <a href="http://jessies.org/~enh/" target="_blank">http://jessies.org/~enh/</a><br>Android native code/tools questions? Mail me/drop by/add me as a reviewer.</div>
</div>