emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing symlinked dir-locals files?


From: Yuri D'Elia
Subject: Re: Allowing symlinked dir-locals files?
Date: Sat, 18 Sep 2021 16:10:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Mon, Aug 16 2021, Andreas Schwab wrote:
>>> Looking at the current files.el:4330, we explicitly check if the file is
>>> a regular file.
>
> Why is that a problem?  If the symlink points to a regular file, it is
> still a file-regular-p.
>
>> Yes.  It could also be a symlink injected by malevolent hackers.
>
> Is that different from a regular file injected by malevolent hackers?

I was giving more thought to this. I don't think there's any difference.

Assuming we're reading a versioned .dir-locals.el file, there's no way
to distinguish between a benevolent (local) file and the versioned file.

We still need to obey safe-local-variable-values just like any other
file, and AFAIK we have no concept of "trusted paths" for dir-locals
where resolution could be ambiguous.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]