Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2011 15:12:25 GMT
From:      Mike Clarke <jmc-fbsdpr@milibyte.co.uk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/163432: Environment variables set from /etc/login.conf do not have surrounding quote characters removed
Message-ID:  <201112181512.pBIFCPdD004068@red.freebsd.org>
Resent-Message-ID: <201112181520.pBIFK9gj081226@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         163432
>Category:       conf
>Synopsis:       Environment variables set from /etc/login.conf do not have surrounding quote characters removed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 18 15:20:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Mike Clarke
>Release:        FreeBSD 9.0-RC2 amd64
>Organization:
>Environment:
System: FreeBSD curlew.lan 9.0-RC2 FreeBSD 9.0-RC2 #0: Sat Nov 12 18:35:25 UTC 2011 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
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.

>How-To-Repeat:
Add a value for EXINIT to the default /etc/login.conf as shown below:

:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES,EXINIT="set ai ic sw=3":\

Then login and check the value of EXINIT, the quotes have been included and it appears as "set ai ic sw=3" instead of set ai ic sw=3. The presence of the quotes prevents vi from setting these options.

>Fix:
As a workaround edit /etc/login.conf to remove the surrounding quotes from the item in the setenv line. However this will not work if you need to include commas in the value.


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112181512.pBIFCPdD004068>