Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 1997 12:00:02 -0800 (PST)
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-bugs
Subject:   Re: bin/2747: at cannot be run in an atjob
Message-ID:  <199702162000.MAA23111@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702162000.MAA23111>