silence various of these in tests and utilities
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4fcc95b1b5d5c95e5ac40782550f95c08a3467bd
tools/Config.cpp: In member function 'virtual int Config::main(const std::vector<std::basic_string<char> >&)':
tools/Config.cpp:480:18: error: ignoring return value of 'int chown(const char*, __uid_t, __gid_t)' declared with attribute 'warn_unused_result' [-Werror=unused-result]
480 | chown(proofKeyPath.c_str(), pwd->pw_uid, -1);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From fc946198d3
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: Iaa4db6fb4dc6f742779754d4e05708aa8f41ebd6
* simplified the tooling a bit: use coolconfig for creating
RSA key pairs for WOPI Proof headers.
* got rid of a dependency: ssh-keygen, towards leaner docker images
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iaf468b5c8585d45027f512bb0a287ab77afb1ea9
We now warn when we fail to use mknod
to create the random devices and have
stricter requirements to mounting
character-devices. Specifically,
we explicitly only allow mounting
the random devices.
Change-Id: Ib0dc300dedc40942ea52426af2b267f6a81fbeb8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This was a regression introduced in
14d96957cd.
The result was that multi-part logs were
not flushed and therefore not written to
the output.
Change-Id: Ib22a1da83209b00872d91ca05a940226cbb4552d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We need to flush and shutdown logging before exiting,
so we can't use _exit/_Exit directly.
In addition, with profiling (e.g. code-coverage) we
must flush the profile data, lest it's all for naught.
Change-Id: I726c5a2f4e699c17dd0d7d5b1c86d856e0118b3c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Count data sent as well as received, re-factor, and measure B/W
usage too.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I5d00f0568c774cc03d2b8e4f730bfe4a8fb5b06f
In an attempt to reduce the size of Util.{c,h}pp
which has grown to contain all sorts of unrelated
helpers, we move StringVector helpers into
the StringVector.{c,h}pp files.
This makes the code better organized.
Change-Id: I152f341606807ae66253415b951bc9f89b09df57
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Use it to create /dev/{u}random devices instead of calling mknod().
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I6ae7842c89255f3f43a8ac7f082a275d5496690a
'sscanf' may overflow; destination buffer in 'smap_key' has size 20, but
the corresponding specifier in tools/map.cpp:570 may require size 21.
Change-Id: Ie7356db924193777869a39b882512a864c0e10c5
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
- new method for migrating "host" entries:
only done if there are new entries in the old config,
and then replace the list in the new config with the old one
- other small changes, eg.
don't migrate special default values if they match target value
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: Idf43db4068c163077109825486855a259666181c
The vector is allocated on the stack in a for loop, so it's not valid to
refer to its address in the lambda that is executed on a thread. Rather
copy it.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ie1f85d6efb27a4aa44b181f8d9f134e9fa41d508
On FreeBSD the mounting operations are allowed to be performed only by root
by default. When `loolwsd --cleanup` is called during normal compilation process,
it tries to unmount "jails" directory and spits EPERM-related errors.
Fix this by checking if the directory being unmounted is actually mounted and
return EINVAL in this case, just like Linux unmount2() does.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I0f72d265e33fb1e6129332bfa8e17e7d888d30b5
SteamSocket::eraseFirstInputBytes() removes from the beginning
of std::vector, which is generally slow. If the buffer becomes
too big, which it may under a load, then the function will get
slow, which in turn will likely lead to the buffer getting even
bigger because of accumulated backlog.
The Buffer class is optimized for removal at the beginning,
so use it instead of std::vector, including some API additions
for it to be an in-place replacement where it's used.
Signed-off-by: Luboš Luňák <l.lunak@collabora.com>
Change-Id: I4cf7ec56c908c7d3df391dc3f8e230ad32abb162