Bug 175792

Summary: at jobs have finite chance of failure
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: atAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED CURRENTRELEASE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: at-3.1.8-49 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-22 15:25:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Generates shell delimiter more sensibly none

Description JW 2005-12-15 00:51:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
For some reason a patch was added (at-3.1.8-SHELL-111386.patch) which introduces a finite possibility of a total 'at' job failure.

We all know that true randomness means that a random sequence like "aaaa" is equally likely as the sequence "xhgt".

So it is a reasonably possibility that the 'dd if=/dev/urandom ...' sequence generated by this patch produces characeters either all outside of the [:alnum:] set or that match, say, the word "echo" or perhaps "sh".


Version-Release number of selected component (if applicable):
at-3.1.8-77_FC4

How reproducible:
Always

Steps to Reproduce:
1.create an 'at' job and cross your fingers - you probably will be lucky.
2.
3.
  

Additional info:

Comment 1 JW 2005-12-15 01:01:03 UTC
Created attachment 122258 [details]
Generates shell delimiter more sensibly

This patch generates a shell delimiter string at job creation time using simple
rand() rather than using dd/urandom/tr at job run time.  The dd/urandom/tr
method is flawed in that it introduces a greater possibility of a delimiter
being created that matches some content of the job.  This is because the length
of the generated delimiter will average 48 chars (200*(10+26+26)/256) but there
is a strong possibility that it will be, say, 10 characters.  This patch
guarantees the length of the delimiter is always 76 characters.

Comment 2 Jason Vas Dias 2005-12-15 17:40:37 UTC
Yes, I'm planning to replace this "here document" method of executing at jobs
entirely in the next release - thanks for the patch.


Comment 3 Marcela Mašláňová 2006-08-22 15:25:17 UTC
It was patched in FC-4 version at-3.1.8-49.