Bug 278888 - [regression] login.conf setenv silently drops " inside string values
Summary: [regression] login.conf setenv silently drops " inside string values
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-05-10 08:02 UTC by Benjamin Takacs
Modified: 2025-03-25 05:58 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Takacs 2024-05-10 08:02:04 UTC
I have  :setenv=VIMINIT=let \\$MYVIMRC="~/config/vim/vimrc" | source \\$MYVIMRC: in /etc/login.conf while that worked fine on 13.2 it stopped working after upgrading to 13.3 login.conf(5) and getcap(3) don't list any reason, why " *inside* string values shouldn't work and don't list any way to escape them, as it shouldn't be needed too.

Possible related to bug 236204 which seems to have introduced double parsing instead of adding a way to read key value lists from capdb entries.
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2024-05-10 15:56:36 UTC
Arg...so ugly :-(
Comment 2 Sean Eric Fagan freebsd_committer freebsd_triage 2024-05-11 09:52:33 UTC
Hm, I think that was in fact a deliberate choice on my part, to treat quotes the way one would in sh.  I'd have to go try a test with it.
Comment 3 Benjamin Takacs 2024-05-11 10:32:13 UTC
(In reply to Sean Eric Fagan from comment #2)
sh has one of the worst ways to handle strings (there are reasons like word splitting for that, but that still doesn't make it good and those reasons don't apply to login.conf and similar). I think bug 236204 should have been fixed, by not treating '\054' as if it were ','. As that would give you propper terminators for strings.