aboutsummaryrefslogtreecommitdiff
path: root/sys/security
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2002-02-27 04:45:37 +0000
committerDima Dorfman <dd@FreeBSD.org>2002-02-27 04:45:37 +0000
commit76183f345377df655cfb357a53d52aa045fa8073 (patch)
treeb9bd8d438620748c0c88ed7a994eb55f8d617278 /sys/security
parentb7eeb587f6c0aa1aa84ed6cca74ad7ec43ed8019 (diff)
Notes
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/lomac/kernel_socket.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/security/lomac/kernel_socket.c b/sys/security/lomac/kernel_socket.c
index 541822b0aaf60..3ed2ee1b81e62 100644
--- a/sys/security/lomac/kernel_socket.c
+++ b/sys/security/lomac/kernel_socket.c
@@ -265,11 +265,7 @@ lomac_local_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
* from its process structure at the time of connect()
* (which is now).
*/
- memset(&unp3->unp_peercred, '\0', sizeof(unp3->unp_peercred));
- unp3->unp_peercred.cr_uid = td->td_proc->p_ucred->cr_uid;
- unp3->unp_peercred.cr_ngroups = td->td_proc->p_ucred->cr_ngroups;
- memcpy(unp3->unp_peercred.cr_groups, td->td_proc->p_ucred->cr_groups,
- sizeof(unp3->unp_peercred.cr_groups));
+ cru2x(td->td_proc->p_ucred, &unp3->unp_peercred);
unp3->unp_flags |= UNP_HAVEPC;
/*
* The receiver's (server's) credentials are copied