Merge pull request #15955 from anitazha/nullorempty

core: check null_or_empty_path for masked units instead of /dev/null
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-07-08 22:18:17 +02:00
committed by GitHub
3 changed files with 43 additions and 12 deletions
+1 -1
View File
@@ -5955,7 +5955,7 @@ const char *unit_label_path(const Unit *u) {
return NULL;
/* If a unit is masked, then don't read the SELinux label of /dev/null, as that really makes no sense */
if (path_equal(p, "/dev/null"))
if (null_or_empty_path(p) > 0)
return NULL;
return p;