diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-19 19:28:15 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-19 19:28:15 +0200 |
| commit | 146b189d54e51609634d9dc4b1ab47f9e3c91d49 (patch) | |
| tree | 46736322d00b6798c1e9458278cf6c53d23dad10 /src/init/initHelpers.cpp | |
| parent | 36be9c4a11833dfceea8a2edeee0087d2f1620b1 (diff) | |
disallow running with sudo
unless you use the --i-am-really-stupid flag
Diffstat (limited to 'src/init/initHelpers.cpp')
| -rw-r--r-- | src/init/initHelpers.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init/initHelpers.cpp b/src/init/initHelpers.cpp new file mode 100644 index 00000000..dc51650a --- /dev/null +++ b/src/init/initHelpers.cpp @@ -0,0 +1,5 @@ +#include "initHelpers.hpp" + +bool Init::isSudo() { + return getuid() != geteuid() || !geteuid(); +} |
