From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#28092: 26.0.50; archive-int-to-mode check S_ISUID, S_ISGID bits in reverse order Date: Tue, 15 Aug 2017 11:31:25 +0900 Message-ID: <87tw19a7eq.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1502764338 10132 195.159.176.226 (15 Aug 2017 02:32:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 15 Aug 2017 02:32:18 +0000 (UTC) To: 28092@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 15 04:32:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhReI-0001y6-RA for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Aug 2017 04:32:07 +0200 Original-Received: from localhost ([::1]:52772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhReP-0007z4-3R for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Aug 2017 22:32:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhReI-0007yA-BN for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhReE-0000dd-AP for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57115) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhReE-0000dV-7a for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dhReD-0006p9-V4 for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Aug 2017 02:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28092 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150276430826221 (code B ref -1); Tue, 15 Aug 2017 02:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Aug 2017 02:31:48 +0000 Original-Received: from localhost ([127.0.0.1]:37563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhRdz-0006or-Pb for submit@debbugs.gnu.org; Mon, 14 Aug 2017 22:31:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhRdy-0006ol-BW for submit@debbugs.gnu.org; Mon, 14 Aug 2017 22:31:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhRds-0000Zv-6C for submit@debbugs.gnu.org; Mon, 14 Aug 2017 22:31:41 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49664) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhRds-0000Zq-2f for submit@debbugs.gnu.org; Mon, 14 Aug 2017 22:31:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhRdq-0007oS-W5 for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:31:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhRdm-0000ZD-RT for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:31:38 -0400 Original-Received: from mail-pg0-x235.google.com ([2607:f8b0:400e:c05::235]:33315) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhRdm-0000Z7-Ke for bug-gnu-emacs@gnu.org; Mon, 14 Aug 2017 22:31:34 -0400 Original-Received: by mail-pg0-x235.google.com with SMTP id u5so58639280pgn.0 for ; Mon, 14 Aug 2017 19:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=4RWFkTVp0jW+WVs1AixOPllKkn7FGl+RiGY6FcrlekE=; b=TkZfhc95LgL+Dt1lu+RnW02hROWRGfLkdle60Fn0+eeRCgyuNRdyvNhCMgxaJIyI+S 0HKhohSgdmH+Djx+r7C8dsFfJl3SO95BX7o9lEYUWLAI0pPrA2EyLwdgQr6k0VsINJKl B/3Bro1cl1CtrlJ0vptnZTYpm8JL/JjFJKi46/r3u45eMnbzOoFmlMW8FeolGNl1r4ek fD4L1ojkglQPgNwWfNEFUxLSOhwfOY6S8mUBkWEPWlAkq8tWTH8NKjWgwoDuwtF4MXdo WG4Ho7NoQPokf9rJDIp/CcSKbb9Gv3ys+wFQVuLJj5c1oQMNyA788ZPZxewFG68F2Gq8 3lJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=4RWFkTVp0jW+WVs1AixOPllKkn7FGl+RiGY6FcrlekE=; b=bnY85tsYblUpQW+7nk8ETHWdCkE9xZK/8XcYHfZ+VZ+3V+7JsEtM7SWHCIGa6TO2CQ dva6+PONuDnEHjprHklujL/wo6Y5UatUgi0r+NFoduwPhpnWZLTmeFDXr0W3MYyP8nj5 5EBAlP9gVEcEnr5tJ07h21TN+tj0Xu3WR3T3iuVgKBIYZR1L6Id2wsIDg/ESEufA2gRy RXhoXrn1PPu1ntw0CjgidgxCBNoDqYT2gU0pJu3yq+jb8TItdB8WXBfYEUjhgQYVzFf/ 88s0QhlbfocmXGtS7FKYSH9NROQM0m4CKIEWju3NXbriXK35SMpjaiK4uVl5U9k19vyu j14A== X-Gm-Message-State: AHYfb5jzNW0Etjx9Ik84uwO/xdN2NwrNyFkWnP36tmtnvpiUSOho/Q0N lkhtLEbbjIhcF5a/ X-Received: by 10.84.213.136 with SMTP id g8mr24045508pli.107.1502764293488; Mon, 14 Aug 2017 19:31:33 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id z5sm13690073pgr.35.2017.08.14.19.31.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Aug 2017 19:31:33 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135765 Archived-At: Tags: patch emacs -Q -l arc-mode (archive-int-to-mode 2048) => "------S---" ; It should be: "---S------" (archive-int-to-mode 1024) => "---S------" ; It should be: "------S---" --8<-----------------------------cut here---------------start------------->8--- commit 03b830d7ad819118c8b9d4e30cf6da638a579c88 Author: Tino Calancha Date: Tue Aug 15 11:15:10 2017 +0900 archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits * lisp/arc-mode.el (archive-int-to-mode): Swap order of 2048 with 1024 tests (Bug#28092). * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode): Update test. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index bd7548b704..938c143b8e 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -559,13 +559,13 @@ archive-int-to-mode (if (zerop (logand 256 mode)) ?- ?r) (if (zerop (logand 128 mode)) ?- ?w) (if (zerop (logand 64 mode)) - (if (zerop (logand 1024 mode)) ?- ?S) - (if (zerop (logand 1024 mode)) ?x ?s)) + (if (zerop (logand 2048 mode)) ?- ?S) + (if (zerop (logand 2048 mode)) ?x ?s)) (if (zerop (logand 32 mode)) ?- ?r) (if (zerop (logand 16 mode)) ?- ?w) (if (zerop (logand 8 mode)) - (if (zerop (logand 2048 mode)) ?- ?S) - (if (zerop (logand 2048 mode)) ?x ?s)) + (if (zerop (logand 1024 mode)) ?- ?S) + (if (zerop (logand 1024 mode)) ?x ?s)) (if (zerop (logand 4 mode)) ?- ?r) (if (zerop (logand 2 mode)) ?- ?w) (if (zerop (logand 1 mode)) ?- ?x))) diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el index 04047bab62..c2501e921a 100644 --- a/test/lisp/arc-mode-tests.el +++ b/test/lisp/arc-mode-tests.el @@ -27,7 +27,7 @@ (cons 420 "-rw-r--r--") (cons 292 "-r--r--r--") (cons 512 "----------") - (cons 1024 "---S------")))) + (cons 1024 "------S---")))) (dolist (x alist) (should (equal (cdr x) (archive-int-to-mode (car x))))))) --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-08-15 Repository revision: e88bbd22c5ffb1d6008c0c7e18a36043b0f397dd