Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 229475 - File::writable? gives incorrect result if process changes euid/egid
File::writable? gives incorrect result if process changes euid/egid
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
Depends On: 222177
  Show dependency treegraph
Reported: 2007-02-21 08:12 EST by Akira TAGOH
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-30 07:28:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Akira TAGOH 2007-02-21 08:12:52 EST
+++ This bug was initially created as a clone of Bug #222177 +++

When a ruby script running as root changes euid/egid, the results of
File::writable?(f) and File::stat(f).writable? will differ because one uses
glibc's eaccess while the other doesn't (and File::writable? is wrong). The
attached program demonstrates the problem.

This bug is ultimately caused by a bug in glibc's eaccess
(http://sourceware.org/bugzilla/show_bug.cgi?id=3846) but it's a separate
regression in ruby-1.8.5 (compared to earlier versions of the ruby RPM) since
the ruby-1.8.5 rpm's now use eaccess where older ones used ruby's own code to
simulate eaccess.

A simple fix would be to build ruby w/o HAVE_EACCESS as it has been build in the
past until the glibc bug is fixed.

-- Additional comment from dlutter@redhat.com on 2007-01-10 14:09 EST --
Created an attachment (id=145276)
Ruby script demonstrating the problem (run as root)
Comment 1 Akira TAGOH 2007-03-30 07:28:41 EDT
seems like got fixed in rawhide. it works fine now.

Note You need to log in before you can comment on or make changes to this bug.