Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Get the uid from the socket's credentials.



details:   https://anonhg.NetBSD.org/src/rev/2dfc3338113d
branches:  trunk
changeset: 750403:2dfc3338113d
user:      elad <elad%NetBSD.org@localhost>
date:      Wed Dec 30 06:59:32 2009 +0000

description:
Get the uid from the socket's credentials.

diffstat:

 sys/netinet/tcp_usrreq.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 74e090629884 -r 2dfc3338113d sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Wed Dec 30 06:58:50 2009 +0000
+++ b/sys/netinet/tcp_usrreq.c  Wed Dec 30 06:59:32 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_usrreq.c,v 1.157 2009/09/16 15:23:05 pooka Exp $   */
+/*     $NetBSD: tcp_usrreq.c,v 1.158 2009/12/30 06:59:32 elad Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.157 2009/09/16 15:23:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.158 2009/12/30 06:59:32 elad Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1161,7 +1161,7 @@
        int error;
        uid_t uid;
 
-       uid = sockp->so_uidinfo->ui_uid;
+       uid = kauth_cred_geteuid(sockp->so_cred);
        if (oldp) {
                sz = MIN(sizeof(uid), *oldlenp);
                error = copyout(&uid, oldp, sz);



Home | Main Index | Thread Index | Old Index