summaryrefslogtreecommitdiff
path: root/lib/se-context.in.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-10-21 17:06:17 +0200
committerJim Meyering <meyering@redhat.com>2008-10-21 18:07:28 +0200
commite68f0b9d87e199e6b673b732cf48d80367b762c2 (patch)
tree20f9472c75507645b5bc715641341d1b059fc1da /lib/se-context.in.h
parentdbd243d0795137dc4877821dfb3d292fe80bcc5f (diff)
downloadgnulib-e68f0b9d87e199e6b673b732cf48d80367b762c2.tar.gz
selinux-h: new module (from coreutils/gl/)
* modules/selinux-h: New file. * lib/se-context.in.h: New file. * lib/se-selinux.in.h: New file. * m4/selinux-context-h.m4: New file. * m4/selinux-selinux-h.m4: New file.
Diffstat (limited to 'lib/se-context.in.h')
-rw-r--r--lib/se-context.in.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/se-context.in.h b/lib/se-context.in.h
new file mode 100644
index 0000000000..ec88a0318e
--- /dev/null
+++ b/lib/se-context.in.h
@@ -0,0 +1,31 @@
+#ifndef SELINUX_CONTEXT_H
+# define SELINUX_CONTEXT_H
+
+# include <errno.h>
+/* Some systems don't have ENOTSUP. */
+# ifndef ENOTSUP
+# ifdef ENOSYS
+# define ENOTSUP ENOSYS
+# else
+/* Some systems don't have ENOSYS either. */
+# define ENOTSUP EINVAL
+# endif
+# endif
+
+typedef int context_t;
+static inline context_t context_new (char const *s)
+ { errno = ENOTSUP; return 0; }
+static inline char *context_str (context_t con)
+ { errno = ENOTSUP; return (void *) 0; }
+static inline void context_free (context_t c) {}
+
+static inline int context_user_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+static inline int context_role_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+static inline int context_range_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+static inline int context_type_set (context_t sc, char const *s)
+ { errno = ENOTSUP; return -1; }
+
+#endif