rename: loolmount -> coolmount

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ic025c5a76c6f27cdf1a6267f24cf8052733f1f24
pull/3664/head
Mert Tumer 2021-11-17 20:08:27 +03:00 committed by Andras Timar
parent 82d1782811
commit c9a4d2f6f3
17 changed files with 40 additions and 29 deletions

View File

@ -25,7 +25,7 @@ task:
--with-lokit-path=./libreoffice-src/include
--disable-seccomp --disable-setcap --enable-debug'' '
- su -m cool -c 'env HOME=/tmp/coolhome gmake -j`sysctl -n hw.ncpu`'
- chown root ./loolmount
- chmod +s ./loolmount
- chown root ./coolmount
- chmod +s ./coolmount
test_script:
# - su -m cool -c 'env HOME=/tmp/coolhome gmake check'

2
.gitignore vendored
View File

@ -74,7 +74,7 @@ connect
lokitclient
loolwsd
coolforkit
loolmount
coolmount
loolmap
loolconvert
loolsocketdump

View File

@ -16,7 +16,7 @@ export ENABLE_DEBUG
bin_PROGRAMS = \
coolforkit \
loolmount \
coolmount \
loolconvert coolconfig
if ENABLE_LIBFUZZER
@ -33,7 +33,7 @@ man_MANS = man/loolwsd.1 \
man/coolconfig.1 \
man/loolwsd-systemplate-setup.1 \
man/loolwsd-generate-proof-key.1 \
man/loolmount.1
man/coolmount.1
dist_doc_DATA = wsd/README \
@ -221,7 +221,7 @@ clientnb_SOURCES = net/clientnb.cpp \
common/StringVector.cpp \
common/Util.cpp
loolmount_SOURCES = tools/mount.cpp
coolmount_SOURCES = tools/mount.cpp
loolmap_SOURCES = tools/map.cpp
@ -379,7 +379,7 @@ CAPABILITIES = $(if @ENABLE_SETCAP@,true,false)
RUN_GDB = $(if $(GDB_FRONTEND),$(GDB_FRONTEND),gdb --tui --args)
if ENABLE_SETCAP
SET_CAPS_COMMAND=sudo @SETCAP@ cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep coolforkit && sudo @SETCAP@ cap_sys_admin=ep loolmount
SET_CAPS_COMMAND=sudo @SETCAP@ cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep coolforkit && sudo @SETCAP@ cap_sys_admin=ep coolmount
else
SET_CAPS_COMMAND=echo "Skipping capability setting"
endif
@ -387,10 +387,10 @@ endif
if ENABLE_LIBFUZZER
CLEANUP_DEPS=
else
CLEANUP_DEPS=coolwsd loolmount coolforkit
CLEANUP_DEPS=coolwsd coolmount coolforkit
endif
# Build loolwsd and loolmount first, so we can cleanup before updating
# Build loolwsd and coolmount first, so we can cleanup before updating
# the systemplate directory, which we can't rm if it's mounted.
$(SYSTEM_STAMP): ${top_srcdir}/loolwsd-systemplate-setup $(CLEANUP_DEPS)
$(SET_CAPS_COMMAND)

View File

@ -26,13 +26,13 @@
namespace JailUtil
{
bool loolmount(const std::string& arg, std::string source, std::string target)
bool coolmount(const std::string& arg, std::string source, std::string target)
{
source = Util::trim(source, '/');
target = Util::trim(target, '/');
const std::string cmd = Poco::Path(Util::getApplicationPath(), "loolmount").toString() + ' '
const std::string cmd = Poco::Path(Util::getApplicationPath(), "coolmount").toString() + ' '
+ arg + ' ' + source + ' ' + target;
LOG_TRC("Executing loolmount command: " << cmd);
LOG_TRC("Executing coolmount command: " << cmd);
return !system(cmd.c_str());
}
@ -40,7 +40,7 @@ bool bind(const std::string& source, const std::string& target)
{
LOG_DBG("Mounting [" << source << "] -> [" << target << "].");
Poco::File(target).createDirectory();
const bool res = loolmount("-b", source, target);
const bool res = coolmount("-b", source, target);
if (res)
LOG_TRC("Bind-mounted [" << source << "] -> [" << target << "].");
else
@ -52,7 +52,7 @@ bool remountReadonly(const std::string& source, const std::string& target)
{
LOG_DBG("Remounting [" << source << "] -> [" << target << "].");
Poco::File(target).createDirectory();
const bool res = loolmount("-r", source, target);
const bool res = coolmount("-r", source, target);
if (res)
LOG_TRC("Mounted [" << source << "] -> [" << target << "] readonly.");
else
@ -63,7 +63,7 @@ bool remountReadonly(const std::string& source, const std::string& target)
bool unmount(const std::string& target)
{
LOG_DBG("Unmounting [" << target << ']');
const bool res = loolmount("-u", "", target);
const bool res = coolmount("-u", "", target);
if (res)
LOG_TRC("Unmounted [" << target << "] successfully.");
else

View File

@ -5,7 +5,7 @@ set -e
case "$1" in
configure)
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit || true
setcap cap_sys_admin=ep /usr/bin/loolmount || true
setcap cap_sys_admin=ep /usr/bin/coolmount || true
adduser --quiet --system --group --home /opt/cool cool
chown cool: /etc/loolwsd/loolwsd.xml

View File

@ -25,7 +25,7 @@ COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
# Fix permissions
RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit && \
setcap cap_sys_admin=ep /usr/bin/loolmount && \
setcap cap_sys_admin=ep /usr/bin/coolmount && \
adduser --quiet --system --group --home /opt/cool cool && \
rm -rf /opt/cool && \
mkdir -p /opt/cool/child-roots && \

View File

@ -26,7 +26,7 @@ COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
# Fix permissions
RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit && \
setcap cap_sys_admin=ep /usr/bin/loolmount && \
setcap cap_sys_admin=ep /usr/bin/coolmount && \
adduser --quiet --system --group --home /opt/cool cool && \
rm -rf /opt/cool && \
mkdir -p /opt/cool/child-roots && \

View File

@ -20,7 +20,7 @@ COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
# Fix permissions
RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit && \
setcap cap_sys_admin=ep /usr/bin/loolmount && \
setcap cap_sys_admin=ep /usr/bin/coolmount && \
groupadd -r cool && \
useradd -g cool -r cool -d /opt/cool -s /bin/bash && \
rm -rf /opt/cool && \

View File

@ -105,7 +105,7 @@ echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
/usr/bin/loolconvert
/usr/bin/coolconfig
/usr/bin/loolconfig
/usr/bin/loolmount
/usr/bin/coolmount
/usr/share/loolwsd/discovery.xml
/usr/share/loolwsd/favicon.ico
/usr/share/loolwsd/browser
@ -120,7 +120,7 @@ echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
/usr/share/man/man1/coolconfig.1.gz
/usr/share/man/man1/loolwsd-systemplate-setup.1.gz
/usr/share/man/man1/loolwsd-generate-proof-key.1.gz
/usr/share/man/man1/loolmount.1.gz
/usr/share/man/man1/coolmount.1.gz
%{_unitdir}/loolwsd.service
%if 0%{?rhel}
%config(noreplace) /etc/sysconfig/loolwsd
@ -182,7 +182,7 @@ echo " Done."
%post
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
setcap cap_sys_admin=ep /usr/bin/loolmount
setcap cap_sys_admin=ep /usr/bin/coolmount
%if 0%{?rhel} >= 7
%systemd_post loolwsd.service

View File

@ -31,4 +31,4 @@ update\-system\-template
The \fBanonymize\fR command helps to read anonymized logs. If you know a document and/or a user had an issue, you can find their session in the logs by running this command with the username and/or document name and get the anonymized hash, which you use to search the logs with.
.PP
.SH "SEE ALSO"
coolforkit(1), loolconvert(1), loolwsd(1), loolwsd-systemplate-setup(1), loolwsd-generate-proof-key(1), loolmount(1)
coolforkit(1), loolconvert(1), loolwsd(1), loolwsd-systemplate-setup(1), loolwsd-generate-proof-key(1), coolmount(1)

View File

@ -8,4 +8,4 @@ Single-threaded process that spawns LibreOfficeKit (LOK) instances.
.PP
\fBNote\fR: Running this standalone is not possible. It is spawned by loolwsd and is controlled via a pipe.
.SH "SEE ALSO"
loolwsd(1), loolconvert(1), coolconfig(1), loolforkit-systemplate-setup(1), loolwsd-generate-proof-key(1), loolmount(1)
loolwsd(1), loolconvert(1), coolconfig(1), loolforkit-systemplate-setup(1), loolwsd-generate-proof-key(1), coolmount(1)

11
man/coolmount.1 100644
View File

@ -0,0 +1,11 @@
.TH COOLMOUNT "1" "May 2018" "coolmount " "User Commands"
.SH NAME
coolmount \- A very tiny helper to allow overlay mounting for Collabora Online
.SH SYNOPSIS
coolmount OPTIONS
.SH DESCRIPTION
This is a very tiny helper to allow overlay mounting.
.PP
\fBNote\fR: Running this standalone is not possible. It is used internally by loolwsd when it creates the jail for the document.
.SH "SEE ALSO"
loolwsd(1), loolconvert(1), coolconfig(1), loolforkit-systemplate-setup(1), loolwsd-generate-proof-key(1), coolforkit(1)

View File

@ -17,4 +17,4 @@ loolconvert OPTIONS FILE(S)
\fB\-\-no\-check\-certificate\fR Disable checking of SSL certs
.PP
.SH "SEE ALSO"
loolwsd(1), coolforkit(1), coolconfig(1), loolforkit-systemplate-setup(1), loolwsd-generate-proof-key(1), loolmount(1)
loolwsd(1), coolforkit(1), coolconfig(1), loolforkit-systemplate-setup(1), loolwsd-generate-proof-key(1), coolmount(1)

View File

@ -6,4 +6,4 @@ loolwsd-generate-proof-key
.SH DESCRIPTION
loolwsd-generate-proof-key creates an RSA key pair in /etc/loolwsd for the WOPI Proof headers. The script is automatically run by the postinstall script of loolwsd package, but in case of failure sysadmins can run it manually.
.SH "SEE ALSO"
coolforkit(1), loolconvert(1), coolconfig(1), loolwsd(1), loolwsd-systemplate-setup(1), loolmount(1)
coolforkit(1), loolconvert(1), coolconfig(1), loolwsd(1), loolwsd-systemplate-setup(1), coolmount(1)

View File

@ -6,4 +6,4 @@ loolwsd-systemplate-setup <chroot template directory for system libs to create>
.SH DESCRIPTION
loolwsd-systemplate-setup creates a minimal system template for running the LibreOfficeKit in a chroot jail. The system template contains the bare minimum of system libraries to run LibreOfficeKit, and also fonts and locale data from the system.
.SH "SEE ALSO"
coolforkit(1), loolconvert(1), coolconfig(1), loolwsd(1), loolwsd-generate-proof-key(1), loolmount(1)
coolforkit(1), loolconvert(1), coolconfig(1), loolwsd(1), loolwsd-generate-proof-key(1), coolmount(1)

View File

@ -31,4 +31,4 @@ loolwsd OPTIONS
\fB\-\-nocaps\fR Use a non\-privileged forkit, with increase in security problems.
.PP
.SH "SEE ALSO"
coolforkit(1), loolconvert(1), coolconfig(1), loolwsd-systemplate-setup(1), loolwsd-generate-proof-key(1), loolmount(1)
coolforkit(1), loolconvert(1), coolconfig(1), loolwsd-systemplate-setup(1), loolwsd-generate-proof-key(1), coolmount(1)

View File

@ -139,7 +139,7 @@ void usage(const char* program)
int main(int argc, char** argv)
{
if (!hasCorrectUID(/* appName = */"loolmount"))
if (!hasCorrectUID(/* appName = */"coolmount"))
{
fprintf(stderr, "Aborting.\n");
return EX_SOFTWARE;