Lines Matching +full:len +full:- +full:or +full:- +full:define

1 /* SPDX-License-Identifier: GPL-2.0-only */
12 * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc.
17 * Copyright (C) 2003-2004 Tresys Technology, LLC
21 #define _SS_POLICYDB_H_
54 struct symtab permissions; /* class-specific permission symbol table */
58 #define DEFAULT_SOURCE 1
59 #define DEFAULT_TARGET 2
64 #define DEFAULT_SOURCE_LOW 1
65 #define DEFAULT_SOURCE_HIGH 2
66 #define DEFAULT_SOURCE_LOW_HIGH 3
67 #define DEFAULT_TARGET_LOW 4
68 #define DEFAULT_TARGET_HIGH 5
69 #define DEFAULT_TARGET_LOW_HIGH 6
70 #define DEFAULT_GLBLUB 7
84 u32 type; /* program executable type, or new object type */
85 u32 tclass; /* process class, or new object class */
123 struct mls_range range; /* MLS range (min - max) for user */
178 } port; /* TCP or UDP port information */
213 #define SYM_COMMONS 0
214 #define SYM_CLASSES 1
215 #define SYM_ROLES 2
216 #define SYM_TYPES 3
217 #define SYM_USERS 4
218 #define SYM_BOOLS 5
219 #define SYM_LEVELS 6
220 #define SYM_CATS 7
221 #define SYM_NUM 8
224 #define OCON_ISID 0 /* initial SIDs */
225 #define OCON_FS 1 /* unlabeled file systems (deprecated) */
226 #define OCON_PORT 2 /* TCP and UDP port numbers */
227 #define OCON_NETIF 3 /* network interfaces */
228 #define OCON_NODE 4 /* nodes */
229 #define OCON_FSUSE 5 /* fs_use */
230 #define OCON_NODE6 6 /* IPv6 nodes */
231 #define OCON_IBPKEY 7 /* Infiniband PKeys */
232 #define OCON_IBENDPORT 8 /* Infiniband end ports */
233 #define OCON_NUM 9
241 #define p_commons symtab[SYM_COMMONS]
242 #define p_classes symtab[SYM_CLASSES]
243 #define p_roles symtab[SYM_ROLES]
244 #define p_types symtab[SYM_TYPES]
245 #define p_users symtab[SYM_USERS]
246 #define p_bools symtab[SYM_BOOLS]
247 #define p_levels symtab[SYM_LEVELS]
248 #define p_cats symtab[SYM_CATS]
250 /* symbol names indexed by (value - 1) */
253 /* class, role, and user attributes indexed by (value - 1) */
273 /* bools indexed by (value - 1) */
285 TCP or UDP port numbers, network interfaces and nodes */
289 a persistent label mapping or use another
293 /* range transitions table (range_trans_key -> mls_range) */
296 /* type -> attribute reverse mapping */
306 size_t len; member
319 size_t len; member
340 #define POLICYDB_CONFIG_MLS 1
343 #define REJECT_UNKNOWN 0x00000002
344 #define ALLOW_UNKNOWN 0x00000004
346 #define OBJECT_R "object_r"
347 #define OBJECT_R_VAL 1
349 #define POLICYDB_MAGIC SELINUX_MAGIC
350 #define POLICYDB_STRING "SE Linux"
359 if (bytes > fp->len) in next_entry()
360 return -EINVAL; in next_entry()
362 memcpy(buf, fp->data, bytes); in next_entry()
363 fp->data += bytes; in next_entry()
364 fp->len -= bytes; in next_entry()
371 size_t len; in put_entry() local
373 if (unlikely(check_mul_overflow(bytes, num, &len))) in put_entry()
374 return -EINVAL; in put_entry()
376 if (len > fp->len) in put_entry()
377 return -EINVAL; in put_entry()
378 memcpy(fp->data, buf, len); in put_entry()
379 fp->data += len; in put_entry()
380 fp->len -= len; in put_entry()
388 return p->sym_val_to_name[sym_num][element_nr]; in sym_name()
391 extern int str_read(char **strp, gfp_t flags, struct policy_file *fp, u32 len);