From 4395e552e2eb08e6dc53ccf82bfcc4040c59bda6 Mon Sep 17 00:00:00 2001 From: green Date: Sun, 19 Sep 1999 02:17:02 +0000 Subject: Change so_cred's type to a ucred, not a pcred. THis makes more sense, actually. Make a sonewconn3() which takes an extra argument (proc) so new sockets created with sonewconn() from a user's system call get the correct credentials, not just the parent's credentials. --- sys/netinet/tcp_subr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/netinet/tcp_subr.c') diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index a6a5270..07da954 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -641,13 +641,11 @@ tcp_getcred SYSCTL_HANDLER_ARGS s = splnet(); inp = in_pcblookup_hash(&tcbinfo, addrs[1].sin_addr, addrs[1].sin_port, addrs[0].sin_addr, addrs[0].sin_port, 0); - if (inp == NULL || inp->inp_socket == NULL || - inp->inp_socket->so_cred == NULL) { + if (inp == NULL || inp->inp_socket == NULL) { error = ENOENT; goto out; } - error = SYSCTL_OUT(req, inp->inp_socket->so_cred->pc_ucred, - sizeof(struct ucred)); + error = SYSCTL_OUT(req, inp->inp_socket->so_cred, sizeof(struct ucred)); out: splx(s); return (error); -- cgit v1.1