From owner-cvs-all@FreeBSD.ORG Sun Nov 16 12:18:25 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD6B416A4CE; Sun, 16 Nov 2003 12:18:25 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AC8743FA3; Sun, 16 Nov 2003 12:18:25 -0800 (PST) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAGKIPXJ011380; Sun, 16 Nov 2003 12:18:25 -0800 (PST) (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAGKIONO011379; Sun, 16 Nov 2003 12:18:24 -0800 (PST) (envelope-from rwatson) Message-Id: <200311162018.hAGKIONO011379@repoman.freebsd.org> From: Robert Watson Date: Sun, 16 Nov 2003 12:18:24 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/sys mac.h src/lib/libc/posix1e mac_get.3 mac_get.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2003 20:18:25 -0000 rwatson 2003/11/16 12:18:24 PST FreeBSD src repository Modified files: sys/sys mac.h lib/libc/posix1e mac_get.3 mac_get.c Log: Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET and SO_PEERLABEL. This provides an interface to query the label of a socket peer without embedding implementation details of mac_t in the application. Previously, sizeof(*mac_t) had to be specified by an application when performing getsockopt(). Document mac_get_peer(3), and expand documentation of the other mac_get(3) functions. Note that it's possible to get EINVAL back from mac_get_fd(3) when pointing it at an inappropriate object. NOTE: mac_get_fd() and mac_set_fd() support for sockets will follow shortly, so the documentation is slightly ahead of the code. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Revision Changes Path 1.8 +33 -23 src/lib/libc/posix1e/mac_get.3 1.4 +10 -3 src/lib/libc/posix1e/mac_get.c 1.50 +1 -0 src/sys/sys/mac.h