Bug 66505 - login.conf(5): document that escaping '~' and '$' characters in login.conf setenv or path capabilties doesn't work as documented
Summary: login.conf(5): document that escaping '~' and '$' characters in login.conf se...
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 05:00 UTC by Todd C. Miller
Modified: 2018-08-05 06:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Todd C. Miller 2004-05-11 05:00:32 UTC
      login.conf(5) states that "Capabilities that set environment variables are scanned for both `~' and `$' characters, which are substituted for a user's home directory and name respectively.  To pass these characters literally into the environment variable, escape the character by preceding it with a backslash '\'.

Fix: 

Either remove the support for escaping the characters or document its deficiencies.
How-To-Repeat:       Try escaping a ~ or $ in a setenv or path capability in login.conf or ~/.login_conf.
Comment 1 Tom Rhodes freebsd_committer 2004-05-11 15:09:37 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

Toss it here.
Comment 2 Todd C. Miller 2004-08-09 22:55:18 UTC
One way to make the behavior match the documentation is to use
cgetustr(3) when interpreting a "path" or "setenv" capability.  That
way the normal backslash escape stuff is not done.  This is what I
just did in OpenBSD (I also implemented the normal cgetstr(3)
escaping for consistency).

 - todd
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:58 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped