From owner-freebsd-current Sun Dec 22 23:47:54 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id XAA23840 for current-outgoing; Sun, 22 Dec 1996 23:47:54 -0800 (PST) Received: from sdev.usn.blaze.net.au (sdev.usn.blaze.net.au [203.17.53.19]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id XAA23830 for ; Sun, 22 Dec 1996 23:47:48 -0800 (PST) Received: from localhost (davidn@localhost) by sdev.usn.blaze.net.au (8.8.4/8.6.9) with SMTP id SAA25479; Mon, 23 Dec 1996 18:46:57 +1100 (EST) Date: Mon, 23 Dec 1996 18:46:57 +1100 (EST) From: David Nugent Reply-To: davidn@blaze.net.au To: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7=2C_Andrey_Chernov?= cc: freebsd-current@freebsd.org Subject: Re: Confused about locale In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by freefall.freebsd.org id XAA23835 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 23 Dec 1996, [KOI8-R] Андрей Чернов, Andrey Chernov wrote: >> The user can, by overriding the standard environment variables in >> his or her .login or .profile, just as they do now. The only >> thing the lang= and charset= entries in the login class affects >> are the defaults set by login in the user's environment. Editing >> startup files is no more difficult than running, say, chpass et >> al. > >Excepting one small thing: command interpreter itself started >with system locale, not user defined one and user can change it >only later (if ever can!). Will "exec $SHELL" at the end of .profile solve this at all? Yes, I know it is a kludge. :) The other thing is that login.conf (BSDI's anyway, and no doubt ours when we get to implement it) will provide a way of execing an alternate program instead of a shell when the user logs in, but $SHELL is still set as per the passwd->pw_dir field. It would be a very simple matter to have this alternate pick up a $HOME/.language file or similar, then exec the shell as a login shell (as an alternate may have to do anyway). >Shell f.e. understand on-the-fly locale changes >only very recently (my fix). Yes, I understand that problem well enough. ;) >> Not at all. Only that "class" is a pointer to /many/ parameters >> that (1) set administrative restrictions and (2) sets up the >> *default* login environment for a set of users. For a shell >> account, most of the environment setup remains changeable, just >> as it is now. > >Why not use "tc=" modifier to point to default class? >I.e. example entry will looks like: > >la=ru_SU.KOI8-R:ch=KOI8-R:tc=def_class That's precisely how /etc/login.conf is formatted, yes. And a typical setup will involve a bunch of top-level defaults together with tc= entries to string them together. But this doesn't solve the user being able to modify them. [Pie in the sky idea] what could be done is to read $HOME/.login.env (name is only a suggestion) to pick up these things, but only *after* the setuid()/initgroups(), and with only some subset of keywords allowed in user mode. Some, like setting max-rlimits, only have meaning if running as root anyway. That would at least close all of the main holes and means of circumventing administrative policy this might otherwise allow. This doesn't much appeal to my sense of asthetics though, but it is similar to .termcap style user-configuration. Comments? [Incidently, getcap(3) doesn't have termcap's liminations with respect to two character identifiers - fortunately. :-) Files tend to be a lot more readable that way.] Regards, David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freefall.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/