From owner-freebsd-bugs Sun Feb 16 12:00:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA23138 for bugs-outgoing; Sun, 16 Feb 1997 12:00:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA23111; Sun, 16 Feb 1997 12:00:02 -0800 (PST) Date: Sun, 16 Feb 1997 12:00:02 -0800 (PST) Message-Id: <199702162000.MAA23111@freefall.freebsd.org> To: freebsd-bugs Cc: From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: bin/2747: at cannot be run in an atjob Reply-To: j@uriah.heep.sax.de (J Wunsch) Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2747; it has been noted by GNATS. From: j@uriah.heep.sax.de (J Wunsch) To: thompson@tgsoft.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/2747: at cannot be run in an atjob Date: Sun, 16 Feb 1997 20:48:18 +0100 As mark thompson wrote: > You cannot submit an at job from within an at job, since the submitted > job will have the wrong mail address, and atrun will reject it. The People might consider this a feature. :-) So you can't defeat a cron.deny entry with just an at.allow one. > comments suggest that the code in question (see below) is a hangover > from an earlier day, and no longer appropriate. No, the comments don't suggest this to me, sorry. > - /* Get the userid to mail to, first by trying getlogin(), which reads > - * /etc/utmp, then from LOGNAME, finally from getpwuid(). > + /* Get the userid to mail to, first by LOGNAME, then from getpwuid(). > */ > - mailname = getlogin(); > - if (mailname == NULL) > - mailname = getenv("LOGNAME"); > + mailname = getenv("LOGNAME"); No, sorry, the preference of getlogin() over LOGNAME is a normal sequence. getlogin() is much harder to fake. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)