[EMAIL PROTECTED] (Guy Maor) writes:
> As you see, the file is sourced, which means that the values of the
> variables defined should be properly quoted.
Yes, it is a bug in login that it doesn't do this.
ssh does the same...
It makes sense, because this way the file is independent of the (usually
complex) quoting conventions of different shells. Quoting in shells is
needed because of variables and substitutions, and login (ssh) cannot
reasobly incorporate a complete shell parser, so substitution is not done
and quoting is not useful.
What I mean is that this is not easily classified as a bug in login.
> Moreover, export instructions
> are needed inside /etc/environment, unless one uses the "set -o allexport"
> instruction of bash or ksh, which is almost unusable as it triggers bug
> #23857.
This bug has been fixed upstream (yay!) and I have a new version
almost ready to upload.
Wow!
If this is the case, one can take the file as login likes it, pass it
through a sed script which changes
name=value
into
name='value'
, then set -o allexport, source it, and set +o allexport.
This could be done in Xsession, or at least suggested in a comment. Also,
the ENVIRON_FILE instruction in login.defs should be uncommented. This
way, login, ssh, any possible shell, and Xsession are happy.
Horrible?
-=- MIME -=-
--Boundary_(ID_pORhhmq17R3RO7hsRkwtLw)
Content-type: text/plain; charset=us-ascii
Content-language: EN-US
This report relates to a message you sent with the following header fields:
Message-id: <[EMAIL PROTECTED]>
Date: Tue, 17 Nov 1998 14:33:59 +0100
From: Francesco Potorti` <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: /etc/environment (related with bug #28446)
Your message cannot be delivered to the following recipients:
Recipient address: [EMAIL PROTECTED]
Reason: Not found in directory
--Boundary_(ID_pORhhmq17R3RO7hsRkwtLw)
Content-type: message/DELIVERY-STATUS
Original-envelope-id: [EMAIL PROTECTED]
Reporting-MTA: dns;mailsrv.cnuce.cnr.it
Action: failed
Status: 5.1.1 (Not found in directory)
Original-recipient: rfc822;[EMAIL PROTECTED]
Final-recipient: rfc822;[EMAIL PROTECTED]
--Boundary_(ID_pORhhmq17R3RO7hsRkwtLw)
Content-type: MESSAGE/RFC822
Return-path: [EMAIL PROTECTED]
Received: from DIRECTORY-DAEMON by mailsrv.cnuce.cnr.it (PMDF V5.2-29 #23415)
id <[EMAIL PROTECTED]>
(original mail from [EMAIL PROTECTED]); Tue, 17 Nov 1998 15:50:14 +0100
Received: from fly.cnuce.cnr.it (pot.cnuce.cnr.it [131.114.193.182])
by mailsrv.cnuce.cnr.it (PMDF V5.2-29 #23415)
with ESMTP id <[EMAIL PROTECTED]> for
[EMAIL PROTECTED]; Tue, 17 Nov 1998 14:35:34 +0100
Received: by fly.cnuce.cnr.it id m0zflGc-00089cC
(Debian Smail-3.2.0.102 1998-Aug-2 #2); Tue, 17 Nov 1998 14:34:02 +0100 (CET)
Date: Tue, 17 Nov 1998 14:33:59 +0100
From: Francesco Potorti` <[EMAIL PROTECTED]>
Subject: Re: /etc/environment (related with bug #28446)
In-reply-to: [EMAIL PROTECTED]'s message of "17 Nov 98 09:08:55 GMT"
To: [EMAIL PROTECTED]
Message-id: <[EMAIL PROTECTED]>
X-Mailer: Gnus v5.5/Emacs 20.3
Content-transfer-encoding: 7BIT
Lines: 39
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
[EMAIL PROTECTED] (Guy Maor) writes:
> As you see, the file is sourced, which means that the values of the
> variables defined should be properly quoted.
Yes, it is a bug in login that it doesn't do this.
ssh does the same...
It makes sense, because this way the file is independent of the (usually
complex) quoting conventions of different shells. Quoting in shells is
needed because of variables and substitutions, and login (ssh) cannot
reasobly incorporate a complete shell parser, so substitution is not done
and quoting is not useful.
What I mean is that this is not easily classified as a bug in login.
> Moreover, export instructions
> are needed inside /etc/environment, unless one uses the "set -o allexport"
> instruction of bash or ksh, which is almost unusable as it triggers bug
> #23857.
This bug has been fixed upstream (yay!) and I have a new version
almost ready to upload.
Wow!
If this is the case, one can take the file as login likes it, pass it
through a sed script which changes
name=value
into
name='value'
, then set -o allexport, source it, and set +o allexport.
This could be done in Xsession, or at least suggested in a comment. Also,
the ENVIRON_FILE instruction in login.defs should be uncommented. This
way, login, ssh, any possible shell, and Xsession are happy.
Horrible?
--Boundary_(ID_pORhhmq17R3RO7hsRkwtLw)--