aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1996-02-07 16:19:19 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1996-02-07 16:19:19 +0000
commitb1358054691bcba45232117b1c461780a9fb6c83 (patch)
tree17c104ba63b47a16b741eb1e3f20f5ac44b75f41 /sys
parenta8344ffc235a24932e558c2e9a94fc74501814ab (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_socket.c11
-rw-r--r--sys/sys/socket.h3
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index a2b6aa9456869..d05c6a696a345 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94
- * $Id: uipc_socket.c,v 1.12 1995/11/03 18:33:43 wollman Exp $
+ * $Id: uipc_socket.c,v 1.13 1995/12/14 22:51:01 bde Exp $
*/
#include <sys/param.h>
@@ -944,6 +944,11 @@ sosetopt(so, level, optname, m0)
break;
}
+ case SO_PRIVSTATE:
+ /* we don't care what the parameter is... */
+ so->so_state &= ~SS_PRIV;
+ break;
+
default:
error = ENOPROTOOPT;
break;
@@ -998,6 +1003,10 @@ sogetopt(so, level, optname, mp)
*mtod(m, int *) = so->so_options & optname;
break;
+ case SO_PRIVSTATE:
+ *mtod(m, int *) = so->so_state & SS_PRIV;
+ break;
+
case SO_TYPE:
*mtod(m, int *) = so->so_type;
break;
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index 0178010f638e2..ed301e6d61127 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)socket.h 8.4 (Berkeley) 2/21/94
- * $Id: socket.h,v 1.8 1996/01/05 17:49:30 davidg Exp $
+ * $Id: socket.h,v 1.9 1996/01/30 23:01:22 mpp Exp $
*/
#ifndef _SYS_SOCKET_H_
@@ -75,6 +75,7 @@
#define SO_RCVTIMEO 0x1006 /* receive timeout */
#define SO_ERROR 0x1007 /* get error status and clear */
#define SO_TYPE 0x1008 /* get socket type */
+#define SO_PRIVSTATE 0x1009 /* get/deny privileged state */
/*
* Structure used for manipulating linger option.