Bug 217240

Summary: namei ignores non-directory components instead of saying "Not a directory"
Product: [Fedora] Fedora Reporter: Matt McCutchen <matt>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-15 15:08:34 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:

Description Matt McCutchen 2006-11-25 16:02:50 UTC
Description of problem:
If I pass namei a path "a/b", where "a" exists but is not a directory, namei
ignores the "a" component and tries to access "b" in the current directory.  It
should complain that "a" is "Not a directory".

Version-Release number of selected component (if applicable):
util-linux-2.13-0.44

How reproducible:
Always

Steps to Reproduce:
$ mkdir foo
$ cd foo
$ touch a b
$ namei a/b
  
Actual output:
f: a/b
 - a
 - b

Expected output:
f: a/b
 ? a - Not a directory (20)

Comment 1 Matt McCutchen 2006-12-17 15:14:13 UTC
Perhaps it would be more correct to say ENOTDIR instead of ENOENT?