]> granicus.if.org Git - linux-pam/blob - modules/pam_namespace/namespace.init
Relevant BUGIDs:
[linux-pam] / modules / pam_namespace / namespace.init
1 #!/bin/sh
2 # This is only a boilerplate for the instance initialization script.
3 # It receives polydir path as $1 and the instance path as $2.
4 #
5 # If you intend to polyinstantiate /tmp and you also want to use the X windows
6 # environment, you will have to use this script to bind mount the socket that
7 # is used by the X server to communicate with its clients. X server places
8 # this socket in /tmp/.X11-unix directory, which will get obscured by
9 # polyinstantiation. Uncommenting the following lines will bind mount
10 # the relevant directory at an alternative location (/.tmp/.X11-unix) such
11 # that the X server, window manager and X clients, can still find the
12 # socket X0 at the polyinstanted /tmp/.X11-unix.
13 #
14 #if [ $1 = /tmp ]; then
15 #       if [ ! -f /.tmp/.X11-unix ]; then
16 #               mkdir -p /.tmp/.X11-unix
17 #       fi
18 #       mount --bind /tmp/.X11-unix /.tmp/.X11-unix
19 #       cp -fp -- /tmp/.X0-lock "$2/.X0-lock"
20 #       mkdir -- "$2/.X11-unix"
21 #       ln -fs -- /.tmp/.X11-unix/X0 "$2/.X11-unix/X0"
22 #fi
23
24 exit 0