Process manager symbolic links
QNX SDP8.0System ArchitectureDeveloperUser
We've discussed prefixes that map to a resource manager. Another form of mapping is a process manager symbolic link (procmgr symlink), which is a simple string substitution. Unlike a filesystem symbolic link, it exists only in memory instead of being a filesystem object.
Procmgr symlinks behave a lot like ordinary symlinks with the following exceptions:
- Because they don't exist in the filesystem, you can create them in cases where you can't create ordinary symlinks (e.g., read-only filesystems).
- To create them, a process requires the PATHSPACE ability. If security policies are in use, its type must have an allow_link rule that specifies the path where the symlink is created. Filesystem permissions are ignored.
- A procmgr symlink can permit a process whose root directory has been changed (i.e., a
chrooted process) to access paths outside its root directory (for more information, go to
chroot (change root)
in the QNX OS System Security Guide). - Procmgr symlinks are not persistent and are lost when the system reboots.
You can use the following methods to create procmgr symlinks:
- Using the procmgr_symlink command in a boot script (go to
Script files
in the mkifs entry in the Utilities Reference) - Calling pathmgr_symlink()
- Using the ln (link) command. This command is typically used to create
links on a filesystem: either hard links, or symbolic links by using the -s
option. If you specify both -s and -P, then a procmgr
symbolic link is created.
Command Description ln -s existing_file symbolic_link Create a filesystem symbolic link. ln -Ps existing_file symbolic_link Create a procmgr symlink. Note that a procmgr symlink always takes precedence over a filesystem symbolic link.
As an example that uses ln, assume that you're running on a machine that
doesn't have a local filesystem. However, there's a filesystem on another machine available
over NFS (mounted at /nfs_host) that you wish to access as
/bin. You accomplish this using the following procmgr symbolic link:
ln -Ps /nfs_host/x86_64/bin /bin
This procmgr symlink causes /bin to be mapped into /nfs_host/x86_64/bin. For example, /bin/ls is replaced with the following: /nfs_host/x86_64/bin/ls
Page updated: