diff options
Diffstat (limited to 'src/selinux.h')
-rw-r--r-- | src/selinux.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/selinux.h b/src/selinux.h index 31771632e..e4ded8466 100644 --- a/src/selinux.h +++ b/src/selinux.h @@ -19,6 +19,14 @@ #ifndef COREUTILS_SELINUX_H # define COREUTILS_SELINUX_H +/* Return true if ERR corresponds to an unsupported request, + or if there is no context or it's inaccessible. */ +static inline bool +ignorable_ctx_err (int err) +{ + return err == ENOTSUP || err == ENODATA; +} + # if HAVE_SELINUX_SELINUX_H extern bool restorecon (char const *path, bool recurse, bool preserve); |