Public bug reported:

Due to lack of time, I can't investigate this, but I repeatedly observed
it. Basically, when you call readdir, it returns a struct dirent. The
d_type field is supposed to be DT_LNK for symbolic links when
_DIRENT_HAVE_D_TYPE is known to the compiler (which it is). This is
usually true, for example /usr/bin/X11 is a circularly-referential
symbolic link with DT_LNK asserted. But when I install an Ubuntu 14.04
64-bit desktop image to a USB stick (using either Startup Disk Creator
or the Disk utility, sorry I don't recall), I get a similar circularly-
referential directory called "ubuntu". This symbolic link does not have
DT_LNK set. lstat can get around this problem and see the link
attribute, but the bug here is that d_type is not the expected value. I
based all this on "man readdir", so it might be just a doc bug.

By "circularly referential", I mean a symbolic link to "." (current
folder).

** Affects: gnome-terminal (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1321091

Title:
  readdir function returns inconsistent d_type

Status in “gnome-terminal” package in Ubuntu:
  New

Bug description:
  Due to lack of time, I can't investigate this, but I repeatedly
  observed it. Basically, when you call readdir, it returns a struct
  dirent. The d_type field is supposed to be DT_LNK for symbolic links
  when _DIRENT_HAVE_D_TYPE is known to the compiler (which it is). This
  is usually true, for example /usr/bin/X11 is a circularly-referential
  symbolic link with DT_LNK asserted. But when I install an Ubuntu 14.04
  64-bit desktop image to a USB stick (using either Startup Disk Creator
  or the Disk utility, sorry I don't recall), I get a similar
  circularly-referential directory called "ubuntu". This symbolic link
  does not have DT_LNK set. lstat can get around this problem and see
  the link attribute, but the bug here is that d_type is not the
  expected value. I based all this on "man readdir", so it might be just
  a doc bug.

  By "circularly referential", I mean a symbolic link to "." (current
  folder).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1321091/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to