bugThe GNU Hurd - Bugs: bug #35293, [ext2fs] cat on directory

 
 

bug #35293: [ext2fs] cat on directory

Submitted by:  Maksym Planeta <mplaneta>
Submitted on:  Wed 11 Jan 2012 10:32:21 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedReproducibility: None
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 12 Jan 2012 05:45:39 PM UTC, comment #6:

Ok. I close it.

Maksym Planeta <mplaneta>
Project Member
Thu 12 Jan 2012 05:12:26 PM UTC, comment #5:

Well, no, these characters are supposed to be there: what you get is the raw content of the directory in the filesystem.

Anonymous
Thu 12 Jan 2012 04:59:54 PM UTC, comment #4:

Anyway there shouldn't be these characters: "@Ô". And should be \n after mcsim (Now there is no one).

Here is another directory where errors are obvious:
mcsim@debian:~/git/hurd$ cat tmpfs/
à

pager-stubs.c àtmpfs.c!àtmpfs.hà
.tmpfs.c.swpEàl
.tmpfs.c.swx.swpxmcsim@debian:~/git/hurd$ 1;2c

And what should be there:
mcsim@debian:~/git/hurd$ ls tmpfs/
Makefile dir.c node.c pager-stubs.c tmpfs.c tmpfs.h

Maksym Planeta <mplaneta>
Project Member
Thu 12 Jan 2012 10:47:14 AM UTC, comment #3:

POSIX only says that EISDIR should be returned when using write access, so implementations are free to implement a read access (and iirc linux used to do it a long time ago).

Anonymous
Thu 12 Jan 2012 10:43:23 AM UTC, comment #2:

IIRC it's a feature, not a bug.

Anonymous
Thu 12 Jan 2012 05:07:51 AM UTC, comment #1:

I tend to disagree. In particular, I seem to recall that (certain
versions of?) FreeBSD allowed directories to be read(2) as if they were
regular files.

I wonder if POSIX has something to say on this?

Anonymous
Wed 11 Jan 2012 10:32:21 PM UTC, original submission:

When someone tries to cat directory there should be an error message (in linux it is: "cat: ind4: Is a directory"). But in Hurd I get following:

$ showtrans /home/
/hurd/ext2fs.static /dev/hd0s3
$ cat /home/

.
..

lost+found@Ômcsim
$ ls /home/
lost+found mcsim

Maksym Planeta <mplaneta>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mplaneta (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 12 Jan 2012 05:45:39 PM UTCmplanetaStatusNone=>Invalid
      Open/ClosedOpen=>Closed
      Wiki-like text discussion box =>
    Thu 12 Jan 2012 04:59:54 PM UTCmplanetaWiki-like text discussion box=>

    Back to the top


    Powered by Savane 3.1-cleanup1