role-tests.h File Reference


Detailed Description

Declarations for libapol role query tests.

Author:
Jeremy A. Mowery jmowery@tresys.com

Jason Tang jtang@tresys.com

Copyright (C) 2007 Tresys Technology, LLC

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file role-tests.h.

#include <CUnit/CUnit.h>

Go to the source code of this file.


Functions

int role_init ()
int role_cleanup ()

Variables

CU_TestInfo role_tests []

Function Documentation

int role_init  ) 
 

Definition at line 132 of file role-tests.c.

References apol_policy_create_from_policy_path(), apol_policy_get_qpol(), apol_policy_path_create(), apol_policy_path_destroy(), apol_policy_path_t, APOL_POLICY_PATH_TYPE_MONOLITHIC, qp, SOURCE_POLICY, and sp.

00133 {
00134         apol_policy_path_t *ppath = apol_policy_path_create(APOL_POLICY_PATH_TYPE_MONOLITHIC, SOURCE_POLICY, NULL);
00135         if (ppath == NULL) {
00136                 return 1;
00137         }
00138 
00139         if ((sp = apol_policy_create_from_policy_path(ppath, 0, NULL, NULL)) == NULL) {
00140                 apol_policy_path_destroy(&ppath);
00141                 return 1;
00142         }
00143         apol_policy_path_destroy(&ppath);
00144 
00145         qp = apol_policy_get_qpol(sp);
00146 
00147         return 0;
00148 }

int role_cleanup  ) 
 

Definition at line 150 of file role-tests.c.

References apol_policy_destroy(), and sp.

00151 {
00152         apol_policy_destroy(&sp);
00153         return 0;
00154 }


Variable Documentation

CU_TestInfo role_tests[]
 

Definition at line 124 of file role-tests.c.

Referenced by main().