Ocean
Loading...
Searching...
No Matches
platform/linux/Utilities.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_PLATFORM_LINUX_UTILITIES_H
9#define META_OCEAN_PLATFORM_LINUX_UTILITIES_H
10
12
14
15namespace Ocean
16{
17
18namespace Platform
19{
20
21namespace Linux
22{
23
24/**
25 * This class implements utility functions for Linux platforms.
26 * @ingroup platformlinux
27 */
29{
30 protected:
31
32 /**
33 * Definition of a scoped object for FILE pointers.
34 */
35 using ScopedFILE = ScopedObjectCompileTimeT<FILE*, FILE*, int, pclose, 0, false /*tCheckReturnValue*/>;
36
37 public:
38
39 /**
40 * Checks the security enhanced linux state (SELinux).
41 * Can be toggled with "setenforce 0" or "setenforce 1".
42 * @return True, if the SELinux state is permissive; False, if the SELinux state is enforcing
43 * @return True, if the state could be determined
44 */
46};
47
48}
49
50}
51
52}
53
54#endif // META_OCEAN_PLATFORM_LINUX_UTILITIES_H
This class implements utility functions for Linux platforms.
Definition platform/linux/Utilities.h:29
static bool checkSecurityEnhancedLinuxStateIsPermissive()
Checks the security enhanced linux state (SELinux).
This class wraps an unmanaged object (or reference) which needs to be released after usage.
Definition ScopedObject.h:166
The namespace covering the entire Ocean framework.
Definition Accessor.h:15