Bug 1166882
Summary: | "at" leaves zero-byte-sized files in /var/spool/at if filesystem is full / if jobspec can't be written | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Frank Hirtz <fhirtz> |
Component: | at | Assignee: | Tomas Mraz <tmraz> |
Status: | CLOSED ERRATA | QA Contact: | Leos Pol <lpol> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.4 | CC: | lpol, misterbonnie, ovasik, psklenar |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | at-3.1.10-47.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
The at command was not properly checking return value on fclose function call.
Consequence:
In case the /var/spool/at filesystem was full the at command could leave empty stale files in the spool directory.
Fix:
The at command now properly checks the return value from the fclose function call.
Result:
The are no empty files left anymore when the /var/spool/at filesystem is full.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-19 15:39:41 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1075802 |
Description
Frank Hirtz
2014-11-21 20:56:05 UTC
The fflush() is unnecessary as it is implicit in the fclose() call. Also fclose() returns 0 on success. Proper fix: @@ -494,7 +498,8 @@ writefile(time_t runtimer, char queue) if (ferror(stdin)) panic("Input error"); - fclose(fp); + if (fclose(fp) != 0) + panic("Output error"); /* Set the x bit so that we're ready to start executing */ Sanity only, patch verified Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0240.html *** Bug 1195314 has been marked as a duplicate of this bug. *** |