This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sun_path for accept()'ed sockets


    Wolfgang> So my questions are: - how can you find out the UID of
    Wolfgang> the client-process with the GNU C Library? - is there a
    Wolfgang> way to find out the PID as well in a portable way ?

All right, I found it.
getsockopt (socket_fd, SOL_SOCKET, (struct ucred *), (socklen_t *))
was the correct answer.


Wolfgang

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]