Re: realpath(3) bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>I wrote the Linux man page on 1999-08-24.
>It was first included in man-pages-1.26.
>
>The note about Solaris came from the 4.4BSD-Lite man page realpath.3
>(dated 1994-02-16) which says:

Yes, it noticed that it exists in both BSD and Linux manual pages;
I asssumed it was copied by one or the other.  Yours address was the
first I could find to get it remoed.

>I forgot the details. What happens if some of the directories involved
>are not readable or not searchable? What happens if some parent
>directory was overmounted so that there is no absolute pathname
>in the system that refers to the same place as your relative pathname?

>From my reading from the source code, it would fail if it fails to find
the pathname, e.g., whem the pathname desn't exist, getcwd() fails,
chdir() fails (the very old implementation uses chdir() to the pathname or
its dirname and runs getcwd())  Later implementation use resolvepath()
(since 1997) and resolvepath() returns a relative pathname if resolvepat
does't find the root) and then combnes the outut with getcwd() removing
one component for each ".." in front of the pathname.

If either of the calls fail, realpath will fail and if it succeeds i returns
a absolute pathname.

Casper
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux