sam@delftcc.UUCP (Sam Kendall) (11/20/85)
Some systems (like our Codata) put the logname into the environment variable NAME; unfortunately, news thinks that NAME contains the user's full name. The simplest solution is to use FULLNAME instead of NAME. To maintain compatibility, though, perhaps inews should try FULLNAME, then NAME, but reject NAME if it is the same as the logname. (If those fail, of course, inews should do what it does now, try $HOME/.name, then /etc/passwd.) This is the old simplicity vs. compatibility decision. News isn't commercial software, so I think simplicity is the way to go. Minor one-time user annoyance vs. minor long-term complication. But in case someone wants to do the complicated solution, diffs for it are below. ---- Sam Kendall Delft Consulting Corp. (212) 243-8700 {allegra, seismo!cmcl2, ihnp4}!delftcc!sam *** OLD ifuncs.c: fn = getenv("NAME"); *** NEW ifuncs.c: ! fn = getenv("FULLNAME"); + + if (fn == NULL) { + fn = getenv("NAME"); + if (fn != NULL && strcmp(fn, logname) == 0) + fn = NULL; + }
ekb@piggy.UUCP (Eric K. Bustad) (11/21/85)
I grant that it may have been a mistake for inews to assume that the value of the environment variable NAME was the user's full name. It also seems to be an equal mistake for the Codata system to use NAME to hold the user's login name. The name "NAME" is just too general in meaning, so it is probably better to avoid it entirely. I wonder if the Codata developers considered the use of LOGNAME instead. That is what is used in System V. = Eric Bustad AT&T Bell Laboratories Holmdel NJ 201/949-6257 [...!ihnp4!]piggy!ekb
mark@cbosgd.UUCP (Mark Horton) (11/22/85)
LOGNAME is the System III/V standard, USER is the Berkeley standard (which I believe predates System III.) If Codata changed it to NAME and still claims System III or V compatibility, something is wrong.
sam@delftcc.UUCP (Sam Kendall) (11/25/85)
In article <384@piggy.UUCP>, ekb@piggy.UUCP (Eric K. Bustad) writes: > It also seems to be an equal mistake for the Codata system to use NAME > to hold the user's login name. The name "NAME" is just too general in > meaning, so it is probably better to avoid it entirely. I agree, but ... Codata got their UNIX from UniSoft. Codata has been bought by another company and has been turned to other projects, and ... the Codata *sniff* will be a V7 machine until the end of time. At least one other company's machine (I don't remember which) is still running UniSoft V7, believe it or not. These systems, with their ancient bugs and design flaws, live on. ---- Sam Kendall Delft Consulting Corp. (212) 243-8700 {allegra, seismo!cmcl2, ihnp4}!delftcc!sam