taskThe GNU Hurd - Tasks: task #5724, is a node a directory or not


task #5724: is a node a directory or not

Submitted by:  Thomas Schwinge <tschwinge>
Submitted on:  Mon 17 Jul 2006 09:29:44 AM UTC  
Category: The GNU HurdShould Start On: Sun 16 Jul 2006 10:00:00 PM UTC
Should be Finished on: Sun 16 Jul 2006 10:00:00 PM UTCPriority: 1 - Later
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenPlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Mon 17 Jul 2006 09:29:44 AM UTC, original submission:

02:36 <antrik> in standard POSIX, there is a way for applications to ask, "what kind of file object is this" I guess?
02:42 <marcus> well
02:42 <marcus> there are two ways you can get this information
02:43 <marcus> 1) the dirent of a directory entry has a "directory" bit that says if it is a directory or not
02:44 <marcus> 2) the stat information's mode field contains a file type, which is one of S_IFREG, S_IFIFO, S_IFLNK, S_IFDIR, S_IFCHR, S_IFBLK\, S_IFSOCK
02:44 <marcus> now, the problem in the current hurd is that the dirent entry always refers to the underlying node, never to the translated f\ile
02:44 <marcus> it is surprising we never noticed that to be a problem
02:45 <antrik> indeed
02:45 <marcus> I only noticed that when I tried to find out when my firmlink attack didn't work in some cases
02:45 <marcus> rm is actually looking at this field
02:45 <marcus> anyway, usually, the stat() field is looked at

Thomas Schwinge <tschwinge>
Project Administrator


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


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):



No Changes Have Been Made to This Item

Back to the top

Powered by Savane 3.1-cleanup