[Glibc-bsd-commits] r5167 - in trunk/freebsd-glue: debian src/freebsd-glue

Robert Millan rmh at moszumanska.debian.org
Sun Nov 24 13:05:42 UTC 2013


Author: rmh
Date: 2013-11-24 13:05:42 +0000 (Sun, 24 Nov 2013)
New Revision: 5167

Added:
   trunk/freebsd-glue/src/freebsd-glue/mac_set.c
Modified:
   trunk/freebsd-glue/debian/changelog
   trunk/freebsd-glue/src/freebsd-glue/Makefile
Log:
Add mac_set family of functions.

Modified: trunk/freebsd-glue/debian/changelog
===================================================================
--- trunk/freebsd-glue/debian/changelog	2013-11-24 12:59:32 UTC (rev 5166)
+++ trunk/freebsd-glue/debian/changelog	2013-11-24 13:05:42 UTC (rev 5167)
@@ -13,6 +13,7 @@
   * Add <sys/file.h> (stub for <sys/kglue/sys/file.h>).
   * Add <sys/user.h> and <sys/proc.h>.
   * Add _PATH_UUCPLOCK (diverge from upstream as per FHS).
+  * Add mac_set family of functions.
 
  -- Robert Millan <rmh at debian.org>  Sat, 23 Nov 2013 20:57:05 +0100
 

Modified: trunk/freebsd-glue/src/freebsd-glue/Makefile
===================================================================
--- trunk/freebsd-glue/src/freebsd-glue/Makefile	2013-11-24 12:59:32 UTC (rev 5166)
+++ trunk/freebsd-glue/src/freebsd-glue/Makefile	2013-11-24 13:05:42 UTC (rev 5167)
@@ -21,6 +21,7 @@
 	linkaddr.c \
 	login_class.c \
 	mac.c \
+	mac_set.c \
 	socket.c \
 	${NULL}
 .endif

Added: trunk/freebsd-glue/src/freebsd-glue/mac_set.c
===================================================================
--- trunk/freebsd-glue/src/freebsd-glue/mac_set.c	                        (rev 0)
+++ trunk/freebsd-glue/src/freebsd-glue/mac_set.c	2013-11-24 13:05:42 UTC (rev 5167)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
+ * All rights reserved.
+ *
+ * This software was developed by Robert Watson for the TrustedBSD Project.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/mac.h>
+
+extern	int	__mac_set_fd(int fd, struct mac *mac_p);
+extern	int	__mac_set_file(const char *path_p, struct mac *mac_p);
+extern	int	__mac_set_link(const char *path_p, struct mac *mac_p);
+extern	int	__mac_set_proc(struct mac *mac_p);
+
+int
+mac_set_fd(int fd, struct mac *label)
+{
+
+	return (__mac_set_fd(fd, label));
+}
+
+int
+mac_set_file(const char *path, struct mac *label)
+{
+
+	return (__mac_set_file(path, label));
+}
+
+int
+mac_set_link(const char *path, struct mac *label)
+{
+
+	return (__mac_set_link(path, label));
+}
+
+int
+mac_set_proc(struct mac *label)
+{
+
+	return (__mac_set_proc(label));
+}




More information about the Glibc-bsd-commits mailing list