OpenCoverage

smack.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gl/lib/smack.h
Source codeSwitch to Preprocessed file
LineSourceCount
1/* Include and determine availability of smack routines-
2 Copyright (C) 2013-2018 Free Software Foundation, Inc.-
3-
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.-
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, see <https://www.gnu.org/licenses/>. */-
16-
17/* Here we replace or wrap the most common smack functions used by coreutils.-
18 Others will need to be protected by HAVE_SMACK. */-
19-
20#include <config.h>-
21-
22#ifdef HAVE_SMACK-
23# include <sys/smack.h>-
24#else-
25static inline ssize_t-
26smack_new_label_from_self (char **label)-
27{-
28 return -1;
never executed: return -1;
0
29}-
30-
31static inline int-
32smack_set_label_for_self (const char *label)-
33{-
34 return -1;
never executed: return -1;
0
35}-
36#endif-
37-
38static inline bool-
39is_smack_enabled (void)-
40{-
41#ifdef HAVE_SMACK-
42 return smack_smackfs_path () != NULL;-
43#else-
44 return false;
executed 306 times by 2 tests: return 0 ;
Executed by:
  • id
  • ls
306
45#endif-
46}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.1.2