Home | History | Annotate | Download | only in checkpolicy
      1 /*
      2  * Author: Karl MacMillan <kmacmillan (at) tresys.com>
      3  *
      4  * Copyright (C) 2006 Tresys Technology, LLC
      5  *
      6  *  This library is free software; you can redistribute it and/or
      7  *  modify it under the terms of the GNU Lesser General Public
      8  *  License as published by the Free Software Foundation; either
      9  *  version 2.1 of the License, or (at your option) any later version.
     10  *
     11  *  This library is distributed in the hope that it will be useful,
     12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14  *  Lesser General Public License for more details.
     15  *
     16  *  You should have received a copy of the GNU Lesser General Public
     17  *  License along with this library; if not, write to the Free Software
     18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     19  */
     20 
     21 /* Utility functions shared by checkpolicy and checkmodule */
     22 
     23 #ifndef __PARSE_UTIL_H__
     24 #define __PARSE_UTIL_H__
     25 
     26 #include <sepol/policydb/policydb.h>
     27 
     28 /* Read a source policy and populate the policydb passed in. The
     29  * policydb must already have been created and configured (e.g.,
     30  * expected policy type set. The string progname is used for
     31  * error messages. No checking of assertions, hierarchy, etc.
     32  * is done. */
     33 int read_source_policy(policydb_t * p, const char *file, const char *progname);
     34 
     35 #endif
     36