Bug 86514 - failed redirect gives ENOENT, not EPERM
failed redirect gives ENOENT, not EPERM
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: bash (Show other bugs)
phoebe
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-24 19:29 EST by Kjetil T. Homme
Modified: 2007-04-18 12:52 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-25 13:04:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
strace of bash run exhibiting problem (8.32 KB, text/plain)
2003-03-25 11:18 EST, Kjetil T. Homme
no flags Details
ltrace of bash run exhibiting problem (58.02 KB, text/plain)
2003-03-25 11:19 EST, Kjetil T. Homme
no flags Details

  None (edit)
Description Kjetil T. Homme 2003-03-24 19:29:43 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030206

Description of problem:
the code has been changed to do
open("/etc/nosuchfile", O_WRONLY|O_TRUNC|O_LARGEFILE)
after a failed
open("/etc/nosuchfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666)

this results in errno being EPERM, which is highly confusing, at least to me :-)


Version-Release number of selected component (if applicable):
bash-2.05b-20

How reproducible:
Always

Steps to Reproduce:
as a normal user
echo hiya > /etc/nosuchfile


Actual Results:  bash: /etc/nosuchfile: No such file or directory


Expected Results:  bash: /etc/nosuchfile: Permission denied


Additional info:
Comment 1 Tim Waugh 2003-03-25 04:40:40 EST
I don't see this.  Sure there's no file of that name?
Comment 2 Kjetil T. Homme 2003-03-25 09:57:45 EST
of course I'm sure, and that is actually what bash tells me :-)

(btw, it's annoying that you close the bug as the very first response.  use MORE
INFO NEEDED or something.)
Comment 3 Tim Waugh 2003-03-25 10:31:02 EST
Well, I need more information than I have. :-)

Show me the strace output.
Comment 4 Kjetil T. Homme 2003-03-25 11:18:55 EST
Created attachment 90711 [details]
strace of bash run exhibiting problem
Comment 5 Kjetil T. Homme 2003-03-25 11:19:26 EST
Created attachment 90712 [details]
ltrace of bash run exhibiting problem
Comment 6 Tim Waugh 2003-03-25 11:27:04 EST
Oops, I misread the original comment, sorry!  I see the issue now.
Comment 7 Tim Waugh 2003-03-25 13:04:52 EST
Fixed package is bash-2.05b-23.

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