source code open - smack
[framework/security/smack.git] / doc / smackaccess.1
1 '\" t
2 .\" This file is part of libsmack
3 .\" Copyright (C) 2012 Intel Corporation
4 .\"
5 .\" This library is free software; you can redistribute it and/or
6 .\" modify it under the terms of the GNU Lesser General Public License
7 .\" version 2.1 as published by the Free Software Foundation.
8 .\"
9 .\" This library is distributed in the hope that it will be useful, but
10 .\" WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 .\" Lesser General Public License for more details.
13 .\"
14 .\" You should have received a copy of the GNU Lesser General Public
15 .\" License along with this library; if not, write to the Free Software
16 .\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17 .\" 02110-1301 USA
18 .\"
19 .\" Author:
20 .\" Brian McGillion <brian.mcgillion@intel.com>
21 .\"
22 .TH "SMACKACCESS" "1" "03/05/2012" "smack-utils 1\&.0"
23 .SH NAME
24 smackaccess \- Determine if a rule is permitted by the current Smack policy
25 .SH SYNOPSIS
26 .B smackaccess <subject> <object> <access_type>
27 .SH DESCRIPTION
28 .B smackaccess
29 allows for the caller to test if a process has access to another object and the type of access that is granted.
30 .SH OPTIONS
31 .IP subject
32 The context of the process that will be doing the access request
33 .IP object
34 The context of the filesystem object or process that is going to be accessed
35 .IP access_type
36 The type of access that will be requested e.g. "rwaxt", which respectively refer to read, write, append, execute and transmute.
37 .SH RETURN VALUE
38 On success the result of the test will be printed, 1 indicates that the rule is permitted by the policy and 0 indicates that such an action would fail.
39 .SH EXIT STATUS
40 On success
41 .B smackaccess
42 returns 0 and 1 on failure.