X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fpath-util.c;h=5f4252f48cfe7d86ece820d592ed21dd336e05bd;hp=413ddf965b02c7102a2af9954c2ee567d5a73c37;hb=6b05aab633fa55aa3070f186869d8fa219be2f38;hpb=d4b35b9aa181cc5dbd257a4a7cc9f75886a73acc diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 413ddf965..5f4252f48 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -576,10 +574,10 @@ static int binary_is_good(const char *binary) { if (r < 0) return r; - return !path_equal(d, "true") && - !path_equal(d, "/bin/true") && - !path_equal(d, "/usr/bin/true") && - !path_equal(d, "/dev/null"); + return !PATH_IN_SET(d, "true" + "/bin/true", + "/usr/bin/true", + "/dev/null"); } int fsck_exists(const char *fstype) { @@ -782,6 +780,9 @@ bool hidden_file_allow_backup(const char *filename) { endswith(filename, ".dpkg-bak") || endswith(filename, ".dpkg-backup") || endswith(filename, ".dpkg-remove") || + endswith(filename, ".ucf-new") || + endswith(filename, ".ucf-old") || + endswith(filename, ".ucf-dist") || endswith(filename, ".swp"); }