loolwsd/LOOLBroker.cpp |   25 -------------------------
 1 file changed, 25 deletions(-)

New commits:
commit 0d1be4fe82d13c1526729e565d525856810e83df
Author: Henry Castro <hcas...@collabora.com>
Date:   Mon Dec 28 12:29:54 2015 -0400

    loolwsd: cleanup unnecessary LOOLWSD code

diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index a4ee3ad..7870116 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -204,31 +204,6 @@ namespace
                 Log::error("Error: setuid() failed.");
             }
         }
-#if ENABLE_DEBUG
-        if (geteuid() == 0 && getuid() == 0)
-        {
-#ifdef __linux
-            // Argh, awful hack
-            if (capability == CAP_FOWNER)
-                return;
-#endif
-
-            // Running under sudo, probably because being debugged? Let's drop 
super-user rights.
-            LOOLWSD::runningAsRoot = true;
-            if (LOOLWSD::uid == 0)
-            {
-                struct passwd *nobody = getpwnam("nobody");
-                if (nobody)
-                    LOOLWSD::uid = nobody->pw_uid;
-                else
-                    LOOLWSD::uid = 65534;
-            }
-            if (setuid(LOOLWSD::uid) != 0)
-            {
-                Log::error("Error: setuid() failed.");
-            }
-        }
-#endif
     }
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to