GNU bug report logs - #67323
30.0.50; [PATCH] Set a new desktop file to mode 0600

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Tue, 21 Nov 2023 10:25:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67323 <at> debbugs.gnu.org
Subject: bug#67323: 30.0.50; [PATCH] Set a new desktop file to mode 0600
Date: Tue, 21 Nov 2023 14:00:28 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Tue, 21 Nov 2023 11:23:56 +0100
>> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> As a desktop file can contain some "secret" data, I think it is better
>> to make it read/write only to the user by default.  This does not
>> prevent the user to later change the mode of this desktop file if he
>> wants to "share" it.
>
> We don't do this in other cases, AFAICT, so why do it here?

Hi Eli,

I had this idea while browsing savehist.el.  It have
'savehist-file-modes' set to #o600 by default.  Since desktop.el could
also contain histories or others "secrets", I thought that it may a good
idea to have more strict default.

> The users can make this file unreadable by others if they want.

Yes and it is what I have done previously for my own desktop file.  The
idea here is to have saner default.  And as I said, it also works the
other way around ;-)

> It's a backward-incompatible change in any case.

You are saying that it might surprise users who rely on the "readable
for all" nature of one desktop file by default?  I'd have a hard time to
figure out such a scenario…  But anyway, if you think this patch does
not worth it, say it and I'll close this report.

Thanks,
-- 
Manuel Giraud




This bug report was last modified 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.