aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-10 13:16:11 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-10 13:16:11 -0500
commit02d7dcc535a2c39492bbfb6b49543fd53bebe05d (patch)
treebde239b456c846cd95ba65ab2521086375b9ce84 /scripts
parentFixes a typo in revdep-pax script and documentation (diff)
downloadelfix-02d7dcc535a2c39492bbfb6b49543fd53bebe05d.tar.gz
elfix-02d7dcc535a2c39492bbfb6b49543fd53bebe05d.tar.bz2
elfix-02d7dcc535a2c39492bbfb6b49543fd53bebe05d.zip
Work towards making both PT_PAX and xattr PAX optional
X-Gentoo-Bug: 427890 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=427890 X-Gentoo-Bug: 440018 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=440018
Diffstat (limited to 'scripts')
-rw-r--r--scripts/paxmodule.c16
-rwxr-xr-xscripts/setup.py8
2 files changed, 12 insertions, 12 deletions
diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index c3dfc28..9cd1ec3 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -22,7 +22,7 @@
#include <gelf.h>
-#ifdef XATTR
+#ifdef XTPAX
#include <attr/xattr.h>
#endif
@@ -31,7 +31,7 @@
#include <fcntl.h>
#include <unistd.h>
-#ifdef XATTR
+#ifdef XTPAX
#define PAX_NAMESPACE "user.pax.flags"
#endif
@@ -177,7 +177,7 @@ string2bin(char *buf)
}
-#ifdef XATTR
+#ifdef XTPAX
uint16_t
get_xt_flags(int fd)
{
@@ -236,7 +236,7 @@ pax_getflags(PyObject *self, PyObject *args)
return NULL;
}
-#ifdef XATTR
+#ifdef XTPAX
flags = get_xt_flags(fd);
if( flags != UINT16_MAX )
{
@@ -252,7 +252,7 @@ pax_getflags(PyObject *self, PyObject *args)
memset(buf, 0, FLAGS_SIZE);
bin2string(flags, buf);
}
-#ifdef XATTR
+#ifdef XTPAX
}
#endif
@@ -316,7 +316,7 @@ set_pt_flags(int fd, uint16_t pt_flags)
}
-#ifdef XATTR
+#ifdef XTPAX
void
set_xt_flags(int fd, uint16_t xt_flags)
{
@@ -352,7 +352,7 @@ pax_setbinflags(PyObject *self, PyObject *args)
set_pt_flags(fd, flags);
-#ifdef XATTR
+#ifdef XTPAX
set_xt_flags(fd, flags);
#endif
@@ -384,7 +384,7 @@ pax_setstrflags(PyObject *self, PyObject *args)
set_pt_flags(fd, flags);
-#ifdef XATTR
+#ifdef XTPAX
set_xt_flags(fd, flags);
#endif
diff --git a/scripts/setup.py b/scripts/setup.py
index 40aecdb..8c78279 100755
--- a/scripts/setup.py
+++ b/scripts/setup.py
@@ -3,26 +3,26 @@
import os
from distutils.core import setup, Extension
-xattr = os.getenv('XATTR')
+xattr = os.getenv('XTPAX')
if xattr != None:
module1 = Extension(
name='pax',
sources = ['paxmodule.c'],
libraries = ['elf', 'attr'],
- define_macros = [('XATTR', None)]
+ define_macros = [('XTPAX', None)]
)
else:
module1 = Extension(
name='pax',
sources = ['paxmodule.c'],
libraries = ['elf'],
- undef_macros = ['XATTR']
+ undef_macros = ['XTPAX']
)
setup(
name = 'PaxPython',
- version = '1.0',
+ version = '2.0',
author = 'Anthony G. Basile',
author_email = 'blueness@gentoo.org',
url = 'http://dev.gentoo.org/~blueness/elfix',