1 /* Authors: Karl MacMillan <kmacmillan@tresys.com> 2 * 3 * A set of utility functions that aid policy decision when dealing 4 * with hierarchal namespaces. 5 * 6 * Copyright (C) 2006 Tresys Technology, LLC 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 */ 22 23 #ifndef __SEPOL_UTIL_H__ 24 #define __SEPOL_UTIL_H__ 25 26 #include <sys/cdefs.h> 27 28 __BEGIN_DECLS 29 30 extern int add_i_to_a(uint32_t i, uint32_t * cnt, uint32_t ** a); 31 32 extern char *sepol_av_to_string(policydb_t * policydbp, uint32_t tclass, 33 sepol_access_vector_t av); 34 35 char *sepol_extended_perms_to_string(avtab_extended_perms_t *xperms); 36 37 /* 38 * The tokenize function may be used to 39 * replace sscanf 40 */ 41 extern int tokenize(char *line_buf, char delim, int num_args, ...); 42 43 __END_DECLS 44 #endif 45