Re: FVWM: fvwm 2.0.42/Solaris 2.5

From: Cameron Simpson <cameron_at_research.canon.com.au>
Date: Fri, 21 Jun 1996 10:04:45 +1000 (EST)

Daniel R Ehrlich <ehrlich_at_cse.psu.edu> writes:
| I am experiencing a weird problem with FvwmButtons/fvwm-2.0.42 and xlock under
| Solaris 2.5. If I have the following in my .fvwm2rc file:
|
| *FvwmButtons Lock xlock.xpm Exec /usr/openwin/bin/xlock -mode random
| xlock does not execute and emits the following error message:
| xlock: can't get the user password. Exiting ...
| You need to run xlock in setuid root mode on your local machine.
| Contact your system administrator.
|
| But, if I run the command
|
| /usr/openwin/bin/xlock -mode random
|
| from the shell prompt it works just fine. And xlock is already suid root:
|
| daneel:15> ls -gl /usr/openwin/bin/xlock
| -rwsrwxr-x 1 root bin 94484 Oct 2 1995 /usr/openwin/bin/xlock*
|
| and /usr/openwin/bin is on the local disk, so NFS is not stripping the suid
| bits for me:

I have a theory.
Suppose the author of xlock was an idiot and used getlogin() to find the
user's login name - fvwm will not have a controlling terminal or utmp entry
and getlogin() will fail.

Try this test:
        rsh yourhost /usr/openwin/bin/xlock -mode random
If it fails the same way it's almost certainly a controlling tty problem.

Best solution (assuming I'm right - I may not be):
        - Fix xlock to use getuid(), not getlogin().

Workaround:
        - Get your shell startup (.env for ksh, cshrc for csh, etc)
          or your first xterm to write the tty name (if any) to a well known
          file.load the name when you invoke xlock and attach
                #!/bin/sh
                # attach to a useful tty
                tty=`cat well-known-file`
                if [ ! -c "$tty" ]
                then echo "$0: $tty: not a tty" >&2; exit 1
                fi
                exec "$_at_" <"$tty" >"$tty" 2>&1
          and say
                Exec the-wrapper-above /usr/openwin/bin/xlock -mode rand

Let me know how you go,
        - Cameron Simpson
          cameron_at_research.canon.com.au, DoD#743
          http://www.dap.csiro.au/~cameron/
--
The peever can look at the best day in his life and sneer at it.
	- Jim Hill, JennyGfest '95
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Jun 20 1996 - 19:07:40 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST