* bug#8186: dired-font-lock-keywords should warn about SUID files too!
@ 2011-03-06 5:12 jidanni
2011-03-06 18:15 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: jidanni @ 2011-03-06 5:12 UTC (permalink / raw)
To: 8186
dired-font-lock-keywords is nice, but it totally forgot about the more
dangerous SUID and SGID 4xxx and 2xxx mode files! E.g.,
-rwsr-xr-x 1 root root 33 Mar 6 12:59 somefile
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2011-03-06 5:12 bug#8186: dired-font-lock-keywords should warn about SUID files too! jidanni
@ 2011-03-06 18:15 ` Drew Adams
2011-03-06 21:23 ` jidanni
2019-10-14 1:32 ` Lars Ingebrigtsen
2 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2011-03-06 18:15 UTC (permalink / raw)
To: jidanni, 8186
> dired-font-lock-keywords is nice, but it totally forgot about the more
> dangerous SUID and SGID 4xxx and 2xxx mode files! E.g.,
> -rwsr-xr-x 1 root root 33 Mar 6 12:59 somefile
FWIW -
Dired fontification of permissions came from my suggestion many moon ago.
Acceptance was half-hearted and the feature was implemented only partially.
The different permissions have been highlighted individually in Dired+ for
decades, including the ones you mention.
http://www.emacswiki.org/emacs/download/dired%2b.el
So 1+ to your suggestion.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2011-03-06 5:12 bug#8186: dired-font-lock-keywords should warn about SUID files too! jidanni
2011-03-06 18:15 ` Drew Adams
@ 2011-03-06 21:23 ` jidanni
2011-03-06 21:45 ` Drew Adams
2019-10-14 1:32 ` Lars Ingebrigtsen
2 siblings, 1 reply; 12+ messages in thread
From: jidanni @ 2011-03-06 21:23 UTC (permalink / raw)
To: drew.adams; +Cc: 8186
Let's hope they adopt them into official emacs.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2011-03-06 21:23 ` jidanni
@ 2011-03-06 21:45 ` Drew Adams
0 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2011-03-06 21:45 UTC (permalink / raw)
To: jidanni; +Cc: 8186
> Let's hope they adopt them into official emacs.
Unlikely. I've offered Dired+ more than once over the years.
Very few of the features have been added or imitated.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2011-03-06 5:12 bug#8186: dired-font-lock-keywords should warn about SUID files too! jidanni
2011-03-06 18:15 ` Drew Adams
2011-03-06 21:23 ` jidanni
@ 2019-10-14 1:32 ` Lars Ingebrigtsen
2019-10-27 21:28 ` Juri Linkov
2 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-14 1:32 UTC (permalink / raw)
To: jidanni; +Cc: 8186
jidanni@jidanni.org writes:
> dired-font-lock-keywords is nice, but it totally forgot about the more
> dangerous SUID and SGID 4xxx and 2xxx mode files! E.g.,
> -rwsr-xr-x 1 root root 33 Mar 6 12:59 somefile
I've now made Emacs 27 font-lock these permissions with the warning face.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-14 1:32 ` Lars Ingebrigtsen
@ 2019-10-27 21:28 ` Juri Linkov
2019-10-28 11:18 ` Lars Ingebrigtsen
2019-10-30 12:31 ` Lars Ingebrigtsen
0 siblings, 2 replies; 12+ messages in thread
From: Juri Linkov @ 2019-10-27 21:28 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 8186, jidanni
>> dired-font-lock-keywords is nice, but it totally forgot about the more
>> dangerous SUID and SGID 4xxx and 2xxx mode files! E.g.,
>> -rwsr-xr-x 1 root root 33 Mar 6 12:59 somefile
>
> I've now made Emacs 27 font-lock these permissions with the warning face.
I checked the directory /run and there is:
drwxrwsr-x 3 postgres postgres 120 postgresql
where 'w' in group is rightfully highlighted with the 'dired-perm-write' face,
but 's' in the same group is not highlighted with the 'dired-set-id' face.
Is this intentional?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-27 21:28 ` Juri Linkov
@ 2019-10-28 11:18 ` Lars Ingebrigtsen
2019-10-28 14:23 ` Drew Adams
2019-10-30 12:31 ` Lars Ingebrigtsen
1 sibling, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-28 11:18 UTC (permalink / raw)
To: Juri Linkov; +Cc: 8186, jidanni
Juri Linkov <juri@linkov.net> writes:
> I checked the directory /run and there is:
>
> drwxrwsr-x 3 postgres postgres 120 postgresql
>
> where 'w' in group is rightfully highlighted with the 'dired-perm-write' face,
> but 's' in the same group is not highlighted with the 'dired-set-id' face.
>
> Is this intentional?
No... Do we need to add combinatorial versions of all the regexps to
dired-font-lock-keywords or is there a better way?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-28 11:18 ` Lars Ingebrigtsen
@ 2019-10-28 14:23 ` Drew Adams
0 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2019-10-28 14:23 UTC (permalink / raw)
To: Lars Ingebrigtsen, Juri Linkov; +Cc: 8186, jidanni
> > I checked the directory /run and there is:
> > drwxrwsr-x 3 postgres postgres 120 postgresql
> > where 'w' in group is rightfully highlighted with the 'dired-perm-write' face,
> > but 's' in the same group is not highlighted with the 'dired-set-id' face.
> > Is this intentional?
>
> No... Do we need to add combinatorial versions of all the regexps to
> dired-font-lock-keywords or is there a better way?
FWIW -
If by that you mean highlight the different privileges
for each possible role (other, group, user), then
`dired+.el' has done that since sometime in the 90s.
(I suggested it for Emacs back then.)
Not a big deal:
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-dl]........\\([lsStT]\\)") ; o misc
'(1 diredp-other-priv))
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-dl].....\\([lsStT]\\)...") ; g misc
'(1 diredp-other-priv))
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-dl]..\\([lsStT]\\)...") ; u misc
'(1 diredp-other-priv))
(list (concat dired-re-maybe-mark dired-re-inode-size
"\\([bcsmpS]\\)") ; (rare)
'(1 diredp-rare-priv keep))
https://www.emacswiki.org/emacs/download/dired%2b.el
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-27 21:28 ` Juri Linkov
2019-10-28 11:18 ` Lars Ingebrigtsen
@ 2019-10-30 12:31 ` Lars Ingebrigtsen
2019-10-30 13:06 ` Andreas Schwab
2019-10-30 13:09 ` Peder O. Klingenberg
1 sibling, 2 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-30 12:31 UTC (permalink / raw)
To: Juri Linkov; +Cc: 8186, jidanni
Juri Linkov <juri@linkov.net> writes:
> I checked the directory /run and there is:
>
> drwxrwsr-x 3 postgres postgres 120 postgresql
>
> where 'w' in group is rightfully highlighted with the 'dired-perm-write' face,
> but 's' in the same group is not highlighted with the 'dired-set-id' face.
>
> Is this intentional?
In my test cases, the setguid bit was shown like this:
-rwxrwSrw- 1 larsi larsi 0 Oct 30 13:25 foo-test
But apparently on other systems it's a lower case S?
I've now adjusted the regexp to accept both.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-30 12:31 ` Lars Ingebrigtsen
@ 2019-10-30 13:06 ` Andreas Schwab
2019-10-30 13:16 ` Lars Ingebrigtsen
2019-10-30 13:09 ` Peder O. Klingenberg
1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2019-10-30 13:06 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 8186, Juri Linkov, jidanni
On Okt 30 2019, Lars Ingebrigtsen wrote:
> But apparently on other systems it's a lower case S?
If you have a lower case s then it covers the x.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-30 12:31 ` Lars Ingebrigtsen
2019-10-30 13:06 ` Andreas Schwab
@ 2019-10-30 13:09 ` Peder O. Klingenberg
1 sibling, 0 replies; 12+ messages in thread
From: Peder O. Klingenberg @ 2019-10-30 13:09 UTC (permalink / raw)
To: 8186
On Wed, 2019-10-30 13:31:54 +0100, Lars Ingebrigtsen wrote:
> In my test cases, the setguid bit was shown like this:
>
> -rwxrwSrw- 1 larsi larsi 0 Oct 30 13:25 foo-test
>
> But apparently on other systems it's a lower case S?
The upper case S means that the x bit is not set. Try chmod g+x
foo-test and see the upper case S change to a lower case.
...Peder...
--
I wish a new life awaited _me_ in some off-world colony.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8186: dired-font-lock-keywords should warn about SUID files too!
2019-10-30 13:06 ` Andreas Schwab
@ 2019-10-30 13:16 ` Lars Ingebrigtsen
0 siblings, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-30 13:16 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 8186, Juri Linkov, jidanni
Andreas Schwab <schwab@suse.de> writes:
>> But apparently on other systems it's a lower case S?
>
> If you have a lower case s then it covers the x.
Ah, thanks.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-10-30 13:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-06 5:12 bug#8186: dired-font-lock-keywords should warn about SUID files too! jidanni
2011-03-06 18:15 ` Drew Adams
2011-03-06 21:23 ` jidanni
2011-03-06 21:45 ` Drew Adams
2019-10-14 1:32 ` Lars Ingebrigtsen
2019-10-27 21:28 ` Juri Linkov
2019-10-28 11:18 ` Lars Ingebrigtsen
2019-10-28 14:23 ` Drew Adams
2019-10-30 12:31 ` Lars Ingebrigtsen
2019-10-30 13:06 ` Andreas Schwab
2019-10-30 13:16 ` Lars Ingebrigtsen
2019-10-30 13:09 ` Peder O. Klingenberg
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).