]> git.ipfire.org Git - thirdparty/util-linux.git/commit
hwclock: use parse_date function
authorJ William Piggott <elseifthen@gmx.com>
Sat, 4 Mar 2017 16:04:10 +0000 (11:04 -0500)
committerJ William Piggott <elseifthen@gmx.com>
Sat, 4 Mar 2017 16:04:10 +0000 (11:04 -0500)
commit7a3000f7ba548cf7d74ac77cc63fe8de228a669e
tree9b53ef9b18a581dda3099ba66b4d3e8e3d50e2df
parent30d7f61f4fc1967190a734e2d62696d546fb6378
hwclock: use parse_date function

* hwclock.c: replace interpret_date_string() with parse_date().
   Eliminates shell injection vulnerability from popen() date(1).
   Removes system dependency on date(1).
   Reduction in hwclock execution time.
   Significant cleanup of hwclock.c code.

* Bug fix for "hwclock --predict --date 'bad_date'" printing:
    hwclock: No usable set-to time.  Cannot set clock.

  The message now matches date(1) for an invalid --date argument.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
sys-utils/hwclock.c