<div dir="ltr">a few comments...<div><br></div><div><table class="" style="border-spacing:0px;width:918px;color:rgb(51,51,51);font-family:Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';font-size:13px;line-height:18.2000007629395px"><tbody><tr></tr><tr><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+<span class="" style="color:rgb(150,152,150)">config MKNOD_SMACK</span></span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-a608377fc05e7bb446fb1cf589f20e6fR21" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td></tr></tbody></table><br></div><div>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.</div><div><br></div><div>(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.)</div><div><br></div><div><table class="" style="border-spacing:0px;width:918px;color:rgb(51,51,51);font-family:Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';font-size:13px;line-height:18.2000007629395px"><tbody><tr></tr><tr><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ <span class="" style="color:rgb(167,29,93)">if</span> (<span class="" style="color:rgb(0,134,179)">smack_set_label_for_path</span>(*s, XATTR_NAME_SMACK, <span class="" style="color:rgb(0,134,179)">0</span>, TT.<span class="">arg_context</span>) < <span class="" style="color:rgb(0,134,179)">0</span>) {</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R51" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ <span class="" style="color:rgb(0,134,179)">unlink</span>(*s);</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R52" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ <span class="" style="color:rgb(0,134,179)">error_exit</span>(<span class="" style="color:rgb(24,54,145)"><span class="">"</span>Unable to create fifo '<span class="" style="color:rgb(0,134,179)">%s</span>' with '<span class="" style="color:rgb(0,134,179)">%s</span>' as context.<span class="">"</span></span>, *s, TT.<span class="">arg_context</span>);</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R53" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ }</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R54" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td></tr></tbody></table><br></div><div>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). </div><div><br></div><div><table class="" style="border-spacing:0px;width:918px;color:rgb(51,51,51);font-family:Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';font-size:13px;line-height:18.2000007629395px"><tbody><tr><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ <span class="" style="color:rgb(167,29,93)">if</span> (<span class="" style="color:rgb(0,134,179)">mknod</span>(*s, S_IFIFO | TT.<span class="">mode</span>, <span class="" style="color:rgb(0,134,179)">0</span>) < <span class="" style="color:rgb(0,134,179)">0</span>) {</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R46" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ <span class="" style="color:rgb(0,134,179)">perror_msg</span>(<span class="" style="color:rgb(24,54,145)"><span class="">"</span><span class="" style="color:rgb(0,134,179)">%s</span><span class="">"</span></span>, *s);</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R47" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ }</span></td></tr><tr><td class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td id="diff-305c8d8be211394c2bdc4a2ec6ae9696R48" class="" style="padding:0px 10px;width:50px;min-width:50px;white-space:nowrap;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:18px;color:rgba(0,0,0,0.298039);vertical-align:top;text-align:right;border-style:solid;border-color:rgb(193,233,193);border-width:0px 1px 0px 0px;background-color:rgb(219,255,219)"></td><td class="" style="padding:0px 10px;vertical-align:top;background-color:rgb(234,255,234)"><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;overflow:visible;word-wrap:normal">+ <span class="" style="color:rgb(167,29,93)">if</span> (CFG_MKFIFO_SMACK) {</span></td></tr></tbody></table></div><div><br></div><div>i think you missed an 'else' here?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 5, 2015 at 8:18 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">Hi all,<br>
<br>
I rebased the works made for Smack on the head of toybox. This fruit can<br>
be picked here.<br>
<br>
<a href="https://github.com/jobol/toybox/tree/smack-7" target="_blank">https://github.com/jobol/toybox/tree/smack-7</a><br>
<br>
Best regards<br>
José<br>
<br>
_______________________________________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" target="_blank">http://lists.landley.net/listinfo.cgi/toybox-landley.net</a><br>
</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>