Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / libcaptive / se / priv.c
1 /* $Id$
2  * reactos security privileges emulation of libcaptive
3  * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #include "config.h"
21
22 #include "reactos/ddk/sefuncs.h"        /* self */
23 #include <glib/gmessages.h>
24
25
26 /**
27  * SePrivilegeCheck:
28  * @Privileges: List of the requested privileges; Policy 'all' or 'any' is specified inside.
29  * %NULL value is forbidden.
30  * @SubjectContext: #PSECURITY_SUBJECT_CONTEXT of the owner to check the security for.
31  * %NULL value is forbidden.
32  * @PreviousMode: %UserMode or %KernelMode to check the security for.
33  *
34  * Check the set of privileges @Privileges for @SubjectContext and return if they
35  * are sufficient.
36  *
37  * libcaptive does not support any security and therefore it always returns %TRUE.
38  *
39  * Returns: %TRUE if the privileges are sufficient.
40  */
41 BOOLEAN SePrivilegeCheck(PPRIVILEGE_SET Privileges,PSECURITY_SUBJECT_CONTEXT SubjectContext,KPROCESSOR_MODE PreviousMode)
42 {
43         g_return_val_if_fail(Privileges!=NULL,FALSE);   /* means privileges not sufficient */
44         g_return_val_if_fail(SubjectContext!=NULL,FALSE);       /* means privileges not sufficient */
45
46         return TRUE;    /* privileges OK */
47 }