diff options
Diffstat (limited to 'subsurface-desktop-main.cpp')
-rw-r--r-- | subsurface-desktop-main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp index 2b7bf89f6..b93b642bd 100644 --- a/subsurface-desktop-main.cpp +++ b/subsurface-desktop-main.cpp @@ -59,6 +59,11 @@ int main(int argc, char **argv) files.push_back(a); } } + if (subsurface_user_is_root() && !force_root) { + printf("You are running Subsurface as root. This is not recommended.\n"); + printf("If you insist to do so, run with option --allow_run_as_root.\n"); + exit(0); + } #if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR < 22 git_threads_init(); #else |