Plan 9 from Bell Labs’s /usr/web/sources/patch/saved/no-dot-dot/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


This is probably a bit risky to apply at this point;
I have used it for only one day.

This patch gets rid of ".." machinery in the kernel by
rewriting paths early in namec. It also fixes libc cleanname.
The most notable difference is that paths that start with ".."
will know walk from the root of the process and not from ".".

At the very least this patch is useful to document what could
change if ".." is handled this way. At most it simplifies the
Path structure, and the code in chan.c.

If the new cleanname code is used, but not the kernel
changes, then a call to cleanname in the kernel must check
after cleanname returns if the cleaned name is "", and in that
case, copy "." into it. The old libc cleanname did that, which is
probably wrong, and the supplied cleanname does not.

hth

PS: This is a second version of the patch.
The previous version had a cleanname that did not preserver
optional runes on kernel paths and did not return "." for
empty names.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].