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

 
 

bug #35293: [ext2fs] cat on directory

Submitter:  Maksym Planeta <mplaneta>
Submitted:  Wed 11 Jan 2012 10:32:21 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Reproducibility:  None
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 



* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

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

Ok. I close it.

Maksym Planeta <mplaneta>
Group 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>
Group 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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-12 mplaneta StatusNone Invalid
        Open/ClosedOpen Closed
        Wiki-like text discussion box
    2012-01-12 mplaneta Wiki-like text discussion box

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code