]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
samples/bpf: Don't try to remove user's homedir on clean
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 20 Jan 2020 13:06:41 +0000 (14:06 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commitb5c2308576038784655e89d4abd35b8542497383
treee0ee072ee289b8dc070157be4640fdb22d08a405
parent108fdfb3a2a409472f8f1cabd30e9768c42cd92d
samples/bpf: Don't try to remove user's homedir on clean

BugLink: https://bugs.launchpad.net/bugs/1866678
commit b2e5e93ae8af6a34bca536cdc4b453ab1e707b8b upstream.

The 'clean' rule in the samples/bpf Makefile tries to remove backup
files (ending in ~). However, if no such files exist, it will instead try
to remove the user's home directory. While the attempt is mostly harmless,
it does lead to a somewhat scary warning like this:

rm: cannot remove '~': Is a directory

Fix this by using find instead of shell expansion to locate any actual
backup files that need to be removed.

Fixes: b62a796c109c ("samples/bpf: allow make to be run from samples/bpf/ directory")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Link: https://lore.kernel.org/bpf/157952560126.1683545.7273054725976032511.stgit@toke.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
samples/bpf/Makefile