<div>Hi. Rob</div><div> </div><div>I checked your changes ( New header is created. lib/lsm.h) on _Tizen Emulator_</div><div>And ls puts right smack label with -Z option.</div><div>But there is a minor issue regarding spacing and alignment.</div><div> </div><div>For example, doing "toybox ls -alZ"</div><div>There is no spacing between groupowner and smack label.</div><div>Further, other conjuction of options with Z causes spacing or alignment issue.</div><div> </div><div>plz, check if you have time.</div><div> </div><div> </div><div> </div><div><pre>On Mon, May 18, 2015 at 2:58 AM, José Bollo <<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net">jobol at nonadev.net</a>> wrote:
><i> Le mercredi 13 mai 2015 à 14:15 -0700, enh a écrit :
</i>><i> (snip)
</i>>><i>
</i>>><i> To be correct, from my cp man page, I see that "-p" is same as
</i>>><i> "--preserve=mode,ownership,timestamps" and that
</i>>><i> "--preserve[=ATTR_LIST]"
</i>>><i> accepts the attributes: "context", "links", "xattr", "mode",
</i>>><i> "ownership", "timestamps", and "all".
</i>>><i>
</i>>><i>
</i>>><i> coincidentally, someone on Android asked for cp --preserve this week.
</i>>><i> internal bug 21121352. i'll get around to that at some point if no one
</i>>><i> beats me to it (but not before Google I/O).
</i>><i>
</i>><i> Hi Elliott, hi all,
</i>><i>
</i>><i> I worked a lot last Wednesday on implementing "cp --preserve". It works
</i>><i> quiet well now on my side. I planned to finalize it this Monday.
</i>><i>
</i>><i> So let me know if you already made some effort on your side.
</i>><i>
</i>><i> I need advise about how to write a good test of cp for toybox
</i>
I threw this on the todo list but if somebody beats me to it...
Speaking of which, here are some notes from yesterday (results already
checked in) about banging on ls:
-----
The S_ISLNK() stanza is an abomination. I realize that you need to do this,
but let's be honest: this is a bug workaround for kernel problems stemming
from the fact that these APIs haven't been updated since the 1990's.
Either there should be a getfileconat() or fgetfilecon() should work
on O_PATH filehandles.
Why is |O_NOATIME commented out here? The man page says it was introduced in
2.6.8, git annotate says openat() was introduced 2.6.16 (which was 2006
and we depend on posix-2008...)
Ah, I see:
#ifdef __USE_GNU
# define O_DIRECT 040000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
Once again, the linux kernel is not a part of the gnu project and the glibc
developers didn't get that. Right, easy to fix up in portability.h.
And why does this have O_NONBLOCK? We're recursing down into directories
using openat() without that. Does this mean something in an selinux or
smack context?
The label: and totals: behavior is funky.
"ls -s" and "ls -sd *" differ, the first prints totals: the second doesn't
because total: is only on contents of a directory - posix
Fix fix fix...
-----
And here are notes from Jose's socket update patch:
I don't think this covers all the cases. What about symlink to a socket
without -L, or symlink to a file we haven't got permission to open? In
those cases we need the "follow symlink but do it by path because O_PATH
is broken" version?
Also, if O_PATH worked, we wouldn't need O_NONBLOCK to avoid triggering
automounting. (Is automounting still a thing in 2015?)
P.S. I pulled your "other fix" by taking the actual commit, see
git f25d4954a786.
Rob
</pre></div><div> </div>