Well the problem is that rlogin and rsh call the library function
rcmd(). That function _has_ to be called with euid == 0.
The above change in 2.2.7 simply broke GNU libc. All versions ..
For apparently no reason (AFAICS, IMHO etc)
> The above also fixes well designed apps where if you
> ran them under su you got a wrong report 8)
I don't understand, whatever you run under su runs with
uid == suid == euid == fsuid, right ?
Anyway, a Linux-specific fix in rlogin and rsh is possible by doing
setfsuid(getuid());
.. rcmd() ..
setfsuid(geteuid());
That will work under all kernels, and will not break stuff
when the rcmd() function in glibc is fixed (or the kernel.....)
So Herbert, please fix rlogin and rsh :]
Mike.
-- ... somehow I have a feeling the hurting hasn't even begun yet -- Bill, "The Terrible Thunderlizards"- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/