mls.h (8a84fc15ae5cafcc366dd85cf8e1ab2040679abc) | mls.h (02752760359db6b00a3ffb1acfc13ef8d9eb1e3f) |
---|---|
1/* 2 * Multi-level security (MLS) policy operations. 3 * 4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 5 */ 6/* 7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> 8 * 9 * Support for enhanced MLS infrastructure. 10 * 11 * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. 12 */ 13/* 14 * Updated: Hewlett-Packard <paul.moore@hp.com> 15 * | 1/* 2 * Multi-level security (MLS) policy operations. 3 * 4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 5 */ 6/* 7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> 8 * 9 * Support for enhanced MLS infrastructure. 10 * 11 * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. 12 */ 13/* 14 * Updated: Hewlett-Packard <paul.moore@hp.com> 15 * |
16 * Added support to import/export the MLS label | 16 * Added support to import/export the MLS label from NetLabel |
17 * 18 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006 19 */ 20 21#ifndef _SS_MLS_H_ 22#define _SS_MLS_H_ 23 24#include "context.h" --- 39 unchanged lines hidden (view full) --- 64 struct context *tcontext, 65 u16 tclass, 66 u32 specified, 67 struct context *newcontext); 68 69int mls_setup_user_range(struct context *fromcon, struct user_datum *user, 70 struct context *usercon); 71 | 17 * 18 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006 19 */ 20 21#ifndef _SS_MLS_H_ 22#define _SS_MLS_H_ 23 24#include "context.h" --- 39 unchanged lines hidden (view full) --- 64 struct context *tcontext, 65 u16 tclass, 66 u32 specified, 67 struct context *newcontext); 68 69int mls_setup_user_range(struct context *fromcon, struct user_datum *user, 70 struct context *usercon); 71 |
72void mls_export_lvl(const struct context *context, u32 *low, u32 *high); 73void mls_import_lvl(struct context *context, u32 low, u32 high); | 72#ifdef CONFIG_NETLABEL 73void mls_export_netlbl_lvl(struct context *context, 74 struct netlbl_lsm_secattr *secattr); 75void mls_import_netlbl_lvl(struct context *context, 76 struct netlbl_lsm_secattr *secattr); 77int mls_export_netlbl_cat(struct context *context, 78 struct netlbl_lsm_secattr *secattr); 79int mls_import_netlbl_cat(struct context *context, 80 struct netlbl_lsm_secattr *secattr); 81#else 82static inline void mls_export_netlbl_lvl(struct context *context, 83 struct netlbl_lsm_secattr *secattr) 84{ 85 return; 86} 87static inline void mls_import_netlbl_lvl(struct context *context, 88 struct netlbl_lsm_secattr *secattr) 89{ 90 return; 91} 92static inline int mls_export_netlbl_cat(struct context *context, 93 struct netlbl_lsm_secattr *secattr) 94{ 95 return -ENOMEM; 96} 97static inline int mls_import_netlbl_cat(struct context *context, 98 struct netlbl_lsm_secattr *secattr) 99{ 100 return -ENOMEM; 101} 102#endif |
74 | 103 |
75int mls_export_cat(const struct context *context, 76 unsigned char **low, 77 size_t *low_len, 78 unsigned char **high, 79 size_t *high_len); 80int mls_import_cat(struct context *context, 81 const unsigned char *low, 82 size_t low_len, 83 const unsigned char *high, 84 size_t high_len); 85 | |
86#endif /* _SS_MLS_H */ 87 | 104#endif /* _SS_MLS_H */ 105 |