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
This commit is contained in:
Juan RP 2009-08-25 06:05:59 +02:00
parent fd5afa2efb
commit 10bd54adb4
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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.
*/