From 9a66640832d103f906c2ef609a1d19d43fc542f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Fri, 27 May 2011 08:24:22 +0300 Subject: [PATCH 01/20] exec: Fix number of unit types There are four unit types mentioned in here, not three --- man/systemd.exec.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index de1d9bf44..7b4f7e39c 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -57,13 +57,13 @@ Description - Unit configuration files for services, sockets + Unit configuration files for services, sockets, mount points and swap devices share a subset of configuration options which define the execution environment of spawned processes. This man page lists the configuration options - shared by these three unit types. See + shared by these four unit types. See systemd.unit5 for the common options of all unit configuration files, and From 78e39b43b89c6bf9ce401d6030939a004a23c850 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Sun, 5 Jun 2011 17:22:37 +0200 Subject: [PATCH 02/20] systemctl: fix double unref of a dbus message --- src/systemctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemctl.c b/src/systemctl.c index 99ada3830..a82cce4ae 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -1565,6 +1565,7 @@ static int check_unit(DBusConnection *bus, char **args, unsigned n) { dbus_error_free(&error); dbus_message_unref(m); + m = NULL; continue; } From aae5220d961a419a1e160de90ee5c393c7c13607 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 6 Jun 2011 22:59:19 +0200 Subject: [PATCH 03/20] cryptsetup-generator: fix /etc/cryptsetup options cryptsetup-generator parses the options in /etc/cryptsetup incorrectly. It fails to find the 'swap' option in swap,foo and instead it matches on swaplalala,foo The condition for the comma separator is reversed. https://bugzilla.redhat.com/show_bug.cgi?id=710839 --- src/cryptsetup-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c index 696f44ae3..db8ebdfb1 100644 --- a/src/cryptsetup-generator.c +++ b/src/cryptsetup-generator.c @@ -47,7 +47,7 @@ static bool has_option(const char *haystack, const char *needle) { continue; } - if (f[l] != 0 && f[l] == ',') { + if (f[l] != 0 && f[l] != ',') { f++; continue; } From ef9d7dca5463e64510e174d55a869b4d5a3c4e84 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Tue, 7 Jun 2011 00:48:16 +0200 Subject: [PATCH 04/20] selinux: selinuxfs can be mounted on /sys/fs/selinux The kernel now provides the /sys/fs/selinux mountpoint and libselinux prefers it if it's available. systemd currently tests only for /selinux and this leads to an infinite loop of policy reloads in the latest Rawhide. Fix it by checking both possible mountpoints. Also add the new path to ignore_paths[]. /selinux appears also in nspawn.c. I don't think it's necessary to change it there at this point. https://bugzilla.redhat.com/show_bug.cgi?id=711015 --- src/mount-setup.c | 1 + src/selinux-setup.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mount-setup.c b/src/mount-setup.c index 48c32eab3..6feee6aa1 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -63,6 +63,7 @@ static const MountPoint mount_table[] = { * we just list them here so that we know that we should ignore them */ static const char * const ignore_paths[] = { + "/sys/fs/selinux", "/selinux", "/proc/bus/usb" }; diff --git a/src/selinux-setup.c b/src/selinux-setup.c index c32c7ad8d..9ff27dcd7 100644 --- a/src/selinux-setup.c +++ b/src/selinux-setup.c @@ -39,7 +39,8 @@ int selinux_setup(char *const argv[]) { int enforce = 0; /* Already initialized? */ - if (path_is_mount_point("/selinux") > 0) + if (path_is_mount_point("/sys/fs/selinux") > 0 || + path_is_mount_point("/selinux") > 0) return 0; /* Before we load the policy we create a flag file to ensure From dc725264f34f3a81eb47b7472f4484f849e0461d Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Wed, 8 Jun 2011 17:34:22 +0200 Subject: [PATCH 05/20] enable chkconfig support in systemctl for openSUSE --- src/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemctl.c b/src/systemctl.c index a82cce4ae..faca79756 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4089,7 +4089,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo } if (!f) { -#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT) +#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT) if (endswith(i->name, ".service")) { char *sysv; From 597b99b09a007dfa8ddfce31c480765b0c7baa6a Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 10 Jun 2011 14:37:21 +0200 Subject: [PATCH 06/20] readahead-common: fix total memory size detection sysinfo returns the total memory size in multiples of mem_unit bytes. As long as the size in bytes fits into unsigned long, the kernel uses mem_unit = 1, but this is not true on i386 with more than 4 GB RAM. https://bugzilla.redhat.com/show_bug.cgi?id=712341 --- src/readahead-common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/readahead-common.c b/src/readahead-common.c index 8a75b2e13..f0d57b4c6 100644 --- a/src/readahead-common.c +++ b/src/readahead-common.c @@ -154,9 +154,8 @@ bool enough_ram(void) { assert_se(sysinfo(&si) >= 0); - return si.totalram > 127 * 1024*1024; /* Enable readahead only - * with at least 128MB - * memory */ + /* Enable readahead only with at least 128MB memory */ + return si.totalram > 127 * 1024*1024 / si.mem_unit; } int open_inotify(void) { From fbe092cc70bd90af5fc2d746935b51f31a4cc629 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 14 Jun 2011 14:15:40 +0200 Subject: [PATCH 07/20] mount /run without MS_NOEXEC --- src/mount-setup.c | 2 +- src/nspawn.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mount-setup.c b/src/mount-setup.c index 6feee6aa1..f236ab741 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -54,7 +54,7 @@ static const MountPoint mount_table[] = { { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID, true }, { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV, true }, { "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, false }, - { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV, true }, + { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV, true }, { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV, false }, { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, false }, }; diff --git a/src/nspawn.c b/src/nspawn.c index 969c96189..b5908d63f 100644 --- a/src/nspawn.c +++ b/src/nspawn.c @@ -117,7 +117,7 @@ static int mount_all(const char *dest) { { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_RDONLY, true }, { "tmpfs", "/dev", "tmpfs", "mode=755", MS_NOSUID, true }, { "/dev/pts", "/dev/pts", "bind", NULL, MS_BIND, true }, - { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV, true }, + { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV, true }, #ifdef HAVE_SELINUX { "selinux", "/selinux", "selinuxfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_RDONLY, false }, #endif From 54763e12662d465a038c424ea7baf565cca7be76 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 11 Jun 2011 15:55:11 +0200 Subject: [PATCH 08/20] remote-fs.target: do not order after network.target remote-fs.target is ordered after the {auto,}mount units. In case of automount we do not want to wait for the network to come up before proceeding. In case of a regular mount unit, the unit will be ordered after network.target so the behavior is unchanged. This speeds up boot quite a bit for me when having some services needing NetworkManager-wait-online.service, and having my home partition on nfs under an automountpoint. --- units/.gitignore | 1 - units/{remote-fs.target.m4 => remote-fs.target} | 5 ----- 2 files changed, 6 deletions(-) rename units/{remote-fs.target.m4 => remote-fs.target} (77%) diff --git a/units/.gitignore b/units/.gitignore index fe23b1226..f969466bd 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -31,7 +31,6 @@ systemd-random-seed-save.service systemd-initctl.service systemd-logger.service getty@.service -remote-fs.target systemd-update-utmp-runlevel.service systemd-update-utmp-shutdown.service test-env-replace diff --git a/units/remote-fs.target.m4 b/units/remote-fs.target similarity index 77% rename from units/remote-fs.target.m4 rename to units/remote-fs.target index 53054b6ec..a48f87e5d 100644 --- a/units/remote-fs.target.m4 +++ b/units/remote-fs.target @@ -9,11 +9,6 @@ [Unit] Description=Remote File Systems -m4_dnl -m4_ifdef(`FOR_SYSTEM', -m4_dnl When running in system mode we need the network up -After=network.target -)m4_dnl [Install] WantedBy=multi-user.target From b77398f7a05aa313cebcea81e9381833bede2d61 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 13 Jun 2011 14:19:47 +0200 Subject: [PATCH 09/20] systemctl: fix 'is-enabled' for native units under /lib The units always showed up as enabled. The config file has to be parsed before we can check what's in the [Install] section. https://bugzilla.redhat.com/show_bug.cgi?id=699027 --- src/systemctl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/systemctl.c b/src/systemctl.c index faca79756..889e3ee06 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4160,6 +4160,13 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo return -ENOENT; } + i->path = filename; + + if ((r = config_parse(filename, f, NULL, items, true, i)) < 0) { + fclose(f); + return r; + } + /* Consider unit files stored in /lib and /usr always enabled * if they have no [Install] data. */ if (streq(verb, "is-enabled") && @@ -4168,13 +4175,6 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo !path_startswith(filename, "/etc")) return 1; - i->path = filename; - - if ((r = config_parse(filename, f, NULL, items, true, i)) < 0) { - fclose(f); - return r; - } - n_symlinks += strv_length(i->aliases); n_symlinks += strv_length(i->wanted_by); From b647f10da7c7e737ad8f5193cb1ca5dc3c2b5d45 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 13 Jun 2011 14:19:53 +0200 Subject: [PATCH 10/20] systemctl: fix a FILE* leak In practice it does not really matter, but let's be nice and close the file. --- src/systemctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/systemctl.c b/src/systemctl.c index 889e3ee06..2bd173c5d 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4172,8 +4172,10 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo if (streq(verb, "is-enabled") && strv_isempty(i->aliases) && strv_isempty(i->wanted_by) && - !path_startswith(filename, "/etc")) + !path_startswith(filename, "/etc")) { + fclose(f); return 1; + } n_symlinks += strv_length(i->aliases); n_symlinks += strv_length(i->wanted_by); From 5552b1c1b39cc73fe7201b31e79d1a05c3d0cee0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Jun 2011 22:01:44 +0200 Subject: [PATCH 11/20] build-sys: fix build --- Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index ee16f9800..ded325a57 100644 --- a/Makefile.am +++ b/Makefile.am @@ -244,6 +244,7 @@ dist_systemunit_DATA = \ units/halt.target \ units/kexec.target \ units/local-fs.target \ + units/remote-fs.target \ units/cryptsetup.target \ units/network.target \ units/nss-lookup.target \ @@ -301,7 +302,6 @@ nodist_systemunit_DATA = \ units/getty@.service \ units/serial-getty@.service \ units/console-shell.service \ - units/remote-fs.target \ units/systemd-initctl.service \ units/systemd-logger.service \ units/systemd-shutdownd.service \ @@ -349,7 +349,6 @@ EXTRA_DIST = \ units/getty@.service.m4 \ units/serial-getty@.service.m4 \ units/console-shell.service.m4 \ - units/remote-fs.target.m4 \ units/rescue.service.m4 \ units/systemd-initctl.service.in \ units/systemd-logger.service.in \ From 7c3d67eff3e165b50084bf9c3269ec582d90c403 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Jun 2011 10:16:49 +0200 Subject: [PATCH 12/20] dbus: fix name of capability property --- src/dbus-execute.c | 2 +- src/dbus-execute.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbus-execute.c b/src/dbus-execute.c index 3f8fafe6c..6ceffc57a 100644 --- a/src/dbus-execute.c +++ b/src/dbus-execute.c @@ -235,7 +235,7 @@ int bus_execute_append_capability_bs(DBusMessageIter *i, const char *property, v assert(property); assert(c); - /* We store this negated internally, to match the kernel, bu + /* We store this negated internally, to match the kernel, but * we expose it normalized. */ normal = *(uint64_t*) data; diff --git a/src/dbus-execute.h b/src/dbus-execute.h index 42df5aa33..56c5bcd4f 100644 --- a/src/dbus-execute.h +++ b/src/dbus-execute.h @@ -77,7 +77,7 @@ " \n" \ " \n" \ " \n" \ - " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ From 1365b53ff9a53c94c88bbf4ec5e5782edb75e663 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 23 May 2011 21:37:45 +0200 Subject: [PATCH 13/20] execute: fix function prototype --- src/execute.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/execute.h b/src/execute.h index 4ed79f0d8..55bae24a2 100644 --- a/src/execute.h +++ b/src/execute.h @@ -211,10 +211,10 @@ void exec_status_exit(ExecStatus *s, ExecContext *context, pid_t pid, int code, void exec_status_dump(ExecStatus *s, FILE *f, const char *prefix); const char* exec_output_to_string(ExecOutput i); -int exec_output_from_string(const char *s); +ExecOutput exec_output_from_string(const char *s); const char* exec_input_to_string(ExecInput i); -int exec_input_from_string(const char *s); +ExecInput exec_input_from_string(const char *s); const char *kill_mode_to_string(KillMode k); KillMode kill_mode_from_string(const char *s); From 835c60f50c861bce2c4bbcd35d51307a5443b5cf Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Jun 2011 15:54:50 +0200 Subject: [PATCH 14/20] build-sys: local-fs, remote-fs and swap are active anyway when user sessions are created, there is no point in having these units known in sessions --- Makefile.am | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index ded325a57..7ca0ae858 100644 --- a/Makefile.am +++ b/Makefile.am @@ -342,7 +342,6 @@ dist_userunit_DATA = \ units/user/exit.target nodist_userunit_DATA = \ - units/user/remote-fs.target \ units/user/exit.service EXTRA_DIST = \ @@ -1387,11 +1386,9 @@ endif $(LN_S) ../var-run.mount var-run.mount && \ $(LN_S) ../media.mount media.mount ) ( cd $(DESTDIR)$(userunitdir) && \ - rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target sound.target && \ + rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \ $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \ $(LN_S) $(systemunitdir)/sockets.target sockets.target && \ - $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \ - $(LN_S) $(systemunitdir)/swap.target swap.target && \ $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \ $(LN_S) $(systemunitdir)/printer.target printer.target && \ $(LN_S) $(systemunitdir)/sound.target sound.target ) From d9eaa2d538c63bb3adfec82fb65eab4e1979c7b9 Mon Sep 17 00:00:00 2001 From: Alexey Shabalin Date: Fri, 10 Jun 2011 21:30:15 +0400 Subject: [PATCH 15/20] systemctl: enable chkconfig support in systemctl for ALTLinux --- src/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemctl.c b/src/systemctl.c index 2bd173c5d..5a0055bdf 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4089,7 +4089,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo } if (!f) { -#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT) +#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX)) && defined (HAVE_SYSV_COMPAT) if (endswith(i->name, ".service")) { char *sysv; From 23b2a3300c11535022f3f54b4e0bd37153c129ba Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 15 Jun 2011 20:13:54 +0200 Subject: [PATCH 16/20] systemctl: plug a leak upon create_symlink mismatch --- src/systemctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemctl.c b/src/systemctl.c index 5a0055bdf..08c7fabb7 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -3963,6 +3963,7 @@ static int create_symlink(const char *verb, const char *old_path, const char *ne return 1; } + free(dest); return 0; } From f9f0c31ae58250341636c3be9aa439c77c26fcc1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Jun 2011 21:09:04 +0200 Subject: [PATCH 17/20] man: clarify os-release in regards to spaces a bit --- TODO | 2 ++ man/os-release.xml | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 7e0c72517..5d813a6cd 100644 --- a/TODO +++ b/TODO @@ -50,6 +50,8 @@ Features: * add prefix match to sysctl, tmpfiles, ... +* send out "finished" signal when we are finished booting + * drop /.readahead on bigger upgrades with yum * add inode stat() check to readahead to suppress preloading changed files diff --git a/man/os-release.xml b/man/os-release.xml index d8a45b303..f85119d26 100644 --- a/man/os-release.xml +++ b/man/os-release.xml @@ -116,10 +116,12 @@ ID= A lower-case string - identifying the operating system, - excluding any version information and - suitable for processing by scripts. If - not set defaults to + (no spaces) identifying the operating + system, excluding any version + information and suitable for + processing by scripts or usage in + generated file names. If not set + defaults to linux. Example: ID=fedora. @@ -128,10 +130,10 @@ VERSION_ID= A lower-case string - (mostly numeric) identifying the + (mostly numeric, no spaces) identifying the operating system version, excluding any name information and suitable for - processing by scripts. Example: + processing by scripts or usage in generated file names. Example: VERSION_ID=15. From 0e318cad06d483624076777c105bdcdd6aca3596 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 27 May 2011 01:29:34 +0200 Subject: [PATCH 18/20] pam-module: add debug= parameter It is customary that pam modules do not log debugging information by default. Usually they offer a 'debug' option. Add a boolean debug= option to pam_systemd.so. This will solve bug https://bugzilla.redhat.com/show_bug.cgi?id=705427 Commit 53d5582fa006b0eb528f5dc3f4ba978abd8ac5a3 was not sufficient to fix it, because in Fedora rsyslog is configured to write even LOG_DEBUG messages to /var/log/secure by default. --- man/pam_systemd.xml | 8 ++++++++ src/pam-module.c | 27 +++++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml index 11852eb02..208c7da1c 100644 --- a/man/pam_systemd.xml +++ b/man/pam_systemd.xml @@ -273,6 +273,14 @@ be reset for the processes of the logged in user. + + + + + Takes a boolean + argument. If true, logs debugging + information. + Note that setting kill-user=1 diff --git a/src/pam-module.c b/src/pam-module.c index 03864fed3..bdf61334e 100644 --- a/src/pam-module.c +++ b/src/pam-module.c @@ -46,7 +46,8 @@ static int parse_argv(pam_handle_t *handle, char ***controllers, char ***reset_controllers, char ***kill_only_users, - char ***kill_exclude_users) { + char ***kill_exclude_users, + bool *debug) { unsigned i; bool reset_controller_set = false; @@ -145,6 +146,15 @@ static int parse_argv(pam_handle_t *handle, kill_exclude_users_set = true; + } else if (startswith(argv[i], "debug=")) { + if ((k = parse_boolean(argv[i] + 6)) < 0) { + pam_syslog(handle, LOG_ERR, "Failed to parse debug= argument."); + return k; + } + + if (debug) + *debug = k; + } else { pam_syslog(handle, LOG_ERR, "Unknown parameter '%s'.", argv[i]); return -EINVAL; @@ -406,6 +416,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( char *buf = NULL; int lock_fd = -1; bool create_session = true; + bool debug = false; char **controllers = NULL, **reset_controllers = NULL, **c; char *cgroup_user_tree = NULL; @@ -421,7 +432,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( argc, argv, &create_session, NULL, NULL, &controllers, &reset_controllers, - NULL, NULL) < 0) + NULL, NULL, &debug) < 0) return PAM_SESSION_ERR; if ((r = get_user_data(handle, &username, &pw)) != PAM_SUCCESS) @@ -505,7 +516,8 @@ _public_ PAM_EXTERN int pam_sm_open_session( goto finish; } - pam_syslog(handle, LOG_DEBUG, "Moving new user session for %s into control group %s.", username, buf); + if (debug) + pam_syslog(handle, LOG_DEBUG, "Moving new user session for %s into control group %s.", username, buf); if ((r = create_user_group(handle, SYSTEMD_CGROUP_CONTROLLER, buf, pw, true, true)) != PAM_SUCCESS) goto finish; @@ -616,6 +628,7 @@ _public_ PAM_EXTERN int pam_sm_close_session( const char *username = NULL; bool kill_session = false; bool kill_user = false; + bool debug = false; int lock_fd = -1, r; char *session_path = NULL, *nosession_path = NULL, *user_path = NULL; const char *id; @@ -634,7 +647,7 @@ _public_ PAM_EXTERN int pam_sm_close_session( argc, argv, NULL, &kill_session, &kill_user, &controllers, NULL, - &kill_only_users, &kill_exclude_users) < 0) + &kill_only_users, &kill_exclude_users, &debug) < 0) return PAM_SESSION_ERR; if ((r = get_user_data(handle, &username, &pw)) != PAM_SUCCESS) @@ -676,13 +689,15 @@ _public_ PAM_EXTERN int pam_sm_close_session( } if (kill_session && check_user_lists(handle, pw->pw_uid, kill_only_users, kill_exclude_users)) { - pam_syslog(handle, LOG_DEBUG, "Killing remaining processes of user session %s of %s.", id, username); + if (debug) + pam_syslog(handle, LOG_DEBUG, "Killing remaining processes of user session %s of %s.", id, username); /* Kill processes in session cgroup, and delete it */ if ((r = cg_kill_recursive_and_wait(SYSTEMD_CGROUP_CONTROLLER, session_path, true)) < 0) pam_syslog(handle, LOG_ERR, "Failed to kill session cgroup: %s", strerror(-r)); } else { - pam_syslog(handle, LOG_DEBUG, "Moving remaining processes of user session %s of %s into control group %s.", id, username, nosession_path); + if (debug) + pam_syslog(handle, LOG_DEBUG, "Moving remaining processes of user session %s of %s into control group %s.", id, username, nosession_path); /* Migrate processes from session to user * cgroup. First, try to create the user group From c798c40ec957a35cd4b7d04a196a9e58880c6ff3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Jun 2011 22:49:54 +0200 Subject: [PATCH 19/20] update TODO --- TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO b/TODO index 5d813a6cd..ff18af242 100644 --- a/TODO +++ b/TODO @@ -74,6 +74,8 @@ Features: * show enablement status in systemctl status +* when failing to start a service due to ratelimiting, try again later, if restart=always is set + * write blog stories about: - enabling dbus services - status update From f9a61ef2c9e3b330d9e2e37977b3dd5758a4b853 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 16 Jun 2011 13:17:51 +0200 Subject: [PATCH 20/20] build-sys: prepare new release --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 85a14c6aa..eb5fb6a97 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_PREREQ(2.63) -AC_INIT([systemd],[28],[systemd-devel@lists.freedesktop.org]) +AC_INIT([systemd],[29],[systemd-devel@lists.freedesktop.org]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h])