[PATCH] travis: Update to GCC 8
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
Travis latest Ubuntu images come with GCC 5.0.4, which fail to compile
with:
cc: error: unrecognized command line option ‘-fstack-clash-protection’
Using GCC 8 from ubuntu-toolchain-r-test fixes this issue.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
.travis.yml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 675768d..8cc2859 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,23 @@
dist: xenial
language: python
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-8
+
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y make gcc libaio-dev libblkid-dev
+env:
+ - CC="gcc-8"
+
script:
- make -C wdmd
- make -C src
- make -C python inplace
- source tests/env.sh
- pytest
--
2.17.2
4 years, 11 months
[sanlock] branch master updated: Current Trusty based environment
fail to complile with:
by git repository hosting
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
The following commit(s) were added to refs/heads/master by this push:
new 3283330 Current Trusty based environment fail to complile with:
3283330 is described below
commit 3283330e99b9947b40232dd30044f4c72ff5be05
Author: Nir Soffer <nsoffer(a)redhat.com>
AuthorDate: Fri Dec 14 09:55:21 2018 -0600
Current Trusty based environment fail to complile with:
cc: error: unrecognized command line option ‘-fstack-protector-strong’
cc: error: unrecognized command line option ‘-fstack-clash-protection’
Upgrading to Xenial fix the first issue. I guess we need to check
availability of the second flag, or switch to build inside a container.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 9668e82..675768d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
+dist: xenial
language: python
before_install:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 12 months
[PATCH] travis: Update to Xenial environment
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
Current Trusty based environment fail to complile with:
cc: error: unrecognized command line option ‘-fstack-protector-strong’
cc: error: unrecognized command line option ‘-fstack-clash-protection’
Upgrading to Xenial fix the first issue. I guess we need to check
availability of the second flag, or switch to build inside a container.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 9668e82..675768d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,13 @@
+dist: xenial
language: python
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y make gcc libaio-dev libblkid-dev
script:
- make -C wdmd
- make -C src
- make -C python inplace
- source tests/env.sh
- pytest
--
2.17.2
4 years, 12 months
[sanlock] branch master updated: lockfile: Keep lockfile owned by
root
by git repository hosting
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
The following commit(s) were added to refs/heads/master by this push:
new af09f3d lockfile: Keep lockfile owned by root
af09f3d is described below
commit af09f3d9a5a8c2cfcd364f3b3e26333f3472d825
Author: Nir Soffer <nsoffer(a)redhat.com>
AuthorDate: Fri Nov 30 00:03:19 2018 +0200
lockfile: Keep lockfile owned by root
On Fedora 28, sanlock fails to create the lockfile before dropping
privileges, because /run/sanlock is owned by sanlock, and selinux
disables DAC_OVERRIDE.
To allow root to create the lockfile before dropping privileges
/run/sanlock is owned by group root, and group writable. Since sanlock
never write to the lockfile after dropping privileges, keep the lockfile
owned by root.
Here are /run/sanlock permissions with this change:
$ ls -lhdZ /run/sanlock
drwxrwxr-x. 2 sanlock root system_u:object_r:sanlock_var_run_t:s0 80 Nov 29 23:07 /run/sanlock
$ ls -lhZ /run/sanlock
total 4.0K
-rw-r--r--. 1 root root system_u:object_r:sanlock_var_run_t:s0 5 Nov 29 23:07 sanlock.pid
srw-rw----. 1 sanlock sanlock system_u:object_r:sanlock_var_run_t:s0 0 Nov 29 23:07 sanlock.sock
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
src/lockfile.c | 12 ++++--------
src/main.c | 6 +++++-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/lockfile.c b/src/lockfile.c
index 5a2518e..cffaaff 100644
--- a/src/lockfile.c
+++ b/src/lockfile.c
@@ -36,7 +36,10 @@ int lockfile(const char *dir, const char *name, int uid, int gid)
mode_t old_umask;
int fd, rv;
- old_umask = umask(0022);
+ /* Make rundir group writable, allowing creation of the lockfile when
+ * starting as root. */
+
+ old_umask = umask(0002);
rv = mkdir(dir, 0775);
if (rv < 0 && errno != EEXIST) {
umask(old_umask);
@@ -89,13 +92,6 @@ int lockfile(const char *dir, const char *name, int uid, int gid)
goto fail;
}
- rv = fchown(fd, uid, gid);
- if (rv < 0) {
- log_error("lockfile fchown error %s: %s",
- path, strerror(errno));
- goto fail;
- }
-
return fd;
fail:
close(fd);
diff --git a/src/main.c b/src/main.c
index b3898e2..9538cc5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1682,8 +1682,12 @@ static int do_daemon(void)
if (!privileged)
log_warn("Running in unprivileged mode");
+ /* If we run as root, make run_dir owned by root, so we can create the
+ * lockfile when selinux disables DAC_OVERRIDE.
+ * See https://danwalsh.livejournal.com/79643.html */
- fd = lockfile(run_dir, SANLK_LOCKFILE_NAME, com.uid, com.gid);
+ fd = lockfile(run_dir, SANLK_LOCKFILE_NAME, com.uid,
+ privileged ? 0 : com.gid);
if (fd < 0) {
close_logging();
return fd;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years