COMMAND
Word Perfect 8
SYSTEMS AFFECTED
Linux with wp8 (others?)
PROBLEM
Edsel Adap found following. When wordperfect 8 is installed it
creates a /tmp/wpc-<hostname> directory with permissions 777. And
all files inside of it are mode 666. And when these files are
created, symlinks are followed. Even if you delete the
wpc-<hostname> file, the next time you run wpc it creates it
again. So do not run wp8 under any powerful userid.
SOLUTION
As noted before, WordPerfect respects TMPDIR, so start the app
with something like:
#!/bin/sh
# Set $TMPDIR to ~/tmp if the user doesn't already have a TMPDIR variable
if [ "${TMPDIR}" = "" ]; then
TMPDIR=${HOME}/tmp
fi
if [ ! -d "${TMPDIR}" ]; then
# Need to make a new directory
TMPDIR_TEST="error"
/bin/mkdir "${TMPDIR}" && TMPDIR_TEST="ok"
if [ ${TMPDIR_TEST} != "ok" ]; then
/bin/echo "Unable to create safe tmp directory ${TMPDIR}"
exit 1
fi
/bin/chmod o= "${TMPDIR}"
fi
# Set $TMPDIR for the wpc-$HOSTNAME junk
export TMPDIR
# Clear LD_LIBRARY_PATH to prevent reported seg faults
LD_LIBRARY_PATH="" export LD_LIBRARY_PATH
# Set the PATH and exec the app, passing any command-line args
PATH=${PATH}:/path/to/wordperfect/wpbin export PATH
exec xwp "${@-}" &