chiark / gitweb /
condition: in ConditionPathIsExecutable follow symlinks
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Sep 2011 23:28:00 +0000 (01:28 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 19 Sep 2011 23:28:07 +0000 (01:28 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=737047

src/condition.c

index 8c08be4..933aec8 100644 (file)
@@ -171,7 +171,7 @@ bool condition_test(Condition *c) {
         case CONDITION_FILE_IS_EXECUTABLE: {
                 struct stat st;
 
         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;
                         return !c->negate;
 
                 return (S_ISREG(st.st_mode) && (st.st_mode & 0111)) == !c->negate;