PERFORCE change 22518 for review
Brian Feldman
green at freebsd.org
Thu Dec 19 19:21:06 GMT 2002
http://perforce.freebsd.org/chv.cgi?CH=22518
Change 22518 by green at green_laptop_2 on 2002/12/19 11:20:52
* Make all SEBSD function prototypes live in sebsd.h.
* Add get_default_context().
* Add getseccontext().
* Add the ability for get_default_user_contexts() use
getseccontext() to determine the current context and
prevent the program using it from needing to retrieve
the subject label itself.
Affected files ...
.. //depot/projects/trustedbsd/mac/lib/libsebsd/Makefile#3 edit
.. //depot/projects/trustedbsd/mac/lib/libsebsd/sebsd.h#3 edit
.. //depot/projects/trustedbsd/mac/lib/libsebsd/sebsd_ss.h#5 edit
.. //depot/projects/trustedbsd/mac/lib/libsebsd/security_get_user_contexts.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/mac/lib/libsebsd/Makefile#3 (text+ko) ====
@@ -10,7 +10,8 @@
CFLAGS+=-I${.CURDIR}/../../sys
NOMAN=
-SRCS= system.c security_get_user_contexts.c get_ordered_context_list.c
+SRCS= system.c security_get_user_contexts.c get_ordered_context_list.c \
+ getseccontext.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/mac/lib/libsebsd/sebsd.h#3 (text+ko) ====
@@ -47,8 +47,15 @@
#define SEBSD_ID_STRING "sebsd"
-int sebsd_enabled();
-int sebsd_enforcing();
-int sebsd_avc_toggle();
+int sebsd_enabled(void);
+int sebsd_enforcing(void);
+int sebsd_avc_toggle(void);
+char *getseccontext(void);
+int security_get_user_contexts(const char *fromcontext, const char *username,
+ char ***retcontexts, size_t *ncontexts);
+int get_ordered_context_list(const char *user_name, const char *from_context,
+ char ***ordered_list, size_t *length);
+int get_default_context(const char *username, const char *from_context,
+ char **default_context);
#endif /* _SEBSD_H */
==== //depot/projects/trustedbsd/mac/lib/libsebsd/sebsd_ss.h#5 (text+ko) ====
@@ -81,17 +81,6 @@
extern int security_get_sids(security_id_t *sids,
__u32 *nel);
-extern int security_get_user_contexts(const char *fromcontext,
- const char *username,
- const char *const **retcontexts,
- size_t *ncontexts);
-
-/* XXX: do we need its header file? */
-extern int get_ordered_context_list(const char *user_name,
- const char *from_context,
- char ***ordered_list,
- size_t *length);
-
extern int security_mls(void);
==== //depot/projects/trustedbsd/mac/lib/libsebsd/security_get_user_contexts.c#3 (text+ko) ====
@@ -50,7 +50,7 @@
*/
int
security_get_user_contexts(const char *fromcontext, const char *username,
- const char *const **retcontexts, size_t *ncontexts)
+ char ***retcontexts, size_t *ncontexts)
{
char *arguments, *contexts, *s, **contextarray;
ssize_t arguments_len;
@@ -116,6 +116,6 @@
n++;
}
*ncontexts = n;
- *retcontexts = (const char *const *)contextarray;
+ *retcontexts = contextarray;
return (0);
}
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