| Summary: | Environment variables set from /etc/login.conf do not have surrounding quote characters removed | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Mike Clarke <jmc-fbsdpr> |
| Component: | conf | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Mike Clarke
2011-12-18 15:20:08 UTC
Hi,
On 2011-12-18, Mike Clarke wrote:
> If /etc/login.conf is used to set an environment variable and the
> value is enclosed between quote characters the quotes are not stripped
> off when setting the variable. This problem only arises with FreeBSD
> 9, the quotes were removed with earlier versions.
>
> :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES,EXINIT="set ai ic sw=3":\
Can you clarify the "earlier versions"? I get this on 8.2-RELEASE:
$ env
.
.
EXINIT="set ai ic sw=3"
--
Jaakko
On Sunday 18 December 2011, Jaakko Heinonen wrote:
> Can you clarify the "earlier versions"?
On 8.1-RELEASE the quotes get stripped off.
curlew:/home/mike% grep setenv /etc/login.conf
:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES,EDITOR=vi,EXINIT="set
ai ic sw=3",PAGER=less,EJECT=/dev/acd0:\
curlew:/home/mike% env | grep EXINIT
EXINIT=set ai ic sw=3
--
Mike Clarke
On 2011-12-18, Mike Clarke wrote:
> On 8.1-RELEASE the quotes get stripped off.
>
> curlew:/home/mike% grep setenv /etc/login.conf
> :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES,EDITOR=vi,EXINIT="set
> ai ic sw=3",PAGER=less,EJECT=/dev/acd0:\
>
>
> curlew:/home/mike% env | grep EXINIT
> EXINIT=set ai ic sw=3
I still get EXINIT="set ai ic sw=3" on 8.1-RELEASE. Are you sure that
your database is up to date (i.e. you have run cap_mkdb /etc/login.conf)?
--
Jaakko
On Monday 19 December 2011, you wrote:
> I still get EXINIT="set ai ic sw=3" on 8.1-RELEASE. Are you sure that
> your database is up to date (i.e. you have run cap_mkdb
> /etc/login.conf)?
Yes, it's up to date but I've just discovered a long forgotten line
in .cshrc which was also setting EXINIT and overriding the value from
login.conf. After removing the .cshrc line I now get the quotes the
same way as you do. The issue only became visible on the new 9.0 system
I was setting up because the new user account didn't have a copy of the
old .cshrc file.
I've now removed the qoutes from login.conf since I now see that they
should not have been there. I'm sorry for any inconvenience caused by
my oversight.
This does leave the minor point that the absence of a quoting facility
means that it doesn't seem possible to include a comma in the value of
an environment variable defined in login.conf, though I doubt if many
users will ever need to do this.
--
Mike Clarke
State Changed From-To: open->closed Not a regression. Submitter agrees that this can be closed. |