PERFORCE change 69211 for review
Andrew Reisse
areisse at FreeBSD.org
Tue Jan 18 14:48:14 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=69211
Change 69211 by areisse at 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 at 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.
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list