From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B0DD61381F3 for ; Sun, 23 Dec 2012 02:36:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DFA9021C055; Sun, 23 Dec 2012 02:36:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 207DC21C0D2 for ; Sun, 23 Dec 2012 02:36:11 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 313DD33D88E for ; Sun, 23 Dec 2012 02:36:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CCE6DE544A for ; Sun, 23 Dec 2012 02:36:08 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1356230154.f05e609305d48f77fb7bf48e7bab7c89ea11861f.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: scripts/, misc/ X-VCS-Repository: proj/elfix X-VCS-Files: misc/alt-revdep-pax scripts/migrate-pax X-VCS-Directories: scripts/ misc/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: f05e609305d48f77fb7bf48e7bab7c89ea11861f X-VCS-Branch: master Date: Sun, 23 Dec 2012 02:36:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b49e2322-e45d-45bb-a237-2140a5a60430 X-Archives-Hash: f12ce7b5baea1a4eb76ecedd3e2976b9 commit: f05e609305d48f77fb7bf48e7bab7c89ea11861f Author: Anthony G. Basile gentoo org> AuthorDate: Sun Dec 23 01:29:13 2012 +0000 Commit: Anthony G. Basile gentoo 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: