]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix unlink(1) for files starting with -
authoremaste <emaste@FreeBSD.org>
Wed, 12 Sep 2018 19:41:16 +0000 (19:41 +0000)
committeremaste <emaste@FreeBSD.org>
Wed, 12 Sep 2018 19:41:16 +0000 (19:41 +0000)
commit09ea8dbf1ed3d37f02217b6c10c2fb60fa64fbc1
tree8cd553ae47cd6644534452ea731cee03d37d3318
parent60fe6885ffbaea23b3c016ad63856db5a1ba7fa0
Fix unlink(1) for files starting with -

Restore the original behavior of unlink(1), passing the provided filename
directly to unlink(2), handling the first argument being "--" correctly.

This fixes "unlink -foo", broken in r97533.

PR: 228448
Submitted by: Brennan Vincent <brennan@umanwizard.com> (original version)
Submitted by: Yuri Pankov
Reported by: Brennan Vincent <brennan@umanwizard.com>
Reviewed by: emaste, kevans, vangyzen, 0mp
Approved by: re (delphij)
Differential Revision: https://reviews.freebsd.org/D17132
bin/rm/Makefile
bin/rm/rm.1
bin/rm/rm.c
bin/rm/tests/Makefile [new file with mode: 0644]
bin/rm/tests/Makefile.depend [new file with mode: 0644]
bin/rm/tests/rm_test.sh [new file with mode: 0755]
etc/mtree/BSD.tests.dist