URL:
  <http://savannah.gnu.org/task/?func=detailitem&item_id=5724>

                 Summary: is a node a directory or not
                 Project: The GNU Hurd
            Submitted by: tschwinge
            Submitted on: Monday 07/17/06 at 11:29
                Category: The GNU Hurd
         Should Start On: Monday 07/17/06 at 00:00
   Should be Finished on: Monday 07/17/06 at 00:00
                Priority: 1 - Later
                  Status: None
                 Privacy: Public
             Assigned to: None
        Percent Complete: 0%
             Open/Closed: Open
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

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







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?func=detailitem&item_id=5724>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to