dumb question
Mark Kettenis
kettenis@phys.uva.nl
Tue Jun 30 02:53:00 GMT 1998
Date: Tue, 30 Jun 1998 01:16:33 -0400
From: Zack Weinberg <zack@rabi.phys.columbia.edu>
On Mon, 29 Jun 1998 23:04:22 -0400, Roland McGrath wrote:
>> anyone know what 'struct ucred' is?
>
>It's a common type in BSD kernels. Where did you come across it?
In some userspace code that seems to expect it's defined in
sys/types.h. Or maybe sys/socket.h. There's a reference in
sysdeps/.../linux/bits/socket.h (__SCM_CREDENTIALS), but the actual
type is not defined anywhere.
It is defined in one of the linux/*.h header files, but the header
file in question is not usable because of name-space pollution. I
think we should define the type somewhere in one of the bits/*.h
files, but I don't know which one.
I intend to use `struct ucred' in the utmp daemon for getting the
credentials of the process at the other end of a socket with
SO_PEERCRED option. I already have an implementation but it only
works with development kernels so I don't know if we should add it to
glibc before 2.2 is out. With this change a non-suid xterm is
possible (I have one, but xterm needs somne changes to use grantpt() etc.).
Mark
PS Thorsten, if you want a code example, please ask
.
More information about the Libc-hacker
mailing list