summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>1999-09-19 02:17:02 +0000
committergreen <green@FreeBSD.org>1999-09-19 02:17:02 +0000
commit4395e552e2eb08e6dc53ccf82bfcc4040c59bda6 (patch)
treedd4bc747543783e9e5ae654bb73c96623d75d2e9 /sys/netinet/tcp_subr.c
parent7ab42b2253ccc67416479e053f47749a18e199df (diff)
downloadFreeBSD-src-4395e552e2eb08e6dc53ccf82bfcc4040c59bda6.zip
FreeBSD-src-4395e552e2eb08e6dc53ccf82bfcc4040c59bda6.tar.gz
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.
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c6
1 files changed, 2 insertions, 4 deletions
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);
OpenPOWER on IntegriCloud