Date: Tue, 13 Jun 2006 14:33:35 +0000 (UTC) From: Maxim Konovalov <maxim@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_usrreq.c Message-ID: <200606131433.k5DEXZTW041253@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
maxim 2006-06-13 14:33:35 UTC FreeBSD src repository Modified files: sys/kern uipc_usrreq.c Log: o There are two methods to get a process credentials over the unix sockets: 1) A sender sends SCM_CREDS message to a reciever, struct cmsgcred; 2) A reciever sets LOCAL_CREDS socket option and gets sender credentials in control message, struct sockcred. Both methods use the same control message type SCM_CREDS with the same control message level SOL_SOCKET, so they are indistinguishable for the receiver. A difference in struct cmsgcred and struct sockcred layouts may lead to unwanted effects. Now for sockets with LOCAL_CREDS option remove all previous linked SCM_CREDS control messages and then add a control message with struct sockcred so the process specifically asked for the peer credentials by LOCAL_CREDS option always gets struct sockcred. PR: kern/90800 Submitted by: Andrey Simonenko Regres. tests: tools/regression/sockets/unix_cmsg/ MFC after: 1 month Revision Changes Path 1.168 +24 -10 src/sys/kern/uipc_usrreq.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606131433.k5DEXZTW041253>