Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2002 21:30:09 +0200 (CEST)
From:      Lukas Ertl <l.ertl@univie.ac.at>
To:        "Tim J. Robbins" <tjr@FreeBSD.org>
Cc:        freebsd-standards@FreeBSD.org
Subject:   Re: standards/41576: POSIX compliance of ln(1)
Message-ID:  <20020819210645.L310-100000@leelou.in.tern>
In-Reply-To: <200208191112.g7JBCqGn086188@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 19 Aug 2002, Tim J. Robbins wrote:

> Synopsis: POSIX compliance of ln(1)
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D41576

I've read a little bit in the standard, and I would say that the solution
to this problem is correct pathname resolution. As defined in
<http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap04.html#tag=
_04_11>
(sorry for the long link), when encountering a symbolic link during
pathname resolution, it depends on the following three conditions what
happens next:

*) this symbolic link is last pathname component of the pathname.

*) the pathname has no trailing slash.

*) the function is required to act on the symbolic link itself, or certain
arguments direct that the function act on the symbolic link itself.

If these three conditions are met, pathname resolution is over. I guess we
could argue over the last point, but IMHO ln(1) should differentiate
between the following two versions (following my example in the original
PR):

1) $ ln -sf bar bla

and

2) $ ln -sf bar bla/

The first version should replace the symlink, the second one should create
a new symlink in the already referenced directory (as it currently happens
on FreeBSD). ln on AIX does exactly that. Of course, AIX could be
completely broken (as usual :-), but this is how I read the standard.

I'm very interested in your opinions.

regards,
le

--=20
Lukas Ertl                             eMail: l.ertl@univie.ac.at
UNIX-Systemadministrator               Tel.:  (+43 1) 4277-14073
Zentraler Informatikdienst (ZID)       Fax.:  (+43 1) 4277-9140
der Universit=E4t Wien                   http://mailbox.univie.ac.at/~le/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020819210645.L310-100000>