Hi. I did answer below.<br><div class="gmail_quote">2015-06-01 15:46 GMT+09:00 Rob Landley <span dir="ltr"><<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><span>On Mon, Jun 1, 2015 at 1:29 AM, Hyejin Kim <<a href="mailto:hj8296@gmail.com">hj8296@gmail.com</a>> wrote:<br>
> Hi.<br>
><br>
> This time _mkdir_ and _id_ were verified for smack behavior.<br>
<br>
</span>Sorry I've been AWOL: still in Japan through the 7th. (Giving a talk<br>
at LinuxCon Japan on thursday:<br>
<a href="http://lccojapan2015.sched.org/event/860288ccda595208a5d7337d31c6075c#.VWv3sR-1XVN" target="_blank">http://lccojapan2015.sched.org/event/860288ccda595208a5d7337d31c6075c#.VWv3sR-1XVN</a><br>
if you're curious. :)<br></blockquote><div> </div><div>The link may be wrong. it can't be opened. Can you check one more?</div><div>I want to share this with my co-workers.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<span><br>
> -Z option of the 2 can print security label.<br>
><br>
> But, there is a meager issue.<br>
><br>
> 1) "toybox mkdir --help" does not display -Z option is supported<br>
<br>
</span>Yeah, I have a todo item for that. My help text collating<br>
infrastructure is hiccuping, I'm not sure why yet. (Known issue, my<br>
bad, I intend to fix it before cutting a release. Tentatively thinking<br>
somewhere around the 15th, maybe? I need to get home and then have a<br>
week to deal with backlog...)<br>
<span><br>
> 2) "toybox id -Znr" can print something while "coreutils' id -Znr" gives<br>
> error message.<br>
<br>
</span>I still haven't got a smack build environment, but I can build<br>
selinux, and it goes:<br>
<br>
$ ./toybox id -Znr<br>
id: SELinux disabled<br></blockquote><div> </div><div>In tizen SDK, -Znr option print like below :</div><div> </div><div>$./toybox id -Znr</div><div>context=sdbd</div><div> </div><div>Of course, it is tested under root privilege and SMACK is also enabled.</div><div> </div><div>Coreutils's id prints : "id: cannot print only names or real IDs in default format".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
And that exited with an error code of 1.<br>
<br>
The test is:<br>
<br>
// This turns into "return 0" when no LSM and lets code optimize out.<br>
static inline int lsm_enabled(void)<br>
{<br>
if (CFG_TOYBOX_SMACK) return !!smack_smackfs_path();<br>
else return is_selinux_enabled() == 1;<br>
}<br>
<br>
So if built with SMACK and smack_smackfs_path() returns NULL, then<br>
lsm_enabled() should return 0 and we should get the disabled message.<br>
<br>
(I note that there's an lsm_name() function so it should say Smack<br>
disabled instead of SELinux for you.)<br>
<br>
Is it not doing that?<br>
<span class="HOEnZb"><font color="#888888"><br>
Rob<br>
</font></span></blockquote></div><br>