public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  1:19 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  1:19 UTC (permalink / raw
  To: gentoo-commits

commit:     6e6e8b0b77c8b97a8e0c5b48e94be22367f627c9
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:19:46 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 01:19:46 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=6e6e8b0b

scripts/paxmodule.c: fix logic of finding either PT_PAX or XATTR_PAX

---
 misc/alt-revdep-pax |    2 +-
 scripts/paxmodule.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 6c0c7ba..58fba3c 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -195,7 +195,7 @@ def print_object_linkings( object_linkings, soname2library, verbose ):
 			sv = '%s ( %s )\n' % ( elf, elf_str_flags )
 			s = sv
 		except pax.PaxError:
-			elf_without_flags.append(elf)
+			elfs_without_flags.append(elf)
 			continue
 
 		count = 0

diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index f77dabb..f329df8 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -281,7 +281,7 @@ static PyObject *
 pax_getflags(PyObject *self, PyObject *args)
 {
 	const char *f_name;
-	int fd;
+	int fd, flags_found;
 	uint16_t flags;
 	char buf[FLAGS_SIZE];
 
@@ -308,10 +308,13 @@ pax_getflags(PyObject *self, PyObject *args)
 	 * other but not both.
 	 */
 
+	flags_found = 0;
+
 #ifdef PTPAX
 	flags = get_pt_flags(fd);
 	if( flags != UINT16_MAX )
 	{
+		flags_found = 1;
 		memset(buf, 0, FLAGS_SIZE);
 		bin2string4print(flags, buf);
 	}
@@ -321,6 +324,7 @@ pax_getflags(PyObject *self, PyObject *args)
 	flags = get_xt_flags(fd);
 	if( flags != UINT16_MAX )
 	{
+		flags_found = 1;
 		memset(buf, 0, FLAGS_SIZE);
 		bin2string4print(flags, buf);
 	}
@@ -328,7 +332,7 @@ pax_getflags(PyObject *self, PyObject *args)
 
 	close(fd);
 
-	if( flags == UINT16_MAX )
+	if( !flags_found )
 	{
 		PyErr_SetString(PaxError, "pax_getflags: no PAX flags found");
 		return NULL;


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  1:29 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  1:29 UTC (permalink / raw
  To: gentoo-commits

commit:     ce097bbdaaa667d2c30475c7035d282725689199
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:29:13 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 01:29:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=ce097bbd

scripts/migrate-pax, misc/alt-revdep-pax: immediately bail if we are not root

---
 misc/alt-revdep-pax |    6 ++++++
 scripts/migrate-pax |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 58fba3c..42669f6 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -523,6 +523,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0 and do_migration:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'hfrb:s:l:vemy')
 	except getopt.GetoptError as err:

diff --git a/scripts/migrate-pax b/scripts/migrate-pax
index 1d5c2f7..09a41e2 100755
--- a/scripts/migrate-pax
+++ b/scripts/migrate-pax
@@ -55,6 +55,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'vmdh')
 	except getopt.GetoptError as err:
@@ -95,12 +101,6 @@ def main():
 		run_usage()
 		sys.exit(1)
 
-	# Are we root?
-	uid = os.getuid()
-	if uid != 0 and do_migration:
-		print('RUN AS ROOT: cannot migrate flags')
-		sys.exit(1)
-
 	# Do we have XATTR_PAX support?
 	if do_migration or do_deleteall:
 		try:


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  1:32 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  1:32 UTC (permalink / raw
  To: gentoo-commits

commit:     d38949f317d4721b4702349e255ecac769a13ce6
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:29:13 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 01:32:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=d38949f3

scripts/migrate-pax, misc/alt-revdep-pax: immediately bail if we are not root

---
 misc/alt-revdep-pax |    6 ++++++
 scripts/migrate-pax |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 58fba3c..b46fe23 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -523,6 +523,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'hfrb:s:l:vemy')
 	except getopt.GetoptError as err:

diff --git a/scripts/migrate-pax b/scripts/migrate-pax
index 1d5c2f7..09a41e2 100755
--- a/scripts/migrate-pax
+++ b/scripts/migrate-pax
@@ -55,6 +55,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'vmdh')
 	except getopt.GetoptError as err:
@@ -95,12 +101,6 @@ def main():
 		run_usage()
 		sys.exit(1)
 
-	# Are we root?
-	uid = os.getuid()
-	if uid != 0 and do_migration:
-		print('RUN AS ROOT: cannot migrate flags')
-		sys.exit(1)
-
 	# Do we have XATTR_PAX support?
 	if do_migration or do_deleteall:
 		try:


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  2:36 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  2:36 UTC (permalink / raw
  To: gentoo-commits

commit:     208253f698c10024576c5850ed9a48846e6df335
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:19:46 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 02:35:54 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=208253f6

scripts/paxmodule.c: fix logic of finding either PT_PAX or XATTR_PAX

---
 misc/alt-revdep-pax |    2 +-
 scripts/paxmodule.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 6c0c7ba..58fba3c 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -195,7 +195,7 @@ def print_object_linkings( object_linkings, soname2library, verbose ):
 			sv = '%s ( %s )\n' % ( elf, elf_str_flags )
 			s = sv
 		except pax.PaxError:
-			elf_without_flags.append(elf)
+			elfs_without_flags.append(elf)
 			continue
 
 		count = 0

diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index f77dabb..f329df8 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -281,7 +281,7 @@ static PyObject *
 pax_getflags(PyObject *self, PyObject *args)
 {
 	const char *f_name;
-	int fd;
+	int fd, flags_found;
 	uint16_t flags;
 	char buf[FLAGS_SIZE];
 
@@ -308,10 +308,13 @@ pax_getflags(PyObject *self, PyObject *args)
 	 * other but not both.
 	 */
 
+	flags_found = 0;
+
 #ifdef PTPAX
 	flags = get_pt_flags(fd);
 	if( flags != UINT16_MAX )
 	{
+		flags_found = 1;
 		memset(buf, 0, FLAGS_SIZE);
 		bin2string4print(flags, buf);
 	}
@@ -321,6 +324,7 @@ pax_getflags(PyObject *self, PyObject *args)
 	flags = get_xt_flags(fd);
 	if( flags != UINT16_MAX )
 	{
+		flags_found = 1;
 		memset(buf, 0, FLAGS_SIZE);
 		bin2string4print(flags, buf);
 	}
@@ -328,7 +332,7 @@ pax_getflags(PyObject *self, PyObject *args)
 
 	close(fd);
 
-	if( flags == UINT16_MAX )
+	if( !flags_found )
 	{
 		PyErr_SetString(PaxError, "pax_getflags: no PAX flags found");
 		return NULL;


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  2:36 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  2:36 UTC (permalink / raw
  To: gentoo-commits

commit:     f05e609305d48f77fb7bf48e7bab7c89ea11861f
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:29:13 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 02:35:54 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=f05e6093

scripts/migrate-pax, misc/alt-revdep-pax: immediately bail if we are not root

---
 misc/alt-revdep-pax |    6 ++++++
 scripts/migrate-pax |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 58fba3c..b46fe23 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -523,6 +523,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'hfrb:s:l:vemy')
 	except getopt.GetoptError as err:

diff --git a/scripts/migrate-pax b/scripts/migrate-pax
index 1d5c2f7..09a41e2 100755
--- a/scripts/migrate-pax
+++ b/scripts/migrate-pax
@@ -55,6 +55,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'vmdh')
 	except getopt.GetoptError as err:
@@ -95,12 +101,6 @@ def main():
 		run_usage()
 		sys.exit(1)
 
-	# Are we root?
-	uid = os.getuid()
-	if uid != 0 and do_migration:
-		print('RUN AS ROOT: cannot migrate flags')
-		sys.exit(1)
-
 	# Do we have XATTR_PAX support?
 	if do_migration or do_deleteall:
 		try:


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  3:49 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     7da069f24f757a892492d3639bd253106c3b8a05
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:29:13 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 03:48:39 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=7da069f2

scripts/migrate-pax, misc/alt-revdep-pax: immediately bail if we are not root

---
 misc/alt-revdep-pax |    6 ++++++
 scripts/migrate-pax |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 58fba3c..b46fe23 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -523,6 +523,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'hfrb:s:l:vemy')
 	except getopt.GetoptError as err:

diff --git a/scripts/migrate-pax b/scripts/migrate-pax
index 1d5c2f7..09a41e2 100755
--- a/scripts/migrate-pax
+++ b/scripts/migrate-pax
@@ -55,6 +55,12 @@ def run_usage():
 
 
 def main():
+	# Are we root?
+	uid = os.getuid()
+	if uid != 0:
+		print('This program must be run as root')
+		sys.exit(1)
+
 	try:
 		opts, args = getopt.getopt(sys.argv[1:], 'vmdh')
 	except getopt.GetoptError as err:
@@ -95,12 +101,6 @@ def main():
 		run_usage()
 		sys.exit(1)
 
-	# Are we root?
-	uid = os.getuid()
-	if uid != 0 and do_migration:
-		print('RUN AS ROOT: cannot migrate flags')
-		sys.exit(1)
-
 	# Do we have XATTR_PAX support?
 	if do_migration or do_deleteall:
 		try:


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: scripts/, misc/
@ 2012-12-23  3:49 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2012-12-23  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     e31338bf0de64f367f0d1760035019a9a1e147de
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 23 01:19:46 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 03:48:39 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=e31338bf

scripts/paxmodule.c: fix logic of finding either PT_PAX or XATTR_PAX

---
 misc/alt-revdep-pax |    2 +-
 scripts/paxmodule.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 6c0c7ba..58fba3c 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -195,7 +195,7 @@ def print_object_linkings( object_linkings, soname2library, verbose ):
 			sv = '%s ( %s )\n' % ( elf, elf_str_flags )
 			s = sv
 		except pax.PaxError:
-			elf_without_flags.append(elf)
+			elfs_without_flags.append(elf)
 			continue
 
 		count = 0

diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index f77dabb..f329df8 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -281,7 +281,7 @@ static PyObject *
 pax_getflags(PyObject *self, PyObject *args)
 {
 	const char *f_name;
-	int fd;
+	int fd, flags_found;
 	uint16_t flags;
 	char buf[FLAGS_SIZE];
 
@@ -308,10 +308,13 @@ pax_getflags(PyObject *self, PyObject *args)
 	 * other but not both.
 	 */
 
+	flags_found = 0;
+
 #ifdef PTPAX
 	flags = get_pt_flags(fd);
 	if( flags != UINT16_MAX )
 	{
+		flags_found = 1;
 		memset(buf, 0, FLAGS_SIZE);
 		bin2string4print(flags, buf);
 	}
@@ -321,6 +324,7 @@ pax_getflags(PyObject *self, PyObject *args)
 	flags = get_xt_flags(fd);
 	if( flags != UINT16_MAX )
 	{
+		flags_found = 1;
 		memset(buf, 0, FLAGS_SIZE);
 		bin2string4print(flags, buf);
 	}
@@ -328,7 +332,7 @@ pax_getflags(PyObject *self, PyObject *args)
 
 	close(fd);
 
-	if( flags == UINT16_MAX )
+	if( !flags_found )
 	{
 		PyErr_SetString(PaxError, "pax_getflags: no PAX flags found");
 		return NULL;


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-23  3:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-23  1:32 [gentoo-commits] proj/elfix:master commit in: scripts/, misc/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2012-12-23  3:49 Anthony G. Basile
2012-12-23  3:49 Anthony G. Basile
2012-12-23  2:36 Anthony G. Basile
2012-12-23  2:36 Anthony G. Basile
2012-12-23  1:29 Anthony G. Basile
2012-12-23  1:19 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox