2 * reactos security privileges emulation of libcaptive
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
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
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.
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
22 #include "reactos/ddk/sefuncs.h" /* self */
23 #include <glib/gmessages.h>
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.
34 * Check the set of privileges @Privileges for @SubjectContext and return if they
37 * libcaptive does not support any security and therefore it always returns %TRUE.
39 * Returns: %TRUE if the privileges are sufficient.
41 BOOLEAN SePrivilegeCheck(PPRIVILEGE_SET Privileges,PSECURITY_SUBJECT_CONTEXT SubjectContext,KPROCESSOR_MODE PreviousMode)
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 */
46 return TRUE; /* privileges OK */