<div dir="ltr">Hi Rob, List,<div><br></div><div>Few more issues observed. Please find attached the fix patches.</div><div><br></div><div>ln.c : with __-f__ with an existing destination unlink was done, </div><div> but in case where the requested operation failed, the original file is not restored.</div><div> e.g. ln -f dir/ lnk, where source is dir and dest lnk existed.</div><div><br></div><div>login.c : >> On a timeout, the terminal settings were not restored.</div><div> >> Long username was not validated. The remaining data on stdin was taken for password.</div><div> >> few static analysis fixes too.</div><div><br></div><div>ls.c: the grouping of options _o_, _g_, _n_ was not working. It preferred the last one on cmdline.</div><div><br></div><div>mountpoint.c : a clean-up pass.</div><div><br></div><div>rm.c : No error message was thrown for deleting __.__ and __..__ mentioned on cmdline. </div><div> As per rm posix spec [ <span style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">If either of the files dot or dot-dot are specified as the basename portion of an operand (that is, the final pathname component) or if an operand resolves to the root directory, </span><i style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif">rm</i><span style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"> shall write a diagnostic message to standard error and do nothing more with such operands.]</span></div><div><span style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif"><br></span></div><div>rmmod.c: loop through all the modules passed on cmdline.<br></div><div><br></div><div>sort.c: >> -t <val>, error case for <val> as string or empty string.</div><div> >> -k <key>, key value with negative range, e.g. "sort -k 5.-1 data1.txt"</div><div> >> -f had an issue as the condition check was expecting all the flags b, d, i, bb to be present.</div><div> >> in get_key_data(), __Skip body of key__, end was not advancing on space and sorting was happening on wrong field.</div><div> >> enabling __-s__ for __-u__.</div><div><br></div><div>tail.c : added support for __-f__ option, i.e. keep listing on the fds for more data.</div><div><br></div><div>uniq.c : >> sigsegv for large values of __-f__, skip() was looping beyond the str.</div><div> >> accepting __-__ as input or output files.</div><div> >> checking for FLAG_w instead of TT.maxchars, as the input for _-w_ can be supplied as _0_.</div><div><br></div><div>umount.c : __-n__ GNU version mentions not to update /etc/mtab, but in toybox /proc/mounts is ignored instead.</div><div><br></div><div>For touch a patch was delivered earlier also. There are more improvisations over that.</div><div>touch.c : >> A file to be touched must be there as cmdline input.</div><div> >> __-d__ option. strptime() adjusts and parses the input and fits it to the format specified. As per the spec each field in the format is two chars wide. it aligned the date to as it could fit but not to the desired date specified on cmdline.</div><div> Now the input is validated to be in right format before the strptime() is called.</div><div> >> __-t__ option, as for the _-d_ strptime() behavior was fitting the requirement. The format used to fit the date into YY or yy first</div><div> whereas the mandatory fields are <i style="color:rgb(0,0,0);font-size:11pt">MMDDhhmm.</i></div><div><i style="color:rgb(0,0,0);font-size:11pt"> >> </i>touching the already existing file of another user, this was causing infinite loop, as open was successful.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 5:17 PM, Ashwini Sharma <span dir="ltr"><<a href="mailto:ak.ashwini1981@gmail.com" target="_blank">ak.ashwini1981@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rob, List,<div><br></div><div>While verifying toybox on one of our products, came across few issues.</div><div>Attached are the patches to those.</div><div><br></div><div>1. cp.c : For __mv__ with __-f__ and __-i__ user was prompted.</div><div><br></div><div>2. date.c: added support for additional date format parsing, a SIGSEGV for setdate, output in __-u__.</div><div><br></div><div>3. df.c: Output format and strings as specified in Posix and a correction when a </div><div> device name is given. e.g. df /dev/sda1 <br></div><div><br></div><div>4. du.c: stop the traversal on a self pointing link. </div><div><br></div><div>5. expr.c: Added '==' sign into list of operations. Also added support for regex pattern match.</div><div><br></div><div>6. ifconfig.c: stop parsing if interface name is encountered first.</div><div><br></div><div>7. killall.c: output formatting corrected. It was right justifying 4000 places.</div><div><br></div><div>8. kill.c: printing signal numbers along with names while listing.</div><div> Also listing the signals on command line, if name is given list the number </div><div> and vice-versa.</div><div> e.g $ ./toybox kill -l ABRT 2 ILL</div><div> 6</div><div> INT</div><div> 4</div><div>9 lib.c: A static analysis issue fix for retrun value check.</div><div> supporting change for kill.c.</div><div> A Change in string_to_mode, while parsing sticky/suid bit for u, g, o. </div><div> e.g chmod u+s,o+s,g+s file</div><div> And a correction in human_readable().</div><div><br></div><div>Few more will follow..</div><div><br></div><div>rgds,</div><div>Ashwini</div></div>
</blockquote></div><br></div>