Module Name:    src
Committed By:   elad
Date:           Wed Dec 30 06:59:32 UTC 2009

Modified Files:
        src/sys/netinet: tcp_usrreq.c

Log Message:
Get the uid from the socket's credentials.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/netinet/tcp_usrreq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_usrreq.c
diff -u src/sys/netinet/tcp_usrreq.c:1.157 src/sys/netinet/tcp_usrreq.c:1.158
--- src/sys/netinet/tcp_usrreq.c:1.157	Wed Sep 16 15:23:05 2009
+++ src/sys/netinet/tcp_usrreq.c	Wed Dec 30 06:59:32 2009
@@ -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);

Reply via email to