1 /* Include and determine availability of smack routines
2 Copyright (C) 2013-2023 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
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, see <https://www.gnu.org/licenses/>. */
17 /* Here we replace or wrap the most common smack functions used by coreutils.
18 Others will need to be protected by HAVE_SMACK. */
21 # include <sys/smack.h>
24 smack_new_label_from_self (char **label
)
30 smack_set_label_for_self (char const *label
)
37 is_smack_enabled (void)
40 return smack_smackfs_path () != nullptr;