From: Ulrich Mueller Date: Fri, 21 Oct 2011 06:44:20 +0000 (-0700) Subject: tar-grind-file-mode fix. X-Git-Tag: emacs-pretest-24.0.91~50 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e1361d995cba156dd4b14ac4ba236bf90908d46;p=emacs.git tar-grind-file-mode fix. * lisp/tar-mode.el (tar-grind-file-mode): Fix handling of setuid/setgid, handle sticky bit. Fixes: debbugs:9817 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c235e9cca0..7f3e324a6e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-10-21 Ulrich Mueller + + * tar-mode.el (tar-grind-file-mode): + Fix handling of setuid/setgid, handle sticky bit. (Bug#9817) + 2011-10-21 Chong Yidong * progmodes/idlwave.el (idlwave-mode): diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 62171328979..cfa406c2b48 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -404,13 +404,19 @@ MODE should be an integer which is a file mode value." (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'."