lkml.org 
[lkml]   [1999]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: uid change in sock_alloc breaks identd
According to Alan Cox:
> > - inode->i_uid = current->uid;
> > - inode->i_gid = current->gid;
> > + inode->i_uid = current->fsuid;
> > + inode->i_gid = current->fsgid;
> >
> > Now in the case of a setuid client like rlogin, the real uid is ther user
>
> Well your rlogin should have dropped back to the real user except for
> the call to bind() 8).

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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [from the cache]
©2003-2011 Jasper Spaans