PCMCIA works; Allowing suid scripts on laptops?
Hi all!
I finally got my laptop to work with PCMCIA. Use version 2.8.12,
and correct the obvious error in modules/k_compat.h:
/*#define writew(b, w) (*(volatile u_short *)(p) = w) NONSENSE!!!*/
#define writew(w, p) (*(volatile u_short *)(p) = w)
But now I'm facing the following problem: Advanced Power Management modules
seem to require 1.3.xxx kernels, and I'm not ready to upgrade. The most
important thing I would like APM for is to be able to reset the system clock
after a suspend. I can do that by becoming root, and issuing `/sbin/clock
-su`. But other people using the laptop won't unless I give them the root
passwd (Erk!). So I thought having a suid root script doing just that, and
maybe an fvwm menu item that you can click when you see the clock is wrong.
Problem: I never got suid scripts to work under debian! I become root,
create a script "suidtst":
#!/bin/sh
touch /root/suid.tst
and `chmod a+s suidtst`. Then as a normal user, I can execute the script, but
it complains about write authorization: suid didn't work. I tried the perl
example `wrapsuid suidtst`, which creates a small C program, and this works
fine. But not if I replace `touch /root/suid.tst` by `/sbin/clock -su`: this
still complains 'You must be superuser to change date'.
For the suid bit: I vaguely remember this was somehow disbaled in Debian for
security reasons (which do not really apply for a laptop spending 99% of the
time disconnected), but I don't remember how...
For the clock: how does it know I'm not a superuser, even when the suid
apparently works? Normal users get rebuffed with 'clock: unable to get I/O port
access', so wrapsuid went somehow in the right direction, but not all the way...
Reply to: