From 10bd54adb4ed80c8258f2bd97a83df18379fc11e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 25 Aug 2009 06:05:59 +0200 Subject: [PATCH] Check if pkg INSTALL/REMOVE metadata scripts are executable rather than readable, to ensure scripts can be executed. --HG-- extra : convert_revision : xtraeme%40gmail.com-20090825040559-nkkzvaf59r10asj7 --- lib/configure.c | 2 +- lib/remove.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/configure.c b/lib/configure.c index 0fff3107..cbd6db9e 100644 --- a/lib/configure.c +++ b/lib/configure.c @@ -122,7 +122,7 @@ xbps_configure_pkg(const char *pkgname, const char *version, bool check_state) if (chdir(rootdir) == -1) return errno; - if (access(buf, R_OK) == 0) { + if (access(buf, X_OK) == 0) { if ((rv = xbps_file_chdir_exec(rootdir, buf, "post", pkgname, version, NULL)) != 0) { free(buf); diff --git a/lib/remove.c b/lib/remove.c index ad3c8fb5..2078940d 100644 --- a/lib/remove.c +++ b/lib/remove.c @@ -215,7 +215,7 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update) /* * Find out if the REMOVE file exists. */ - if (access(buf, R_OK) == 0) { + if (access(buf, X_OK) == 0) { /* * Run the pre remove action. */