[systemd-commits] 7 commits - Makefile.am README src/bus-proxyd src/fsck src/tmpfiles
Zbigniew Jędrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Tue Mar 3 09:15:49 PST 2015
Makefile.am | 19 ++++++++++++++-----
README | 2 +-
src/bus-proxyd/bus-proxyd.c | 2 +-
src/fsck/fsck.c | 15 +++++----------
src/tmpfiles/tmpfiles.c | 36 ++++++++++++++++++++----------------
5 files changed, 41 insertions(+), 33 deletions(-)
New commits:
commit a6cccd8f580fc1e062dba3895e232007acd38781
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 3 09:00:39 2015 -0500
README: mention ACLs more
They are now useful for any fs used for journal storage.
diff --git a/README b/README
index c21b1c0..5222637 100644
--- a/README
+++ b/README
@@ -77,8 +77,8 @@ REQUIREMENTS:
Optional but strongly recommended:
CONFIG_IPV6
CONFIG_AUTOFS4_FS
- CONFIG_TMPFS_POSIX_ACL
CONFIG_TMPFS_XATTR
+ CONFIG_{TMPFS,EXT4,XFS,BTRFS_FS,...}_POSIX_ACL
CONFIG_SECCOMP
Required for CPUShares in resource control unit settings
commit dcf1369057231fbf09e37b5a48483763b4ae6e19
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 3 10:36:47 2015 -0500
Do not run sysv-generator-test when sysv compat is disabled
diff --git a/Makefile.am b/Makefile.am
index 0b2cbb5..782a7c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3940,9 +3940,14 @@ TESTS += \
if HAVE_PYTHON
TESTS += \
test/rule-syntax-check.py \
+ $(NULL)
+
+if HAVE_SYSV_COMPAT
+TESTS += \
test/sysv-generator-test.py \
$(NULL)
endif
+endif
manual_tests += \
test-libudev \
commit 2a17c0104492f7381cf4a52d1d5c5ae176ee9fe8
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Mar 2 21:39:55 2015 -0500
build-sys: add fsckd.h to sources
Otherwise distribution tarfiles are not generated properly.
diff --git a/Makefile.am b/Makefile.am
index 503a471..0b2cbb5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2364,6 +2364,7 @@ systemd_fsck_LDADD = \
# ------------------------------------------------------------------------------
systemd_fsckd_SOURCES = \
src/fsckd/fsckd.c \
+ src/fsckd/fsckd.h \
$(NULL)
systemd_fsckd_LDADD = \
commit ae5b2a86c2efdafd237a90b1e3766b78a8fd787b
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 3 00:21:10 2015 -0500
build-sys: systemd.conf is generated, do not distribute
diff --git a/Makefile.am b/Makefile.am
index 9d41a2c..503a471 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -145,6 +145,7 @@ dist_pkgdata_DATA =
dist_dbuspolicy_DATA =
dist_dbussystemservice_DATA =
dist_systemunit_DATA_busnames =
+dist_sysusers_DATA =
check_PROGRAMS =
check_DATA =
tests=
@@ -2214,10 +2215,10 @@ nodist_systemunit_DATA += \
units/systemd-tmpfiles-clean.service
nodist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
tmpfiles.d/etc.conf
dist_tmpfiles_DATA = \
- tmpfiles.d/systemd.conf \
tmpfiles.d/systemd-nologin.conf \
tmpfiles.d/tmp.conf \
tmpfiles.d/x11.conf \
@@ -2244,12 +2245,14 @@ INSTALL_DIRS += \
endif
EXTRA_DIST += \
+ tmpfiles.d/systemd.conf.m4 \
tmpfiles.d/etc.conf.m4 \
units/systemd-tmpfiles-setup-dev.service.in \
units/systemd-tmpfiles-setup.service.in \
units/systemd-tmpfiles-clean.service.in
CLEANFILES += \
+ tmpfiles.d/systemd.conf \
tmpfiles.d/etc.conf
# ------------------------------------------------------------------------------
@@ -2272,17 +2275,17 @@ nodist_systemunit_DATA += \
SYSINIT_TARGET_WANTS += \
systemd-sysusers.service
-dist_sysusers_DATA = \
- sysusers.d/systemd.conf
-
nodist_sysusers_DATA = \
+ sysusers.d/systemd.conf \
sysusers.d/basic.conf
EXTRA_DIST += \
units/systemd-sysusers.service.in \
+ sysusers.d/systemd.conf.m4 \
sysusers.d/basic.conf.in
CLEANFILES += \
+ sysusers.d/systemd.conf \
sysusers.d/basic.conf
INSTALL_DIRS += \
@@ -4817,7 +4820,7 @@ dist_bashcompletion_DATA += \
dist_zshcompletion_DATA += \
shell-completion/zsh/_coredumpctl
-sysctl_DATA = \
+nodist_sysctl_DATA = \
sysctl.d/50-coredump.conf
CLEANFILES += \
commit c29005212dc38d98c707639d1a82ffa5270f2e97
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 3 00:05:14 2015 -0500
bus-proxyd: avoid logging oom twice
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
index 9645c50..d612816 100644
--- a/src/bus-proxyd/bus-proxyd.c
+++ b/src/bus-proxyd/bus-proxyd.c
@@ -68,7 +68,7 @@ static int client_context_new(ClientContext **out) {
c = new0(ClientContext, 1);
if (!c)
- return log_oom();
+ return -ENOMEM;
c->fd = -1;
commit 576a13eaf6491fdbebc817ef613963ac24cfb6b8
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 3 00:02:31 2015 -0500
fsck: remove unnecessary check
gcc was complaining that progress_rc might be used uninitalized.
But it was actually always set, because the condition was always
satisfied. Remove the condition.
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index cf4d375..a4a15da 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -316,10 +316,8 @@ int main(int argc, char *argv[]) {
if (arg_force)
cmdline[i++] = "-f";
- if (progress_pipe[1] >= 0) {
- xsprintf(dash_c, "-C%i", progress_pipe[1]);
- cmdline[i++] = dash_c;
- }
+ xsprintf(dash_c, "-C%i", progress_pipe[1]);
+ cmdline[i++] = dash_c;
cmdline[i++] = device;
cmdline[i++] = NULL;
@@ -330,18 +328,15 @@ int main(int argc, char *argv[]) {
goto finish;
} else if (pid == 0) {
/* Child */
- if (progress_pipe[0] >= 0)
- safe_close(progress_pipe[0]);
+ safe_close(progress_pipe[0]);
execv(cmdline[0], (char**) cmdline);
_exit(8); /* Operational error */
}
progress_pipe[1] = safe_close(progress_pipe[1]);
- if (progress_pipe[0] >= 0) {
- progress_rc = process_progress(progress_pipe[0], pid, st.st_rdev);
- progress_pipe[0] = -1;
- }
+ progress_rc = process_progress(progress_pipe[0], pid, st.st_rdev);
+ progress_pipe[0] = -1;
q = wait_for_terminate(pid, &status);
if (q < 0) {
commit d873e8778c92014c02a9122852758b436fa95c0e
Author: Hans-Peter Deifel <hpd at hpdeifel.de>
Date: Tue Mar 3 00:35:08 2015 +0100
tmpfiles: quietly ignore ACLs on unsupported filesystems
A warning is printed if ACLs cannot be retrieved for any reason other
than -ENOSYS. For -ENOSYS, debug log is printed.
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 2642934..917bb3c 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -700,6 +700,9 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
int r;
_cleanup_(acl_free_charpp) char *t = NULL;
+ /* Returns 0 for success, positive error if already warned,
+ * negative error otherwise. */
+
if (modify) {
r = acls_for_file(path, type, acl, &dup);
if (r < 0)
@@ -727,35 +730,36 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
r = acl_set_file(path, type, dup);
if (r < 0)
- return log_error_errno(-errno,
- "Setting %s ACL \"%s\" on %s failed: %m",
- type == ACL_TYPE_ACCESS ? "access" : "default",
- strna(t), path);
+ return -log_error_errno(errno,
+ "Setting %s ACL \"%s\" on %s failed: %m",
+ type == ACL_TYPE_ACCESS ? "access" : "default",
+ strna(t), path);
+
return 0;
}
#endif
static int path_set_acls(Item *item, const char *path) {
+ int r = 0;
#ifdef HAVE_ACL
- int r;
-
assert(item);
assert(path);
- if (item->acl_access) {
+ if (item->acl_access)
r = path_set_acl(path, ACL_TYPE_ACCESS, item->acl_access, item->force);
- if (r < 0)
- return r;
- }
- if (item->acl_default) {
+ if (r == 0 && item->acl_default)
r = path_set_acl(path, ACL_TYPE_DEFAULT, item->acl_default, item->force);
- if (r < 0)
- return r;
- }
-#endif
- return 0;
+ if (r > 0)
+ return -r; /* already warned */
+ else if (r == -ENOTSUP) {
+ log_debug_errno(r, "ACLs not supported by file system at %s", path);
+ return 0;
+ } else if (r < 0)
+ log_error_errno(r, "ACL operation on \"%s\" failed: %m", path);
+#endif
+ return r;
}
static int write_one_file(Item *i, const char *path) {
More information about the systemd-commits
mailing list