From owner-freebsd-bugs Wed Sep 18 02:11:10 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA18777 for bugs-outgoing; Wed, 18 Sep 1996 02:11:10 -0700 (PDT) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA18762 for ; Wed, 18 Sep 1996 02:11:05 -0700 (PDT) Received: from time.cdrom.com (localhost [127.0.0.1]) by time.cdrom.com (8.7.5/8.6.9) with ESMTP id CAA06269; Wed, 18 Sep 1996 02:10:50 -0700 (PDT) To: Toomas Tamm cc: bugs@freebsd.org, toomas@neon.pc.helsinki.fi, paul@vix.com, jtc@netbsd.org Subject: Re: Mail dumps core if USER not set In-reply-to: Your message of "Wed, 18 Sep 1996 09:23:58 +0300." <323F957E.18BA2A84@chem.helsinki.fi> Date: Wed, 18 Sep 1996 02:10:49 -0700 Message-ID: <6267.843037849@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > The RedHat Linux (Rembrandt 3.0.3) appears to use BSD mail (Mail?) > program as the command-line mail user agent. However since Linux is > sysV'ish, there are situations where the USER environment variable > is not set. One of these is when a script is run by cron (vixie cron > under this Linux). > > When the USER is not set, the mail program dumps core, instead of > producing an intelligent error message. This was not trivial to > figure out, since under a login shell, USER is always set properly. > It can be easily verified, however, by unset'ing USER under a login > shell. I'm afraid this must be more of a problem with Linux's syncronization with the BSD tools - this has been fixed since 4.4L1 and possibly well before, I don't have sources going back that far to check. The one and only call to get the value of $USER checks properly for a NULL return (in which case it returns getname(getuid())), and just to make absolutely positively sure, I checked with USER unset and it worked just fine. I suspect that people's unwillingness to accept ownership of this bug is strongly correlated with the fact that it does not actually, in fact, exist with BSD's Mail program. Jordan