Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2005 14:48:14 GMT
From:      Andrew Reisse <areisse@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 69211 for review
Message-ID:  <200501181448.j0IEmEA5054767@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=69211

Change 69211 by areisse@areisse_tislabs on 2005/01/18 14:47:49

	Add the getfilecon/setfilecon interfaces to libsebsd, to provide
	compatability with libselinux.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/lib/libsebsd/Makefile#5 edit
.. //depot/projects/trustedbsd/sebsd/lib/libsebsd/filecon.c#1 add
.. //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd.h#5 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/Makefile#5 (text+ko) ====

@@ -6,6 +6,7 @@
 
 MAINTAINER= cboss@nai.com
 LIB= sebsd
+LINKS= selinux
 CFLAGS+= -I${.CURDIR}/../../sys/security/sebsd
 CFLAGS+=-I${.CURDIR}/../../sys
 LDADD+=	-L${.OBJDIR}/../libpam/libpam ${MINUSLPAM}
@@ -15,7 +16,7 @@
 SRCS=	system.c security_get_user_contexts.c get_ordered_context_list.c \
 	getseccontext.c query_user_context.c security_change_context.c \
 	string_to_security_class.c security_compute_av.c context.c \
-	get_default_type.c
+	get_default_type.c filecon.c
 INCS=	sebsd_context.h sebsd_ss.h sebsd_proc.h sebsd_fs.h sebsd.h \
 	sebsd_syscalls.h flask_types.h
 

==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd.h#5 (text+ko) ====

@@ -71,6 +71,16 @@
 	    struct security_response *response);
 
 
+/* Get file context, and set *con to refer to it.
+   Caller must free via freecon. */
+int getfilecon(const char *path, security_context_t *con);
+int lgetfilecon(const char *path, security_context_t *con);
+int fgetfilecon(int fd, security_context_t *con);
+
+/* Set file context */
+int setfilecon(const char *path, security_context_t con);
+int lsetfilecon(const char *path, security_context_t con);
+int fsetfilecon(int fd, security_context_t con);
 
 /* 
  * Get the default type (domain) for 'role' and set 'type' to refer to it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501181448.j0IEmEA5054767>