Bug 46546

Summary: at-jobs have empty environment-variables
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: atAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: high    
Version: 1.0Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-20 08:26:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
This patch should replace the original at-3.1.8-env.patch
Should fix it finally none

Description Enrico Scholz 2001-06-29 11:06:40 UTC
Description of Problem:

All env-variables of jobs started by at-3.1.8-18 get empty values. The
man-page says they are retained.

The at-3.1.8-env.patch seems to be responsibly. There the last hunk

-           fwrite(*atenv, sizeof(char), eqp - *atenv - 1, fp);
+           fwrite(*atenv, sizeof(char), eqp - *atenv, fp); 

should be removed. Else entries like

| <var>=<values>; export <var>=

will be created.

| <var>=<values>; export <var>

would be correct.

How Reproducible:


Steps to Reproduce:
1. echo 'test' | at now+5min
2. at -c <number of the job>

Actual Results:

PWD=/home/ensc; export PWD=
http_proxy=http://www-cache:3128/; export http_proxy=

Expected Results:

PWD=/home/ensc; export PWD
http_proxy=http://www-cache:3128/; export http_proxy

Additional Information:
$ rpm -q at

Comment 1 Enrico Scholz 2001-07-09 16:10:30 UTC
It's a serious bug making `at' unusable. Therefore increasing importance...

Comment 2 Enrico Scholz 2001-07-18 17:11:39 UTC
Created attachment 24010 [details]
This patch should replace the original at-3.1.8-env.patch

Comment 3 Glen Foster 2001-07-18 17:15:08 UTC
This defect should be fixed ASAP, Crutcher.

Comment 4 Crutcher Dunnavant 2001-07-18 20:08:56 UTC

Comment 5 Enrico Scholz 2001-07-20 08:24:39 UTC
Sorry, my suggested patch was erroneous and reopens perhaps the door to a local
attack (have overseen that at is SUID and user can give a manipulated env like

Comment 6 Enrico Scholz 2001-07-20 08:26:35 UTC
Created attachment 24287 [details]
Should fix it finally

Comment 7 Crutcher Dunnavant 2001-08-02 20:48:46 UTC
fixed, again.