From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 20 18:38:54 2011 Received: (at submit) by debbugs.gnu.org; 20 Oct 2011 22:38:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RH1GH-0000Vy-P2 for submit@debbugs.gnu.org; Thu, 20 Oct 2011 18:38:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RH1GF-0000Vh-Oy for submit@debbugs.gnu.org; Thu, 20 Oct 2011 18:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RH1F0-0003SP-Q6 for submit@debbugs.gnu.org; Thu, 20 Oct 2011 18:37:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:54654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH1F0-0003SL-OV for submit@debbugs.gnu.org; Thu, 20 Oct 2011 18:37:34 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH1Ez-0006zx-HO for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 18:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RH1Ey-0003S8-FD for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 18:37:33 -0400 Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:56909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH1Ey-0003Re-4H for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 18:37:32 -0400 Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.4/8.13.4) with ESMTP id p9KMbI0V001847 for ; Fri, 21 Oct 2011 00:37:18 +0200 Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.5/8.14.2) with ESMTP id p9KMbIM7029075; Fri, 21 Oct 2011 00:37:18 +0200 Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.5/8.14.5/Submit) id p9KMbIvC029074; Fri, 21 Oct 2011 00:37:18 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20128.41630.10577.712614@a1i15.kph.uni-mainz.de> Date: Fri, 21 Oct 2011 00:37:18 +0200 To: bug-gnu-emacs@gnu.org Subject: 24.0.90; tar-mode: wrong display of suid and sgid bits X-Mailer: VM 8.1.1 under 23.3.3 (x86_64-pc-linux-gnu) From: Ulrich Mueller X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) In the display of file modes in tar-mode's listing, the suid and sgid bits are interchanged. The following session illustrates the problem: $ touch foo bar $ chmod u+s foo $ chmod g+s bar $ ls -fl foo bar -rwSr--r-- 1 ulm users 0 Oct 20 23:22 foo -rw-r-Sr-- 1 ulm users 0 Oct 20 23:22 bar $ tar cf foo.tar foo bar $ tar tvf foo.tar -rwSr--r-- ulm/users 0 2011-10-20 23:22 foo -rw-r-Sr-- ulm/users 0 2011-10-20 23:22 bar $ emacs -Q foo.tar Now, in tar-mode's listing the two flags are interchanged: -rw-r-sr-- ulm/users 0 foo -rwsr--r-- ulm/users 0 bar Also, they should be displayed with a capital letter S if the corresponding executable bit is not set, and the sticky bit should be shown, too. The patch included below fixes the problem for me. 2011-10-20 Ulrich Mueller * tar-mode.el (tar-grind-file-mode): Display suid and sgid flags correctly. @@ -404,13 +404,19 @@ (string (if (zerop (logand 256 mode)) ?- ?r) (if (zerop (logand 128 mode)) ?- ?w) - (if (zerop (logand 1024 mode)) (if (zerop (logand 64 mode)) ?- ?x) ?s) + (if (zerop (logand 2048 mode)) + (if (zerop (logand 64 mode)) ?- ?x) + (if (zerop (logand 64 mode)) ?S ?s)) (if (zerop (logand 32 mode)) ?- ?r) (if (zerop (logand 16 mode)) ?- ?w) - (if (zerop (logand 2048 mode)) (if (zerop (logand 8 mode)) ?- ?x) ?s) + (if (zerop (logand 1024 mode)) + (if (zerop (logand 8 mode)) ?- ?x) + (if (zerop (logand 8 mode)) ?S ?s)) (if (zerop (logand 4 mode)) ?- ?r) (if (zerop (logand 2 mode)) ?- ?w) - (if (zerop (logand 1 mode)) ?- ?x))) + (if (zerop (logand 512 mode)) + (if (zerop (logand 1 mode)) ?- ?x) + (if (zerop (logand 1 mode)) ?T ?t)))) (defun tar-header-block-summarize (tar-hblock &optional mod-p) "Return a line similar to the output of `tar -vtf'." From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 02:45:57 2011 Received: (at 9817-done) by debbugs.gnu.org; 21 Oct 2011 06:45:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RH8rb-00037w-L7 for submit@debbugs.gnu.org; Fri, 21 Oct 2011 02:45:56 -0400 Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RH8rW-00037i-El for 9817-done@debbugs.gnu.org; Fri, 21 Oct 2011 02:45:51 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RH8qK-0004Bo-TI; Fri, 21 Oct 2011 02:44:36 -0400 From: Glenn Morris To: 9817-done@debbugs.gnu.org Subject: Re: bug#9817: 24.0.90; tar-mode: wrong display of suid and sgid bits References: <20128.41630.10577.712614@a1i15.kph.uni-mainz.de> X-Spook: Commecen fraud AIMSX Noriega InfoSec Mossad halcon ASLET X-Ran: O>+RHQ;{H'FGhTq$-rQuTrI.q4Q^z`n/'4HPRk4m0?\y2E?{W|;|ric-XTJl+\goj@=r(6 X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 21 Oct 2011 02:44:36 -0400 In-Reply-To: <20128.41630.10577.712614@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Fri, 21 Oct 2011 00:37:18 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 9817-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.0.91 Thanks; applied. From unknown Sat Sep 13 11:13:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Nov 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator