Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/wikipost-trybind/readme

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


Wikipost expects it can mount a wikifs from /srv.  But consider the
case where we are using https plus passwords to export a "private"
wiki via httpd, and to modify pages with wikipost.  Then it is not
so desirable for a publicly readable /srv entry to show the private
bits to everybody who can log in to the web server.

This patch leverages private namespaces to fix the problem.  Before
trying to mount /srv/wiki.%s onto /mnt/wiki, wikipost will first see
if a /mnt/wiki.%s exists in its (httpd's) namespace.  If so, it will
bind that /mnt/wiki.%s onto /mnt/wiki and use it.  In other words,
the wikifs can be "stored" in httpd's namespace instead of being
"stored" in /srv.

The code falls back to the pre-existing behavior if there is no
/mnt/wiki.%s.

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].