Description of Problem: I marked this as "all" platforms because at's generic, and this is really badly broken. How Reproducible: submit a job that relies on any variable in the current environment. let's take a real obvious one: PATH. E.g., I use "#!/usr/bin/env bash" on my scripts so they'll still work on Slowlaris, where bash is in /usr/local. Now let's look at the file that at creates to run the job: PATH=/home/alane/misc/scripts:/home/alane/bin:/home/alane/sbin:/usr/local/sbin:/usr/local/bin:/usr/local/jre1.2.2/bin:/usr/kerberos/bin:/bin:/usr/bin:/usr/X11R6/bin; export PATH= # <horshack> # OOH! OOH! THERE IT IS! # </horshack> cd /system/software/redhat/rh\-installed || { echo 'Execution directory inaccessible' >&2 exit 1 } AAAUUUUGGGHH!!! WTF!!!???? Patch13 introduces this bug. Remove the second hunk of Patch13. diff -u -r at-3.1.8/at.c.env at-3.1.8/at.c --- at-3.1.8/at.c Fri May 18 13:09:36 2001 +++ at-3.1.8-eqp/at.c Fri May 18 12:47:08 2001 @@ -360,7 +360,7 @@ char *eqp; eqp = strchr(*atenv, '='); - if (ap == NULL) + if (eqp == NULL) eqp = *atenv; else { unsigned int i; @@ -405,7 +405,7 @@ } } fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp - *atenv - 1, fp); + fwrite(*atenv, sizeof(char), eqp - *atenv, fp); fputc('\n', fp); } How in hell did this get released?
Oops. It's Patch15. at-3.1.8-env.patch. The most recent one. The one that was applied to make this new release. wp's environment patch didn't work out quite right.
Ahh. Well. I guess I was a bit harsh there. Sorry. Here's a different patch. It's a bit clearer. Uses a couple more vars, but hey, E Pluribus Optimizum.
Created attachment 24269 [details] replacement for patch15 that works and is clearer
Created attachment 24309 [details] The RIGHT patch file (I grabbed the wrong one in the wee hours of the AM)
Created attachment 24311 [details] OK just shoot me. I had 3 versions lying around. Now I feel like and idiot.
Seems this has been fixed for some time. Works in Red Hat 7.3 at least and limbo. Closing.