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 F2FF51381F3 for ; Sat, 10 Nov 2012 21:35:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A47E821C014; Sat, 10 Nov 2012 21:35:47 +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 2B36E21C014 for ; Sat, 10 Nov 2012 21:35:47 +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 11AC733D972 for ; Sat, 10 Nov 2012 21:35:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 822E6E5436 for ; Sat, 10 Nov 2012 21:35:44 +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: <1352583327.0899662410bf18690fbcec4d996a0380b46ded88.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: src/ X-VCS-Repository: proj/elfix X-VCS-Files: src/paxctl-ng.c X-VCS-Directories: src/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 0899662410bf18690fbcec4d996a0380b46ded88 X-VCS-Branch: master Date: Sat, 10 Nov 2012 21:35:44 +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: ae226f7e-36ac-4057-aa7d-3687355f8162 X-Archives-Hash: b575560760d0335b5a189eecd945a1cc commit: 0899662410bf18690fbcec4d996a0380b46ded88 Author: Anthony G. Basile gentoo org> AuthorDate: Sat Nov 10 21:35:27 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Nov 10 21:35:27 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=08996624 src/paxctl-ng.c: fix logic of limiting pt/xtpax when both are possible --- src/paxctl-ng.c | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c index 2de2614..61bbcce 100644 --- a/src/paxctl-ng.c +++ b/src/paxctl-ng.c @@ -590,26 +590,38 @@ set_flags(int fd, uint16_t *pax_flags, int rdwr_pt_pax, int limit, int verbose) uint16_t flags; #ifdef PTPAX - if(rdwr_pt_pax && !( limit == LIMIT_TO_XT_FLAGS) ) + if(rdwr_pt_pax) { - flags = get_pt_flags(fd, verbose); - if( flags == UINT16_MAX ) - flags = PF_NOEMUTRAMP ; - flags = update_flags( flags, *pax_flags); - set_pt_flags(fd, flags, verbose); +#ifdef XTPAX + if( !(limit == LIMIT_TO_XT_FLAGS)) + { +#endif + flags = get_pt_flags(fd, verbose); + if( flags == UINT16_MAX ) + flags = PF_NOEMUTRAMP ; + flags = update_flags( flags, *pax_flags); + set_pt_flags(fd, flags, verbose); +#ifdef XTPAX + } +#endif + } #endif #ifdef XTPAX - if( !( limit == LIMIT_TO_PT_FLAGS) ) +#ifdef PTPAX + if( !(limit == LIMIT_TO_PT_FLAGS) ) { +#endif flags = get_xt_flags(fd); if( flags == UINT16_MAX ) flags = PF_NOEMUTRAMP ; flags = update_flags( flags, *pax_flags); set_xt_flags(fd, flags); +#ifdef PTPAX } #endif +#endif }