1
0
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:
Lennart Poettering 2011-09-20 01:28:00 +02:00
parent a373b0e7bc
commit 34a2dc4bfc

View File

@ -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;