basic/path-util: allow flags for path_equal_or_files_same
No functional change, just a new parameters and the tests that AT_SYMLINK_NOFOLLOW works as expected.
This commit is contained in:
+1
-1
@@ -182,7 +182,7 @@ int rm_rf(const char *path, RemoveFlags flags) {
|
||||
/* We refuse to clean the root file system with this
|
||||
* call. This is extra paranoia to never cause a really
|
||||
* seriously broken system. */
|
||||
if (path_equal_or_files_same(path, "/")) {
|
||||
if (path_equal_or_files_same(path, "/", 0)) {
|
||||
log_error("Attempted to remove entire root file system, and we can't allow that.");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user