]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #2276 from poettering/dnssec12
authorTom Gundersen <teg@jklm.no>
Thu, 7 Jan 2016 14:05:58 +0000 (15:05 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 7 Jan 2016 14:05:58 +0000 (15:05 +0100)
Twelfth DNSSEC PR

Makefile.am
hwdb/60-keyboard.hwdb
src/libsystemd/sd-bus/test-bus-cleanup.c
src/nspawn/nspawn-setuid.c
src/shared/generator.c
src/test/test-rlimit-util.c
test/TEST-04-JOURNAL/test-journal.sh
test/TEST-04-JOURNAL/test.sh

index 3c5506249d0f5e5b3fa3c2ff1964ca36348a82fa..c5b15b884a272ed1acbbd4ddc99fc7319dd570fd 100644 (file)
@@ -6287,10 +6287,10 @@ install-tree: all
        tree $(abs_srcdir)/install-tree
 
 # Let's run all tests of the test suite, but under valgrind. Let's
-# exclude the one perl script we have in there
+# exclude perl/python/shell scripts we have in there
 .PHONY: valgrind-tests
 valgrind-tests: $(TESTS)
-       $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
+       $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
                if file $$f | grep -q shell; then \
                echo -e "$${x}Skipping non-binary $$f"; else \
                echo -e "$${x}Running $$f"; \
index 94906abcbfe6788d5696227543f2b870f66c254f..69a1e8fa37813c6e4f8b4dce51abfd24d21fa8b1 100644 (file)
@@ -652,6 +652,11 @@ evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:pvr*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*Lenovo*V480*:pvr*
  KEYBOARD_KEY_f1=f21
 
+# Lenovo Thinkcentre M800z AIO machine
+# key_scancode 00 is KEY_MICMUTE
+keyboard:name:Microphone Mute Button:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
+ KEYBOARD_KEY_00=f20
+
 # enhanced USB keyboard
 evdev:input:b0003v04B3p301B*
  KEYBOARD_KEY_90001=prog1 # ThinkVantage
index 1c3ccda3648724c86df623b8fdfabda65782bbd6..cbc450fdb22ea36530143557a5064f323f75e1d1 100644 (file)
@@ -36,7 +36,7 @@ static void test_bus_new(void) {
 }
 
 static int test_bus_open(void) {
-        _cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
+        _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
         int r;
 
         r = sd_bus_open_system(&bus);
@@ -59,8 +59,8 @@ static void test_bus_new_method_call(void) {
 
         printf("after message_new_method_call: refcount %u\n", REFCNT_GET(bus->n_ref));
 
-        sd_bus_unref(bus);
-        printf("after bus_unref: refcount %u\n", m->n_ref);
+        sd_bus_flush_close_unref(bus);
+        printf("after bus_flush_close_unref: refcount %u\n", m->n_ref);
 }
 
 static void test_bus_new_signal(void) {
@@ -73,8 +73,8 @@ static void test_bus_new_signal(void) {
 
         printf("after message_new_signal: refcount %u\n", REFCNT_GET(bus->n_ref));
 
-        sd_bus_unref(bus);
-        printf("after bus_unref: refcount %u\n", m->n_ref);
+        sd_bus_flush_close_unref(bus);
+        printf("after bus_flush_close_unref: refcount %u\n", m->n_ref);
 }
 
 int main(int argc, char **argv) {
index aa6a16309c988d416c7610c9678dc09a114ac7af..014a40b24314915d4cf090ade26dd2b88c9ee871 100644 (file)
@@ -261,10 +261,10 @@ int change_uid_gid(const char *user, char **_home) {
                 return log_error_errno(errno, "Failed to set auxiliary groups: %m");
 
         if (setresgid(gid, gid, gid) < 0)
-                return log_error_errno(errno, "setregid() failed: %m");
+                return log_error_errno(errno, "setresgid() failed: %m");
 
         if (setresuid(uid, uid, uid) < 0)
-                return log_error_errno(errno, "setreuid() failed: %m");
+                return log_error_errno(errno, "setresuid() failed: %m");
 
         if (_home) {
                 *_home = home;
index 37de3f7cb1847e7fa3424bfbfb8b706911fe505b..76808cbdd51c05e0ae95bc029594bb3a1978efca 100644 (file)
@@ -190,7 +190,6 @@ int generator_write_timeouts(
 
         return write_drop_in_format(dir, unit, 50, "device-timeout",
                                     "# Automatically generated by %s\n\n"
-                                    "[Unit]\nJobTimeoutSec=" USEC_FMT,
-                                    program_invocation_short_name,
-                                    u / USEC_PER_SEC);
+                                    "[Unit]\nJobTimeoutSec=%s",
+                                    program_invocation_short_name, timeout);
 }
index 00d3ecc0de7c94f48da73bd2dc220a87ff956e1a..24bfe7a60e1fcde715f34d073abbe39045bec7d5 100644 (file)
@@ -37,7 +37,7 @@ int main(int argc, char *argv[]) {
 
         assert_se(getrlimit(RLIMIT_NOFILE, &old) == 0);
         new.rlim_cur = MIN(5U, old.rlim_max);
-        new.rlim_max = MIN(10U, old.rlim_max);
+        new.rlim_max = old.rlim_max;
         assert_se(setrlimit(RLIMIT_NOFILE, &new) >= 0);
 
         assert_se(rlimit_from_string("LimitNOFILE") == RLIMIT_NOFILE);
@@ -53,7 +53,7 @@ int main(int argc, char *argv[]) {
         assert_se(old.rlim_max == new.rlim_max);
 
         assert_se(getrlimit(RLIMIT_NOFILE, &old) == 0);
-        high = RLIMIT_MAKE_CONST(old.rlim_max + 1);
+        high = RLIMIT_MAKE_CONST(old.rlim_max == RLIM_INFINITY ? old.rlim_max : old.rlim_max + 1);
         assert_se(setrlimit_closest(RLIMIT_NOFILE, &high) == 0);
         assert_se(getrlimit(RLIMIT_NOFILE, &new) == 0);
         assert_se(new.rlim_max == old.rlim_max);
index 1ee39df432d89c22075b0c41d3c73e2d2c64b610..3a05619ad5cbe42dc72a04f7b27e169bcd6e5fad 100755 (executable)
@@ -51,5 +51,13 @@ journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output
 
+# Don't lose streams on restart
+systemctl start forever-print-hola
+sleep 3
+systemctl restart systemd-journald
+sleep 3
+systemctl stop forever-print-hola
+[[ ! -f "/i-lose-my-logs" ]]
+
 touch /testok
 exit 0
index 6c5b5cf34eecda2817a067d0710733267822569b..1a14f76060d268ec65dc503b81f7f45cfb7687b1 100755 (executable)
@@ -55,6 +55,15 @@ After=multi-user.target
 [Service]
 ExecStart=/test-journal.sh
 Type=oneshot
+EOF
+
+        cat >$initdir/etc/systemd/system/forever-print-hola.service <<EOF
+[Unit]
+Description=ForeverPrintHola service
+
+[Service]
+Type=simple
+ExecStart=/bin/sh -x -c 'while :; do printf "Hola\n" || touch /i-lose-my-logs; sleep 1; done'
 EOF
 
         cp test-journal.sh $initdir/