diff options
author | green <green@FreeBSD.org> | 1999-09-19 02:17:02 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-09-19 02:17:02 +0000 |
commit | 4395e552e2eb08e6dc53ccf82bfcc4040c59bda6 (patch) | |
tree | dd4bc747543783e9e5ae654bb73c96623d75d2e9 /sys/netinet/udp_usrreq.c | |
parent | 7ab42b2253ccc67416479e053f47749a18e199df (diff) | |
download | FreeBSD-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/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 337e796..44ff6ee 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -473,13 +473,11 @@ udp_getcred SYSCTL_HANDLER_ARGS s = splnet(); inp = in_pcblookup_hash(&udbinfo, addrs[1].sin_addr, addrs[1].sin_port, addrs[0].sin_addr, addrs[0].sin_port, 1); - 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); |