mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
condition: in ConditionPathIsExecutable follow symlinks
https://bugzilla.redhat.com/show_bug.cgi?id=737047
This commit is contained in:
parent
a373b0e7bc
commit
34a2dc4bfc
@ -171,7 +171,7 @@ bool condition_test(Condition *c) {
|
||||
case CONDITION_FILE_IS_EXECUTABLE: {
|
||||
struct stat st;
|
||||
|
||||
if (lstat(c->parameter, &st) < 0)
|
||||
if (stat(c->parameter, &st) < 0)
|
||||
return !c->negate;
|
||||
|
||||
return (S_ISREG(st.st_mode) && (st.st_mode & 0111)) == !c->negate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user