[Libreoffice-commits] online.git: Branch 'private/hcvcastro/forking' - loolwsd/LOOLBroker.cpp loolwsd/Makefile.am
Henry Castro
hcastro at collabora.com
Fri Jul 24 06:14:58 PDT 2015
loolwsd/LOOLBroker.cpp | 10 +++++++++-
loolwsd/Makefile.am | 2 --
2 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit f5dc4973a899c02a97f1bf0090a647d5fde658ca
Author: Henry Castro <hcastro at collabora.com>
Date: Fri Jul 24 09:14:32 2015 -0400
loolwsd: deploy loolkit to chroot jail
diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index 8163534..6eb2b94 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -332,6 +332,14 @@ int main(int argc, char** argv)
linkOrCopy(sysTemplate, jail);
linkOrCopy(loTemplate, jailLOInstallation);
+ // It is necessary to deploy loolkit process to chroot jail.
+ if (!File("loolkit").exists())
+ {
+ std::cout << "loolkit does not exists" << std::endl;
+ exit(1);
+ }
+ File("loolkit").copyTo(Path(jail, "/usr/bin").toString());
+
#ifdef __linux
// Create the urandom and random devices
File(Path(jail, "/dev")).createDirectory();
@@ -354,7 +362,7 @@ int main(int argc, char** argv)
}
#endif
- std::cout << "desktopMain -> chroot(\"" + jail.toString() + "\")" << std::endl;
+ std::cout << "loolbroker -> chroot(\"" + jail.toString() + "\")" << std::endl;
if (chroot(jail.toString().c_str()) == -1)
{
std::cout << "chroot(\"" + jail.toString() + "\") failed: " + strerror(errno) << std::endl;
diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index 106a76b..937bcb7 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -27,5 +27,3 @@ all-local: loolwsd
sudo chown root loolbroker && sudo chmod u+s loolbroker; \
fi; \
fi
- mkdir -p ./systemplate/usr/bin
- cp loolkit ./systemplate/usr/bin
More information about the Libreoffice-commits
mailing list