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 541531381F3 for ; Sun, 23 Dec 2012 01:32:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 636D721C061; Sun, 23 Dec 2012 01:32:34 +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 DEB8C21C061 for ; Sun, 23 Dec 2012 01:32:33 +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 DA83C33DBC6 for ; Sun, 23 Dec 2012 01:32:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7DF91E543C for ; Sun, 23 Dec 2012 01:32:31 +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: <1356226330.d38949f317d4721b4702349e255ecac769a13ce6.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: d38949f317d4721b4702349e255ecac769a13ce6 X-VCS-Branch: master Date: Sun, 23 Dec 2012 01:32:31 +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: 3a69f489-e39a-42d6-96d4-3b49ed3f9432 X-Archives-Hash: 95316109c00a8f3900bfcf47a2089e7f commit: d38949f317d4721b4702349e255ecac769a13ce6 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 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: