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