From b4d0195b0598df76d30f006507fa8466f5a5d330 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 31 Dec 2011 19:59:09 +0100 Subject: cryptsetup: split off cryptsetup into its own subdir --- src/cryptsetup/cryptsetup-generator.c | 298 +++++++++++++++++++ src/cryptsetup/cryptsetup.c | 529 ++++++++++++++++++++++++++++++++++ 2 files changed, 827 insertions(+) create mode 100644 src/cryptsetup/cryptsetup-generator.c create mode 100644 src/cryptsetup/cryptsetup.c (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c new file mode 100644 index 0000000000..a48b7a4562 --- /dev/null +++ b/src/cryptsetup/cryptsetup-generator.c @@ -0,0 +1,298 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2010 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with systemd; If not, see . +***/ + +#include +#include +#include + +#include "log.h" +#include "util.h" +#include "unit-name.h" + +const char *arg_dest = "/tmp"; + +static bool has_option(const char *haystack, const char *needle) { + const char *f = haystack; + size_t l; + + assert(needle); + + if (!haystack) + return false; + + l = strlen(needle); + + while ((f = strstr(f, needle))) { + + if (f > haystack && f[-1] != ',') { + f++; + continue; + } + + if (f[l] != 0 && f[l] != ',') { + f++; + continue; + } + + return true; + } + + return false; +} + +static int create_disk( + const char *name, + const char *device, + const char *password, + const char *options) { + + char *p = NULL, *n = NULL, *d = NULL, *u = NULL, *from = NULL, *to = NULL, *e = NULL; + int r; + FILE *f = NULL; + bool noauto, nofail; + + assert(name); + assert(device); + + noauto = has_option(options, "noauto"); + nofail = has_option(options, "nofail"); + + if (!(n = unit_name_build_escape("cryptsetup", name, ".service"))) { + r = -ENOMEM; + log_error("Failed to allocate unit name."); + goto fail; + } + + if (asprintf(&p, "%s/%s", arg_dest, n) < 0) { + r = -ENOMEM; + log_error("Failed to allocate unit file name."); + goto fail; + } + + if (!(u = fstab_node_to_udev_node(device))) { + r = -ENOMEM; + log_error("Failed to allocate device node."); + goto fail; + } + + if (!(d = unit_name_from_path(u, ".device"))) { + r = -ENOMEM; + log_error("Failed to allocate device name."); + goto fail; + } + + if (!(f = fopen(p, "wxe"))) { + r = -errno; + log_error("Failed to create unit file: %m"); + goto fail; + } + + fprintf(f, + "[Unit]\n" + "Description=Cryptography Setup for %%I\n" + "Conflicts=umount.target\n" + "DefaultDependencies=no\n" + "BindTo=%s dev-mapper-%%i.device\n" + "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n" + "Before=umount.target\n", + d, d); + + if (!nofail) + fprintf(f, + "Before=cryptsetup.target\n"); + + if (password && (streq(password, "/dev/urandom") || + streq(password, "/dev/random") || + streq(password, "/dev/hw_random"))) + fprintf(f, + "After=systemd-random-seed-load.service\n"); + else + fprintf(f, + "Before=local-fs.target\n"); + + fprintf(f, + "\n[Service]\n" + "Type=oneshot\n" + "RemainAfterExit=yes\n" + "TimeoutSec=0\n" /* the binary handles timeouts anyway */ + "ExecStart=" SYSTEMD_CRYPTSETUP_PATH " attach '%s' '%s' '%s' '%s'\n" + "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " detach '%s'\n", + name, u, strempty(password), strempty(options), + name); + + if (has_option(options, "tmp")) + fprintf(f, + "ExecStartPost=/sbin/mke2fs '/dev/mapper/%s'\n", + name); + + if (has_option(options, "swap")) + fprintf(f, + "ExecStartPost=/sbin/mkswap '/dev/mapper/%s'\n", + name); + + fflush(f); + + if (ferror(f)) { + r = -errno; + log_error("Failed to write file: %m"); + goto fail; + } + + if (asprintf(&from, "../%s", n) < 0) { + r = -ENOMEM; + goto fail; + } + + if (!noauto) { + + if (asprintf(&to, "%s/%s.wants/%s", arg_dest, d, n) < 0) { + r = -ENOMEM; + goto fail; + } + + mkdir_parents(to, 0755); + + if (symlink(from, to) < 0) { + log_error("Failed to create symlink '%s' to '%s': %m", from, to); + r = -errno; + goto fail; + } + + free(to); + to = NULL; + + if (!nofail) + asprintf(&to, "%s/cryptsetup.target.requires/%s", arg_dest, n); + else + asprintf(&to, "%s/cryptsetup.target.wants/%s", arg_dest, n); + + if (!to) { + r = -ENOMEM; + goto fail; + } + + mkdir_parents(to, 0755); + + if (symlink(from, to) < 0) { + log_error("Failed to create symlink '%s' to '%s': %m", from, to); + r = -errno; + goto fail; + } + } + + free(to); + to = NULL; + + e = unit_name_escape(name); + if (asprintf(&to, "%s/dev-mapper-%s.device.requires/%s", arg_dest, e, n) < 0) { + r = -ENOMEM; + goto fail; + } + + mkdir_parents(to, 0755); + + if (symlink(from, to) < 0) { + log_error("Failed to create symlink '%s' to '%s': %m", from, to); + r = -errno; + goto fail; + } + + r = 0; + +fail: + free(p); + free(n); + free(d); + free(e); + + free(from); + free(to); + + if (f) + fclose(f); + + return r; +} + +int main(int argc, char *argv[]) { + FILE *f; + int r = EXIT_SUCCESS; + unsigned n = 0; + + if (argc > 2) { + log_error("This program takes one or no arguments."); + return EXIT_FAILURE; + } + + if (argc > 1) + arg_dest = argv[1]; + + log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_parse_environment(); + log_open(); + + umask(0022); + + if (!(f = fopen("/etc/crypttab", "re"))) { + + if (errno == ENOENT) + r = EXIT_SUCCESS; + else { + r = EXIT_FAILURE; + log_error("Failed to open /etc/crypttab: %m"); + } + + goto finish; + } + + for (;;) { + char line[LINE_MAX], *l; + char *name = NULL, *device = NULL, *password = NULL, *options = NULL; + int k; + + if (!(fgets(line, sizeof(line), f))) + break; + + n++; + + l = strstrip(line); + if (*l == '#' || *l == 0) + continue; + + if ((k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options)) < 2 || k > 4) { + log_error("Failed to parse /etc/crypttab:%u, ignoring.", n); + r = EXIT_FAILURE; + goto next; + } + + if (create_disk(name, device, password, options) < 0) + r = EXIT_FAILURE; + + next: + free(name); + free(device); + free(password); + free(options); + } + +finish: + return r; +} diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c new file mode 100644 index 0000000000..ac7b6d6c38 --- /dev/null +++ b/src/cryptsetup/cryptsetup.c @@ -0,0 +1,529 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2010 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with systemd; If not, see . +***/ + +#include +#include +#include +#include + +#include +#include + +#include "log.h" +#include "util.h" +#include "strv.h" +#include "ask-password-api.h" +#include "def.h" + +static const char *opt_type = NULL; /* LUKS1 or PLAIN */ +static char *opt_cipher = NULL; +static unsigned opt_key_size = 0; +static char *opt_hash = NULL; +static unsigned opt_tries = 0; +static bool opt_readonly = false; +static bool opt_verify = false; +static usec_t opt_timeout = DEFAULT_TIMEOUT_USEC; + +/* Options Debian's crypttab knows we don't: + + offset= + skip= + precheck= + check= + checkargs= + noearly= + loud= + keyscript= +*/ + +static int parse_one_option(const char *option) { + assert(option); + + /* Handled outside of this tool */ + if (streq(option, "noauto")) + return 0; + + if (startswith(option, "cipher=")) { + char *t; + + if (!(t = strdup(option+7))) + return -ENOMEM; + + free(opt_cipher); + opt_cipher = t; + + } else if (startswith(option, "size=")) { + + if (safe_atou(option+5, &opt_key_size) < 0) { + log_error("size= parse failure, ignoring."); + return 0; + } + + } else if (startswith(option, "hash=")) { + char *t; + + if (!(t = strdup(option+5))) + return -ENOMEM; + + free(opt_hash); + opt_hash = t; + + } else if (startswith(option, "tries=")) { + + if (safe_atou(option+6, &opt_tries) < 0) { + log_error("tries= parse failure, ignoring."); + return 0; + } + + } else if (streq(option, "readonly")) + opt_readonly = true; + else if (streq(option, "verify")) + opt_verify = true; + else if (streq(option, "luks")) + opt_type = CRYPT_LUKS1; + else if (streq(option, "plain") || + streq(option, "swap") || + streq(option, "tmp")) + opt_type = CRYPT_PLAIN; + else if (startswith(option, "timeout=")) { + + if (parse_usec(option+8, &opt_timeout) < 0) { + log_error("timeout= parse failure, ignoring."); + return 0; + } + + } else if (!streq(option, "none")) + log_error("Encountered unknown /etc/crypttab option '%s', ignoring.", option); + + return 0; +} + +static int parse_options(const char *options) { + char *state; + char *w; + size_t l; + + assert(options); + + FOREACH_WORD_SEPARATOR(w, l, options, ",", state) { + char *o; + int r; + + if (!(o = strndup(w, l))) + return -ENOMEM; + + r = parse_one_option(o); + free(o); + + if (r < 0) + return r; + } + + return 0; +} + +static void log_glue(int level, const char *msg, void *usrptr) { + log_debug("%s", msg); +} + +static char *disk_description(const char *path) { + struct udev *udev = NULL; + struct udev_device *device = NULL; + struct stat st; + char *description = NULL; + const char *model; + + assert(path); + + if (stat(path, &st) < 0) + return NULL; + + if (!S_ISBLK(st.st_mode)) + return NULL; + + if (!(udev = udev_new())) + return NULL; + + if (!(device = udev_device_new_from_devnum(udev, 'b', st.st_rdev))) + goto finish; + + if ((model = udev_device_get_property_value(device, "ID_MODEL_FROM_DATABASE")) || + (model = udev_device_get_property_value(device, "ID_MODEL")) || + (model = udev_device_get_property_value(device, "DM_NAME"))) + description = strdup(model); + +finish: + if (device) + udev_device_unref(device); + + if (udev) + udev_unref(udev); + + return description; +} + +static char *disk_mount_point(const char *label) { + char *mp = NULL, *device = NULL; + FILE *f = NULL; + struct mntent *m; + + /* Yeah, we don't support native systemd unit files here for now */ + + if (asprintf(&device, "/dev/mapper/%s", label) < 0) + goto finish; + + if (!(f = setmntent("/etc/fstab", "r"))) + goto finish; + + while ((m = getmntent(f))) + if (path_equal(m->mnt_fsname, device)) { + mp = strdup(m->mnt_dir); + break; + } + +finish: + if (f) + endmntent(f); + + free(device); + + return mp; +} + +static int help(void) { + + printf("%s attach VOLUME SOURCEDEVICE [PASSWORD] [OPTIONS]\n" + "%s detach VOLUME\n\n" + "Attaches or detaches an encrypted block device.\n", + program_invocation_short_name, + program_invocation_short_name); + + return 0; +} + +int main(int argc, char *argv[]) { + int r = EXIT_FAILURE; + struct crypt_device *cd = NULL; + char **passwords = NULL, *truncated_cipher = NULL; + const char *cipher = NULL, *cipher_mode = NULL, *hash = NULL, *name = NULL; + char *description = NULL, *name_buffer = NULL, *mount_point = NULL; + unsigned keyfile_size = 0; + + if (argc <= 1) { + help(); + return EXIT_SUCCESS; + } + + if (argc < 3) { + log_error("This program requires at least two arguments."); + return EXIT_FAILURE; + } + + log_set_target(LOG_TARGET_AUTO); + log_parse_environment(); + log_open(); + + umask(0022); + + if (streq(argv[1], "attach")) { + uint32_t flags = 0; + int k; + unsigned try; + const char *key_file = NULL; + usec_t until; + crypt_status_info status; + + /* Arguments: systemd-cryptsetup attach VOLUME SOURCE-DEVICE [PASSWORD] [OPTIONS] */ + + if (argc < 4) { + log_error("attach requires at least two arguments."); + goto finish; + } + + if (argc >= 5 && + argv[4][0] && + !streq(argv[4], "-") && + !streq(argv[4], "none")) { + + if (!path_is_absolute(argv[4])) + log_error("Password file path %s is not absolute. Ignoring.", argv[4]); + else + key_file = argv[4]; + } + + if (argc >= 6 && argv[5][0] && !streq(argv[5], "-")) + parse_options(argv[5]); + + /* A delicious drop of snake oil */ + mlockall(MCL_FUTURE); + + description = disk_description(argv[3]); + mount_point = disk_mount_point(argv[2]); + + if (description && streq(argv[2], description)) { + /* If the description string is simply the + * volume name, then let's not show this + * twice */ + free(description); + description = NULL; + } + + if (mount_point && description) + asprintf(&name_buffer, "%s (%s) on %s", description, argv[2], mount_point); + else if (mount_point) + asprintf(&name_buffer, "%s on %s", argv[2], mount_point); + else if (description) + asprintf(&name_buffer, "%s (%s)", description, argv[2]); + + name = name_buffer ? name_buffer : argv[2]; + + if ((k = crypt_init(&cd, argv[3]))) { + log_error("crypt_init() failed: %s", strerror(-k)); + goto finish; + } + + crypt_set_log_callback(cd, log_glue, NULL); + + status = crypt_status(cd, argv[2]); + if (status == CRYPT_ACTIVE || status == CRYPT_BUSY) { + log_info("Volume %s already active.", argv[2]); + r = EXIT_SUCCESS; + goto finish; + } + + if (opt_readonly) + flags |= CRYPT_ACTIVATE_READONLY; + + if (opt_timeout > 0) + until = now(CLOCK_MONOTONIC) + opt_timeout; + else + until = 0; + + opt_tries = opt_tries > 0 ? opt_tries : 3; + opt_key_size = (opt_key_size > 0 ? opt_key_size : 256); + hash = opt_hash ? opt_hash : "ripemd160"; + + if (opt_cipher) { + size_t l; + + l = strcspn(opt_cipher, "-"); + + if (!(truncated_cipher = strndup(opt_cipher, l))) { + log_error("Out of memory"); + goto finish; + } + + cipher = truncated_cipher; + cipher_mode = opt_cipher[l] ? opt_cipher+l+1 : "plain"; + } else { + cipher = "aes"; + cipher_mode = "cbc-essiv:sha256"; + } + + for (try = 0; try < opt_tries; try++) { + bool pass_volume_key = false; + + strv_free(passwords); + passwords = NULL; + + if (!key_file) { + char *text; + char **p; + + if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0) { + log_error("Out of memory"); + goto finish; + } + + k = ask_password_auto(text, "drive-harddisk", until, try == 0 && !opt_verify, &passwords); + free(text); + + if (k < 0) { + log_error("Failed to query password: %s", strerror(-k)); + goto finish; + } + + if (opt_verify) { + char **passwords2 = NULL; + + assert(strv_length(passwords) == 1); + + if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0) { + log_error("Out of memory"); + goto finish; + } + + k = ask_password_auto(text, "drive-harddisk", until, false, &passwords2); + free(text); + + if (k < 0) { + log_error("Failed to query verification password: %s", strerror(-k)); + goto finish; + } + + assert(strv_length(passwords2) == 1); + + if (!streq(passwords[0], passwords2[0])) { + log_warning("Passwords did not match, retrying."); + strv_free(passwords2); + continue; + } + + strv_free(passwords2); + } + + strv_uniq(passwords); + + STRV_FOREACH(p, passwords) { + char *c; + + if (strlen(*p)+1 >= opt_key_size) + continue; + + /* Pad password if necessary */ + if (!(c = new(char, opt_key_size))) { + log_error("Out of memory."); + goto finish; + } + + strncpy(c, *p, opt_key_size); + free(*p); + *p = c; + } + } + + k = 0; + + if (!opt_type || streq(opt_type, CRYPT_LUKS1)) + k = crypt_load(cd, CRYPT_LUKS1, NULL); + + if ((!opt_type && k < 0) || streq_ptr(opt_type, CRYPT_PLAIN)) { + struct crypt_params_plain params; + + zero(params); + params.hash = hash; + + /* In contrast to what the name + * crypt_setup() might suggest this + * doesn't actually format anything, + * it just configures encryption + * parameters when used for plain + * mode. */ + k = crypt_format(cd, CRYPT_PLAIN, + cipher, + cipher_mode, + NULL, + NULL, + opt_key_size / 8, + ¶ms); + + pass_volume_key = streq(hash, "plain"); + + /* for CRYPT_PLAIN limit reads + * from keyfile to key length */ + keyfile_size = opt_key_size / 8; + } + + if (k < 0) { + log_error("Loading of cryptographic parameters failed: %s", strerror(-k)); + goto finish; + } + + log_info("Set cipher %s, mode %s, key size %i bits for device %s.", + crypt_get_cipher(cd), + crypt_get_cipher_mode(cd), + crypt_get_volume_key_size(cd)*8, + argv[3]); + + if (key_file) + k = crypt_activate_by_keyfile(cd, argv[2], CRYPT_ANY_SLOT, key_file, keyfile_size, flags); + else { + char **p; + + STRV_FOREACH(p, passwords) { + + if (pass_volume_key) + k = crypt_activate_by_volume_key(cd, argv[2], *p, opt_key_size, flags); + else + k = crypt_activate_by_passphrase(cd, argv[2], CRYPT_ANY_SLOT, *p, strlen(*p), flags); + + if (k >= 0) + break; + } + } + + if (k >= 0) + break; + + if (k != -EPERM) { + log_error("Failed to activate: %s", strerror(-k)); + goto finish; + } + + log_warning("Invalid passphrase."); + } + + if (try >= opt_tries) { + log_error("Too many attempts."); + r = EXIT_FAILURE; + goto finish; + } + + } else if (streq(argv[1], "detach")) { + int k; + + if ((k = crypt_init_by_name(&cd, argv[2]))) { + log_error("crypt_init() failed: %s", strerror(-k)); + goto finish; + } + + crypt_set_log_callback(cd, log_glue, NULL); + + if ((k = crypt_deactivate(cd, argv[2])) < 0) { + log_error("Failed to deactivate: %s", strerror(-k)); + goto finish; + } + + } else { + log_error("Unknown verb %s.", argv[1]); + goto finish; + } + + r = EXIT_SUCCESS; + +finish: + + if (cd) + crypt_free(cd); + + free(opt_cipher); + free(opt_hash); + + free(truncated_cipher); + + strv_free(passwords); + + free(description); + free(mount_point); + free(name_buffer); + + return r; +} -- cgit v1.2.3-54-g00ecf From 2f9dec073b6557401804aae180eab744a8b1a3cc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 5 Jan 2012 16:29:21 +0100 Subject: build-sys: add stub makefiles to subdirs --- src/binfmt/Makefile | 1 + src/cryptsetup/Makefile | 1 + src/hostname/Makefile | 1 + src/linux/Makefile | 1 + src/locale/Makefile | 1 + src/readahead/Makefile | 1 + src/systemd/Makefile | 1 + src/timedate/Makefile | 1 + src/vconsole/Makefile | 1 + 9 files changed, 9 insertions(+) create mode 120000 src/binfmt/Makefile create mode 120000 src/cryptsetup/Makefile create mode 120000 src/hostname/Makefile create mode 120000 src/linux/Makefile create mode 120000 src/locale/Makefile create mode 120000 src/readahead/Makefile create mode 120000 src/systemd/Makefile create mode 120000 src/timedate/Makefile create mode 120000 src/vconsole/Makefile (limited to 'src/cryptsetup') diff --git a/src/binfmt/Makefile b/src/binfmt/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/binfmt/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/cryptsetup/Makefile b/src/cryptsetup/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/cryptsetup/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/hostname/Makefile b/src/hostname/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/hostname/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/linux/Makefile b/src/linux/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/linux/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/locale/Makefile b/src/locale/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/locale/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/readahead/Makefile b/src/readahead/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/readahead/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/systemd/Makefile b/src/systemd/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/systemd/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/timedate/Makefile b/src/timedate/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/timedate/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/vconsole/Makefile b/src/vconsole/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/vconsole/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file -- cgit v1.2.3-54-g00ecf From 4cfa2c999dea269ddc646bfeba6c7f1021a73843 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Jan 2012 05:09:06 +0100 Subject: core: switch all log targets to go directly to the journal, instead via syslog --- man/systemd.xml | 32 ++++++++++++++------------------ src/bridge.c | 2 +- src/cgroups-agent.c | 2 +- src/cryptsetup/cryptsetup-generator.c | 2 +- src/getty-generator.c | 2 +- src/initctl.c | 2 +- src/login/user-sessions.c | 2 +- src/main.c | 6 +++--- src/manager.c | 12 +++++++++--- src/manager.h | 2 +- src/modules-load.c | 2 +- src/quotacheck.c | 2 +- src/random-seed.c | 2 +- src/rc-local-generator.c | 2 +- src/readahead/readahead-collect.c | 2 +- src/readahead/readahead-replay.c | 2 +- src/remount-api-vfs.c | 2 +- src/reply-password.c | 2 +- src/shutdownd.c | 2 +- src/system.conf | 2 +- src/unit.c | 2 +- src/update-utmp.c | 2 +- units/fsck-root.service.in | 2 +- units/fsck@.service.in | 2 +- 24 files changed, 47 insertions(+), 45 deletions(-) (limited to 'src/cryptsetup') diff --git a/man/systemd.xml b/man/systemd.xml index c1766e26a4..121cb21266 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -209,8 +209,10 @@ Set log target. Argument must be one of , + , , , + , , . @@ -266,13 +268,15 @@ , , , + , + , , , , . If the argument is omitted - defaults to + defaults to and to @@ -823,19 +827,24 @@ + SIGRTMIN+26 SIGRTMIN+27 SIGRTMIN+28 SIGRTMIN+29 Sets the log level to - console - (resp. kmsg on + journal-or-kmsg + (resp. console on + SIGRTMIN+27; + resp. kmsg on SIGRTMIN+28; resp. syslog-or-kmsg on SIGRTMIN+29), as controlled via - systemd.log_target=console - (resp. systemd.log_target=kmsg + systemd.log_target=journal-or-kmsg + (resp. systemd.log_target=console + on SIGRTMIN+27; + resp. systemd.log_target=kmsg on SIGRTMIN+28; resp systemd.log_target=syslog-or-kmsg @@ -1078,19 +1087,6 @@ - - /run/systemd/stdout-syslog-bridge - - Used internally by the - systemd-stdout-syslog-bridge.service - unit to connect STDOUT and/or STDERR - of spawned processes to - syslog3 - or the kernel log buffer. This is an - AF_UNIX stream - socket. - - /run/systemd/shutdownd diff --git a/src/bridge.c b/src/bridge.c index 878856cfd6..1f7cf3a9b9 100644 --- a/src/bridge.c +++ b/src/bridge.c @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_JOURNAL_OR_KMSG); log_parse_environment(); log_open(); diff --git a/src/cgroups-agent.c b/src/cgroups-agent.c index 7f001e67d1..1bbc8827d7 100644 --- a/src/cgroups-agent.c +++ b/src/cgroups-agent.c @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) { goto finish; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index a48b7a4562..ba59b49b01 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -245,7 +245,7 @@ int main(int argc, char *argv[]) { if (argc > 1) arg_dest = argv[1]; - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/getty-generator.c b/src/getty-generator.c index 6b5b254e6a..1263785fb5 100644 --- a/src/getty-generator.c +++ b/src/getty-generator.c @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/initctl.c b/src/initctl.c index e2189e9ee1..53d03a9e10 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -388,7 +388,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/login/user-sessions.c b/src/login/user-sessions.c index df46b76c87..64aa3bb1c6 100644 --- a/src/login/user-sessions.c +++ b/src/login/user-sessions.c @@ -35,7 +35,7 @@ int main(int argc, char*argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/main.c b/src/main.c index b23dd18f93..91516dad5a 100644 --- a/src/main.c +++ b/src/main.c @@ -343,7 +343,7 @@ static int parse_proc_cmdline_word(const char *word) { #ifdef HAVE_SYSV_COMPAT "systemd.sysv_console=0|1 Connect output of SysV scripts to console\n" #endif - "systemd.log_target=console|kmsg|syslog|syslog-or-kmsg|null\n" + "systemd.log_target=console|kmsg|journal|journal-or-kmsg|syslog|syslog-or-kmsg|null\n" " Log target\n" "systemd.log_level=LEVEL Log level\n" "systemd.log_color=0|1 Highlight important log messages\n" @@ -993,7 +993,7 @@ static int help(void) { #ifdef HAVE_SYSV_COMPAT " --sysv-console[=0|1] Connect output of SysV scripts to console\n" #endif - " --log-target=TARGET Set log target (console, syslog, kmsg, syslog-or-kmsg, null)\n" + " --log-target=TARGET Set log target (console, journal, syslog, kmsg, journal-or-kmsg, syslog-or-kmsg, null)\n" " --log-level=LEVEL Set log level (debug, info, notice, warning, err, crit, alert, emerg)\n" " --log-color[=0|1] Highlight important log messages\n" " --log-location[=0|1] Include code location in log messages\n" @@ -1177,7 +1177,7 @@ int main(int argc, char *argv[]) { if (getpid() == 1) { arg_running_as = MANAGER_SYSTEM; - log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_JOURNAL_OR_KMSG); if (!is_reexec) if (selinux_setup(&loaded_policy) < 0) diff --git a/src/manager.c b/src/manager.c index 54df7ebe5f..a549209ca6 100644 --- a/src/manager.c +++ b/src/manager.c @@ -195,6 +195,7 @@ static int manager_setup_signals(Manager *m) { SIGRTMIN+21, /* systemd: disable status messages */ SIGRTMIN+22, /* systemd: set log level to LOG_DEBUG */ SIGRTMIN+23, /* systemd: set log level to LOG_INFO */ + SIGRTMIN+26, /* systemd: set log target to journal-or-kmsg */ SIGRTMIN+27, /* systemd: set log target to console */ SIGRTMIN+28, /* systemd: set log target to kmsg */ SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg */ @@ -2293,6 +2294,11 @@ static int manager_process_signal_fd(Manager *m) { log_notice("Setting log level to info."); break; + case 26: + log_set_target(LOG_TARGET_JOURNAL_OR_KMSG); + log_notice("Setting log target to journal-or-kmsg."); + break; + case 27: log_set_target(LOG_TARGET_CONSOLE); log_notice("Setting log target to console."); @@ -3121,7 +3127,7 @@ int manager_set_default_controllers(Manager *m, char **controllers) { return 0; } -void manager_recheck_syslog(Manager *m) { +void manager_recheck_journal(Manager *m) { Unit *u; assert(m); @@ -3131,13 +3137,13 @@ void manager_recheck_syslog(Manager *m) { u = manager_get_unit(m, SPECIAL_JOURNALD_SOCKET); if (u && SOCKET(u)->state != SOCKET_RUNNING) { - log_close_syslog(); + log_close_journal(); return; } u = manager_get_unit(m, SPECIAL_JOURNALD_SERVICE); if (u && SERVICE(u)->state != SERVICE_RUNNING) { - log_close_syslog(); + log_close_journal(); return; } diff --git a/src/manager.h b/src/manager.h index 6e7558e175..0ace0c9ffe 100644 --- a/src/manager.h +++ b/src/manager.h @@ -289,7 +289,7 @@ void manager_check_finished(Manager *m); void manager_run_generators(Manager *m); void manager_undo_generators(Manager *m); -void manager_recheck_syslog(Manager *m); +void manager_recheck_journal(Manager *m); void manager_set_show_status(Manager *m, bool b); bool manager_get_show_status(Manager *m); diff --git a/src/modules-load.c b/src/modules-load.c index 8dd98f73d8..7384f25ab0 100644 --- a/src/modules-load.c +++ b/src/modules-load.c @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/quotacheck.c b/src/quotacheck.c index 60033a8eb2..b6648b8369 100644 --- a/src/quotacheck.c +++ b/src/quotacheck.c @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/random-seed.c b/src/random-seed.c index 0c63794b66..8b43bacadc 100644 --- a/src/random-seed.c +++ b/src/random-seed.c @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/rc-local-generator.c b/src/rc-local-generator.c index ac6424a786..56785cf402 100644 --- a/src/rc-local-generator.c +++ b/src/rc-local-generator.c @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c index 6bff32f4dd..7e6c243b5e 100644 --- a/src/readahead/readahead-collect.c +++ b/src/readahead/readahead-collect.c @@ -654,7 +654,7 @@ int main(int argc, char *argv[]) { int r; const char *root; - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c index 88c7a219a8..00d57c3d7a 100644 --- a/src/readahead/readahead-replay.c +++ b/src/readahead/readahead-replay.c @@ -338,7 +338,7 @@ int main(int argc, char*argv[]) { int r; const char *root; - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/remount-api-vfs.c b/src/remount-api-vfs.c index 7b146551a8..3e146ebb5c 100644 --- a/src/remount-api-vfs.c +++ b/src/remount-api-vfs.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/reply-password.c b/src/reply-password.c index bd55e65f3c..3a96049d7f 100644 --- a/src/reply-password.c +++ b/src/reply-password.c @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) { char packet[LINE_MAX]; size_t length; - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/shutdownd.c b/src/shutdownd.c index 19b16cbe39..b4052d4933 100644 --- a/src/shutdownd.c +++ b/src/shutdownd.c @@ -189,7 +189,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/src/system.conf b/src/system.conf index 2d1dd8669b..33d09bccea 100644 --- a/src/system.conf +++ b/src/system.conf @@ -9,7 +9,7 @@ [Manager] #LogLevel=info -#LogTarget=syslog-or-kmsg +#LogTarget=journal-or-kmsg #LogColor=yes #LogLocation=no #DumpCore=yes diff --git a/src/unit.c b/src/unit.c index e07d2c15d2..1fbfb1dea5 100644 --- a/src/unit.c +++ b/src/unit.c @@ -1338,7 +1338,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su } } - manager_recheck_syslog(u->meta.manager); + manager_recheck_journal(u->meta.manager); /* Maybe we finished startup and are now ready for being * stopped because unneeded? */ diff --git a/src/update-utmp.c b/src/update-utmp.c index 073f28e254..0d177d6164 100644 --- a/src/update-utmp.c +++ b/src/update-utmp.c @@ -369,7 +369,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); diff --git a/units/fsck-root.service.in b/units/fsck-root.service.in index 7b3529db07..4086149128 100644 --- a/units/fsck-root.service.in +++ b/units/fsck-root.service.in @@ -18,6 +18,6 @@ ConditionPathExists=!/run/initramfs/root-fsck Type=oneshot RemainAfterExit=no ExecStart=@rootlibexecdir@/systemd-fsck -StandardOutput=syslog+console +StandardOutput=journal+console FsckPassNo=1 TimeoutSec=0 diff --git a/units/fsck@.service.in b/units/fsck@.service.in index e1f773639b..c06684b634 100644 --- a/units/fsck@.service.in +++ b/units/fsck@.service.in @@ -16,5 +16,5 @@ Before=shutdown.target Type=oneshot RemainAfterExit=no ExecStart=@rootlibexecdir@/systemd-fsck %f -StandardOutput=syslog+console +StandardOutput=journal+console TimeoutSec=0 -- cgit v1.2.3-54-g00ecf From 49e942b2bc9fdedba79cd266a076ce9c9d91fc13 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 10 Apr 2012 21:54:31 +0200 Subject: rename basic.la to shared.la and put selinux deps in shared-selinx.la Only 34 of 74 tools need libselinux linked, and libselinux is a pain with its unconditional library constructor. --- Makefile.am | 185 ++++++++++++++++++---------------- src/ask-password-api.c | 1 + src/automount.c | 1 + src/cryptsetup/cryptsetup-generator.c | 1 + src/dbus.c | 1 + src/getty-generator.c | 1 + src/install.c | 1 + src/journal/coredump.c | 1 + src/journal/journald.c | 1 + src/locale/localed.c | 1 + src/login/logind-dbus.c | 1 + src/login/logind-seat.c | 1 + src/login/logind-session.c | 1 + src/login/logind-user.c | 1 + src/login/multi-seat-x.c | 1 + src/machine-id-setup.c | 1 + src/manager.c | 1 + src/mount-setup.c | 1 + src/mount.c | 1 + src/nspawn.c | 1 + src/path-lookup.c | 1 + src/path.c | 1 + src/random-seed.c | 1 + src/rc-local-generator.c | 1 + src/shared/cgroup-util.c | 1 + src/shared/mkdir.c | 99 ++++++++++++++++++ src/shared/mkdir.h | 28 +++++ src/shared/socket-util.c | 1 + src/shared/util.c | 68 ------------- src/shared/util.h | 3 - src/shutdown.c | 1 + src/socket.c | 1 + src/tmpfiles.c | 1 + src/tty-ask-password-agent.c | 1 + 34 files changed, 254 insertions(+), 158 deletions(-) create mode 100644 src/shared/mkdir.c create mode 100644 src/shared/mkdir.h (limited to 'src/cryptsetup') diff --git a/Makefile.am b/Makefile.am index 151555fd6d..7e9e23175a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -548,15 +548,13 @@ EXTRA_DIST += \ # ------------------------------------------------------------------------------ noinst_LTLIBRARIES += \ - libsystemd-basic.la + libsystemd-shared.la -libsystemd_basic_la_SOURCES = \ +libsystemd_shared_la_SOURCES = \ src/shared/util.c \ src/shared/util.h \ src/shared/virt.c \ src/shared/virt.h \ - src/shared/label.c \ - src/shared/label.h \ src/shared/hashmap.c \ src/shared/hashmap.h \ src/shared/set.c \ @@ -565,8 +563,6 @@ libsystemd_basic_la_SOURCES = \ src/shared/strv.h \ src/shared/conf-parser.c \ src/shared/conf-parser.h \ - src/shared/socket-util.c \ - src/shared/socket-util.h \ src/shared/log.c \ src/shared/log.h \ src/shared/ratelimit.h \ @@ -575,19 +571,32 @@ libsystemd_basic_la_SOURCES = \ src/shared/exit-status.h \ src/shared/utf8.c \ src/shared/utf8.h \ - src/shared/cgroup-util.c \ - src/shared/cgroup-util.h \ src/shared/pager.c \ src/shared/pager.h \ src/shared/ioprio.h \ src/shared/list.h \ src/shared/macro.h -libsystemd_basic_la_CFLAGS = \ +# ------------------------------------------------------------------------------ +noinst_LTLIBRARIES += \ + libsystemd-shared-selinux.la + +libsystemd_shared_selinux_la_SOURCES = \ + src/shared/cgroup-util.c \ + src/shared/cgroup-util.h \ + src/shared/socket-util.c \ + src/shared/socket-util.h \ + src/shared/label.c \ + src/shared/label.h \ + src/shared/mkdir.c \ + src/shared/mkdir.h + +libsystemd_shared_selinux_la_CFLAGS = \ $(AM_CFLAGS) \ $(SELINUX_CFLAGS) -libsystemd_basic_la_LIBADD = \ +libsystemd_shared_selinux_la_LIBADD = \ + libsystemd-shared.la \ $(SELINUX_LIBS) # ------------------------------------------------------------------------------ @@ -776,7 +785,7 @@ libsystemd_core_la_CFLAGS = \ $(KMOD_CFLAGS) libsystemd_core_la_LIBADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-capability.la \ libudev.la \ $(DBUS_LIBS) \ @@ -832,40 +841,40 @@ test_loopback_SOURCES = \ src/loopback-setup.c test_loopback_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la test_hostname_SOURCES = \ src/test-hostname.c \ src/hostname-setup.c test_hostname_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la test_daemon_SOURCES = \ src/test-daemon.c test_daemon_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la test_cgroup_SOURCES = \ src/test-cgroup.c test_cgroup_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la test_env_replace_SOURCES = \ src/test-env-replace.c test_env_replace_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la test_strv_SOURCES = \ src/test-strv.c \ src/specifier.c test_strv_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la test_install_SOURCES = \ src/test-install.c \ @@ -878,7 +887,7 @@ test_install_CFLAGS = \ $(DBUS_CFLAGS) test_install_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la test_watchdog_SOURCES = \ src/test-watchdog.c \ @@ -886,7 +895,7 @@ test_watchdog_SOURCES = \ src/watchdog.h test_watchdog_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_initctl_SOURCES = \ @@ -898,7 +907,7 @@ systemd_initctl_CFLAGS = \ $(DBUS_CFLAGS) systemd_initctl_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la \ $(DBUS_LIBS) @@ -914,7 +923,7 @@ systemd_update_utmp_CFLAGS = \ $(AUDIT_CFLAGS) systemd_update_utmp_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ $(DBUS_LIBS) \ $(AUDIT_LIBS) @@ -924,7 +933,7 @@ systemd_shutdownd_SOURCES = \ src/shutdownd.c systemd_shutdownd_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la systemd_shutdown_SOURCES = \ @@ -935,7 +944,7 @@ systemd_shutdown_SOURCES = \ src/watchdog.h systemd_shutdown_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libudev.la # ------------------------------------------------------------------------------ @@ -947,7 +956,7 @@ systemd_modules_load_CFLAGS = \ $(KMOD_CFLAGS) systemd_modules_load_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ $(KMOD_LIBS) # ------------------------------------------------------------------------------ @@ -955,7 +964,7 @@ systemd_tmpfiles_SOURCES = \ src/tmpfiles.c systemd_tmpfiles_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ systemd_machine_id_setup_SOURCES = \ @@ -963,7 +972,7 @@ systemd_machine_id_setup_SOURCES = \ src/machine-id-main.c systemd_machine_id_setup_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-id128.la # ------------------------------------------------------------------------------ @@ -971,7 +980,7 @@ systemd_sysctl_SOURCES = \ src/sysctl.c systemd_sysctl_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_fsck_SOURCES = \ @@ -983,7 +992,7 @@ systemd_fsck_CFLAGS = \ $(DBUS_CFLAGS) systemd_fsck_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libudev.la \ $(DBUS_LIBS) @@ -992,14 +1001,14 @@ systemd_timestamp_SOURCES = \ src/timestamp.c systemd_timestamp_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_ac_power_SOURCES = \ src/ac-power.c systemd_ac_power_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libudev.la # ------------------------------------------------------------------------------ @@ -1007,7 +1016,7 @@ systemd_detect_virt_SOURCES = \ src/detect-virt.c systemd_detect_virt_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_getty_generator_SOURCES = \ @@ -1015,14 +1024,14 @@ systemd_getty_generator_SOURCES = \ src/unit-name.c systemd_getty_generator_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ systemd_rc_local_generator_SOURCES = \ src/rc-local-generator.c systemd_rc_local_generator_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ systemd_remount_api_vfs_SOURCES = \ @@ -1030,7 +1039,7 @@ systemd_remount_api_vfs_SOURCES = \ src/mount-setup.c systemd_remount_api_vfs_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_cgroups_agent_SOURCES = \ @@ -1042,7 +1051,7 @@ systemd_cgroups_agent_CFLAGS = \ $(DBUS_CFLAGS) systemd_cgroups_agent_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ $(DBUS_LIBS) # ------------------------------------------------------------------------------ @@ -1062,7 +1071,7 @@ systemctl_CFLAGS = \ $(DBUS_CFLAGS) systemctl_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-daemon.la \ libsystemd-journal.la \ libsystemd-id128.la \ @@ -1074,7 +1083,7 @@ systemd_notify_SOURCES = \ src/readahead/sd-readahead.c systemd_notify_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la # ------------------------------------------------------------------------------ @@ -1083,14 +1092,14 @@ systemd_ask_password_SOURCES = \ src/ask-password-api.c systemd_ask_password_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ systemd_reply_password_SOURCES = \ src/reply-password.c systemd_reply_password_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_cgls_SOURCES = \ @@ -1098,14 +1107,14 @@ systemd_cgls_SOURCES = \ src/cgroup-show.c systemd_cgls_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ systemd_cgtop_SOURCES = \ src/cgtop.c systemd_cgtop_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ systemd_nspawn_SOURCES = \ @@ -1113,7 +1122,7 @@ systemd_nspawn_SOURCES = \ src/loopback-setup.c systemd_nspawn_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-capability.la \ libsystemd-daemon.la @@ -1122,7 +1131,7 @@ systemd_stdio_bridge_SOURCES = \ src/bridge.c systemd_stdio_bridge_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la # ------------------------------------------------------------------------------ systemd_tty_ask_password_agent_SOURCES = \ @@ -1131,7 +1140,7 @@ systemd_tty_ask_password_agent_SOURCES = \ src/utmp-wtmp.c systemd_tty_ask_password_agent_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ libsystemd_daemon_la_SOURCES = \ @@ -1262,17 +1271,18 @@ libudev_private_la_SOURCES =\ src/udev/libudev-device-private.c \ src/udev/libudev-queue-private.c -libudev_private_la_CFLAGS = \ - $(AM_CFLAGS) \ - -fvisibility=default - if HAVE_SELINUX libudev_private_la_SOURCES +=\ src/udev/libudev-selinux-private.c +endif + +libudev_private_la_CFLAGS = \ + $(AM_CFLAGS) \ + $(SELINUX_CFLAGS) + -fvisibility=default libudev_private_la_LIBADD = \ $(SELINUX_LIBS) -endif # ------------------------------------------------------------------------------ MANPAGES += \ @@ -1369,8 +1379,8 @@ libudev_core_la_CFLAGS = \ libudev_core_la_LIBADD = \ libudev-private.la \ - libsystemd-basic.la \ libsystemd-daemon.la \ + libsystemd-shared-selinux.la \ $(BLKID_LIBS) \ $(KMOD_LIBS) @@ -1406,7 +1416,8 @@ udevadm_SOURCES = \ src/udev/udevadm-test-builtin.c udevadm_LDADD = \ - libudev-core.la + libudev-core.la \ + libsystemd-shared-selinux.la # ------------------------------------------------------------------------------ TESTS = \ @@ -1429,7 +1440,7 @@ test_udev_SOURCES = \ test_udev_LDADD = \ libudev-core.la \ libudev-private.la \ - libsystemd-basic.la + libsystemd-shared.la test_udev_DEPENDENCIES = \ src/udev/test/sys @@ -1453,7 +1464,7 @@ ata_id_SOURCES = \ ata_id_LDADD = \ libudev-private.la \ - libsystemd-basic.la + libsystemd-shared.la udevlibexec_PROGRAMS += \ ata_id @@ -1464,7 +1475,7 @@ cdrom_id_SOURCES = \ cdrom_id_LDADD = \ libudev.la \ - libsystemd-basic.la + libsystemd-shared.la udevlibexec_PROGRAMS += \ cdrom_id @@ -1491,7 +1502,7 @@ scsi_id_SOURCES =\ scsi_id_LDADD = \ libudev-private.la \ - libsystemd-basic.la + libsystemd-shared.la udevlibexec_PROGRAMS += \ scsi_id @@ -1518,7 +1529,7 @@ accelerometer_SOURCES = \ accelerometer_LDADD = \ libudev.la -lm \ - libsystemd-basic.la + libsystemd-shared.la udevlibexec_PROGRAMS += \ accelerometer @@ -1840,13 +1851,13 @@ libsystemd_id128_la_LDFLAGS = \ -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128.sym libsystemd_id128_la_LIBADD = \ - libsystemd-basic.la + libsystemd-shared.la test_id128_SOURCES = \ src/test-id128.c test_id128_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-id128.la noinst_PROGRAMS += \ @@ -1899,7 +1910,7 @@ nodist_systemd_journald_SOURCES = \ systemd_journald_CFLAGS = systemd_journald_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-audit.la \ libsystemd-daemon.la \ libsystemd-login.la \ @@ -1926,7 +1937,7 @@ systemd_cat_SOURCES = \ src/journal/cat.c systemd_cat_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-journal.la journalctl_SOURCES = \ @@ -1934,7 +1945,7 @@ journalctl_SOURCES = \ src/logs-show.c journalctl_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-journal.la \ libsystemd-id128.la @@ -1956,7 +1967,7 @@ test_journal_SOURCES = \ src/journal/journal-send.c test_journal_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-id128.la if HAVE_XZ @@ -1975,7 +1986,7 @@ test_journal_send_SOURCES = \ src/journal/test-journal-send.c test_journal_send_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-journal.la libsystemd_journal_la_SOURCES = \ @@ -1994,7 +2005,7 @@ libsystemd_journal_la_LDFLAGS = \ -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym libsystemd_journal_la_LIBADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-id128.la if HAVE_XZ @@ -2030,7 +2041,7 @@ UNINSTALL_EXEC_HOOKS += \ noinst_PROGRAMS += \ test-journal \ - test-journal-send + test-journal-send pkginclude_HEADERS += \ src/systemd/sd-journal.h \ @@ -2096,9 +2107,9 @@ systemd_coredump_SOURCES = \ src/journal/coredump.c systemd_coredump_LDADD = \ - libsystemd-basic.la \ libsystemd-journal.la \ - libsystemd-login.la + libsystemd-login.la \ + libsystemd-shared-selinux.la rootlibexec_PROGRAMS += \ systemd-coredump @@ -2119,7 +2130,7 @@ systemd_binfmt_SOURCES = \ src/binfmt/binfmt.c systemd_binfmt_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la rootlibexec_PROGRAMS += \ systemd-binfmt @@ -2158,7 +2169,7 @@ systemd_vconsole_setup_SOURCES = \ src/vconsole/vconsole-setup.c systemd_vconsole_setup_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la rootlibexec_PROGRAMS += \ systemd-vconsole-setup @@ -2190,7 +2201,7 @@ systemd_readahead_collect_SOURCES = \ src/readahead/readahead-common.c systemd_readahead_collect_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la \ libudev.la @@ -2199,7 +2210,7 @@ systemd_readahead_replay_SOURCES = \ src/readahead/readahead-common.c systemd_readahead_replay_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la \ libudev.la @@ -2242,7 +2253,7 @@ systemd_quotacheck_SOURCES = \ src/quotacheck.c systemd_quotacheck_LDADD = \ - libsystemd-basic.la + libsystemd-shared.la endif # ------------------------------------------------------------------------------ @@ -2262,7 +2273,7 @@ systemd_random_seed_SOURCES = \ src/random-seed.c systemd_random_seed_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la randomseed-install-data-hook: $(MKDIR_P) -m 0755 \ @@ -2299,16 +2310,16 @@ systemd_cryptsetup_CFLAGS = \ $(LIBCRYPTSETUP_CFLAGS) systemd_cryptsetup_LDADD = \ - $(LIBCRYPTSETUP_LIBS) \ + libsystemd-shared-selinux.la \ libudev.la \ - libsystemd-basic.la + $(LIBCRYPTSETUP_LIBS) systemd_cryptsetup_generator_SOURCES = \ src/cryptsetup/cryptsetup-generator.c \ src/unit-name.c systemd_cryptsetup_generator_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la cryptsetup-install-data-hook: $(MKDIR_P) -m 0755 \ @@ -2333,7 +2344,7 @@ systemd_hostnamed_CFLAGS = \ $(DBUS_CFLAGS) systemd_hostnamed_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la \ $(DBUS_LIBS) @@ -2384,7 +2395,7 @@ systemd_localed_CFLAGS = \ $(DBUS_CFLAGS) systemd_localed_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-daemon.la \ $(DBUS_LIBS) @@ -2445,7 +2456,7 @@ systemd_timedated_CFLAGS = \ $(DBUS_CFLAGS) systemd_timedated_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la \ $(DBUS_LIBS) @@ -2508,7 +2519,7 @@ systemd_logind_CFLAGS = \ $(DBUS_CFLAGS) systemd_logind_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libsystemd-audit.la \ libsystemd-daemon.la \ libudev.la \ @@ -2526,7 +2537,7 @@ systemd_user_sessions_SOURCES = \ src/login/user-sessions.c systemd_user_sessions_LDADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la rootlibexec_PROGRAMS += \ systemd-logind \ @@ -2543,7 +2554,7 @@ loginctl_CFLAGS = \ $(DBUS_CFLAGS) loginctl_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libudev.la \ $(DBUS_LIBS) @@ -2554,8 +2565,8 @@ test_login_SOURCES = \ src/login/test-login.c test_login_LDADD = \ - libsystemd-basic.la \ - libsystemd-login.la + libsystemd-login.la \ + libsystemd-shared-selinux.la noinst_PROGRAMS += \ test-login @@ -2573,7 +2584,7 @@ libsystemd_login_la_LDFLAGS = \ -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym libsystemd_login_la_LIBADD = \ - libsystemd-basic.la + libsystemd-shared-selinux.la if HAVE_PAM pam_systemd_la_SOURCES = \ @@ -2594,7 +2605,7 @@ pam_systemd_la_LDFLAGS = \ -export-symbols-regex '^pam_sm_.*' pam_systemd_la_LIBADD = \ - libsystemd-basic.la \ + libsystemd-shared.la \ libsystemd-daemon.la \ $(PAM_LIBS) \ $(DBUS_LIBS) @@ -2666,7 +2677,7 @@ systemd_multi_seat_x_SOURCES = \ src/login/multi-seat-x.c systemd_multi_seat_x_LDADD = \ - libsystemd-basic.la \ + libsystemd-shared-selinux.la \ libudev.la rootlibexec_PROGRAMS += \ diff --git a/src/ask-password-api.c b/src/ask-password-api.c index ce2f3cbe77..4b50d28d30 100644 --- a/src/ask-password-api.c +++ b/src/ask-password-api.c @@ -32,6 +32,7 @@ #include #include "util.h" +#include "mkdir.h" #include "strv.h" #include "ask-password-api.h" diff --git a/src/automount.c b/src/automount.c index cf2fb60cdf..6857a6fd76 100644 --- a/src/automount.c +++ b/src/automount.c @@ -38,6 +38,7 @@ #include "bus-errors.h" #include "special.h" #include "label.h" +#include "mkdir.h" static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = { [AUTOMOUNT_DEAD] = UNIT_INACTIVE, diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index ba59b49b01..5e92fb9af8 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -26,6 +26,7 @@ #include "log.h" #include "util.h" #include "unit-name.h" +#include "mkdir.h" const char *arg_dest = "/tmp"; diff --git a/src/dbus.c b/src/dbus.c index 8e6e9fd520..ddf91f225a 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -29,6 +29,7 @@ #include "log.h" #include "strv.h" #include "cgroup.h" +#include "mkdir.h" #include "dbus-unit.h" #include "dbus-job.h" #include "dbus-manager.h" diff --git a/src/getty-generator.c b/src/getty-generator.c index 7fac43a0ba..dc979e9e8e 100644 --- a/src/getty-generator.c +++ b/src/getty-generator.c @@ -25,6 +25,7 @@ #include "log.h" #include "util.h" +#include "mkdir.h" #include "unit-name.h" #include "virt.h" diff --git a/src/install.c b/src/install.c index 9256116805..45018043c2 100644 --- a/src/install.c +++ b/src/install.c @@ -26,6 +26,7 @@ #include #include "util.h" +#include "mkdir.h" #include "hashmap.h" #include "set.h" #include "path-lookup.h" diff --git a/src/journal/coredump.c b/src/journal/coredump.c index 7dea66e6fd..5ecdef37a7 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -29,6 +29,7 @@ #include "log.h" #include "util.h" +#include "mkdir.h" #include "special.h" #define COREDUMP_MAX (24*1024*1024) diff --git a/src/journal/journald.c b/src/journal/journald.c index 442d2eb5ae..073bb890ab 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -35,6 +35,7 @@ #include #include +#include "mkdir.h" #include "hashmap.h" #include "journal-file.h" #include "socket-util.h" diff --git a/src/locale/localed.c b/src/locale/localed.c index e9f9f86878..e6aaa5cab3 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -26,6 +26,7 @@ #include #include "util.h" +#include "mkdir.h" #include "strv.h" #include "dbus-common.h" #include "polkit.h" diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index ea6b89faa1..1c6dc979ed 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -27,6 +27,7 @@ #include "logind.h" #include "dbus-common.h" #include "strv.h" +#include "mkdir.h" #include "polkit.h" #include "special.h" diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index be37c1cc2e..906ede6cda 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -30,6 +30,7 @@ #include "logind-seat.h" #include "logind-acl.h" #include "util.h" +#include "mkdir.h" Seat *seat_new(Manager *m, const char *id) { Seat *s; diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 4e0af8656b..641678210f 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -28,6 +28,7 @@ #include "logind-session.h" #include "strv.h" #include "util.h" +#include "mkdir.h" #include "cgroup-util.h" #define IDLE_THRESHOLD_USEC (5*USEC_PER_MINUTE) diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 717f0e20a2..92ba2c2208 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -25,6 +25,7 @@ #include "logind-user.h" #include "util.h" +#include "mkdir.h" #include "cgroup-util.h" #include "hashmap.h" #include "strv.h" diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c index 7133e026dc..96554462a8 100644 --- a/src/login/multi-seat-x.c +++ b/src/login/multi-seat-x.c @@ -25,6 +25,7 @@ #include #include "util.h" +#include "mkdir.h" int main(int argc, char *argv[]) { diff --git a/src/machine-id-setup.c b/src/machine-id-setup.c index 0f97433804..0ee3cd7ae1 100644 --- a/src/machine-id-setup.c +++ b/src/machine-id-setup.c @@ -32,6 +32,7 @@ #include "machine-id-setup.h" #include "macro.h" #include "util.h" +#include "mkdir.h" #include "log.h" #include "virt.h" diff --git a/src/manager.c b/src/manager.c index be47766a73..971990b037 100644 --- a/src/manager.c +++ b/src/manager.c @@ -49,6 +49,7 @@ #include "strv.h" #include "log.h" #include "util.h" +#include "mkdir.h" #include "ratelimit.h" #include "cgroup.h" #include "mount-setup.h" diff --git a/src/mount-setup.c b/src/mount-setup.c index aaffb655ee..7d6cdf6cb4 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -36,6 +36,7 @@ #include "label.h" #include "set.h" #include "strv.h" +#include "mkdir.h" #ifndef TTY_GID #define TTY_GID 5 diff --git a/src/mount.c b/src/mount.c index ed0f819c7b..7dbeaf9cf0 100644 --- a/src/mount.c +++ b/src/mount.c @@ -31,6 +31,7 @@ #include "load-dropin.h" #include "log.h" #include "strv.h" +#include "mkdir.h" #include "mount-setup.h" #include "unit-name.h" #include "dbus-mount.h" diff --git a/src/nspawn.c b/src/nspawn.c index 66910bc684..9e21c5e8b5 100644 --- a/src/nspawn.c +++ b/src/nspawn.c @@ -43,6 +43,7 @@ #include "log.h" #include "util.h" +#include "mkdir.h" #include "audit.h" #include "missing.h" #include "cgroup-util.h" diff --git a/src/path-lookup.c b/src/path-lookup.c index 5464cedbbd..d33ebc71be 100644 --- a/src/path-lookup.c +++ b/src/path-lookup.c @@ -26,6 +26,7 @@ #include #include "util.h" +#include "mkdir.h" #include "strv.h" #include "path-lookup.h" diff --git a/src/path.c b/src/path.c index e97cd09810..1d50885ed4 100644 --- a/src/path.c +++ b/src/path.c @@ -28,6 +28,7 @@ #include "unit.h" #include "unit-name.h" #include "path.h" +#include "mkdir.h" #include "dbus-path.h" #include "special.h" #include "bus-errors.h" diff --git a/src/random-seed.c b/src/random-seed.c index 8b43bacadc..c1022c719f 100644 --- a/src/random-seed.c +++ b/src/random-seed.c @@ -27,6 +27,7 @@ #include "log.h" #include "util.h" +#include "mkdir.h" #define POOL_SIZE_MIN 512 diff --git a/src/rc-local-generator.c b/src/rc-local-generator.c index 56785cf402..108827d699 100644 --- a/src/rc-local-generator.c +++ b/src/rc-local-generator.c @@ -26,6 +26,7 @@ #include "log.h" #include "util.h" +#include "mkdir.h" #if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) #define SCRIPT_PATH "/etc/rc.d/rc.local" diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 904d300952..5647624e8d 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -34,6 +34,7 @@ #include "set.h" #include "macro.h" #include "util.h" +#include "mkdir.h" int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) { char *fs; diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c new file mode 100644 index 0000000000..e668cc2558 --- /dev/null +++ b/src/shared/mkdir.c @@ -0,0 +1,99 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2010 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with systemd; If not, see . +***/ + +#include +#include +#include +#include +#include +#include + +#include "mkdir.h" +#include "label.h" +#include "util.h" +#include "log.h" + +int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) { + struct stat st; + + if (label_mkdir(path, mode) >= 0) + if (chmod_and_chown(path, mode, uid, gid) < 0) + return -errno; + + if (lstat(path, &st) < 0) + return -errno; + + if ((st.st_mode & 0777) != mode || + st.st_uid != uid || + st.st_gid != gid || + !S_ISDIR(st.st_mode)) { + errno = EEXIST; + return -errno; + } + + return 0; +} + +int mkdir_parents(const char *path, mode_t mode) { + const char *p, *e; + + assert(path); + + /* Creates every parent directory in the path except the last + * component. */ + + p = path + strspn(path, "/"); + for (;;) { + int r; + char *t; + + e = p + strcspn(p, "/"); + p = e + strspn(e, "/"); + + /* Is this the last component? If so, then we're + * done */ + if (*p == 0) + return 0; + + if (!(t = strndup(path, e - path))) + return -ENOMEM; + + r = label_mkdir(t, mode); + free(t); + + if (r < 0 && errno != EEXIST) + return -errno; + } +} + +int mkdir_p(const char *path, mode_t mode) { + int r; + + /* Like mkdir -p */ + + if ((r = mkdir_parents(path, mode)) < 0) + return r; + + if (label_mkdir(path, mode) < 0 && errno != EEXIST) + return -errno; + + return 0; +} diff --git a/src/shared/mkdir.h b/src/shared/mkdir.h new file mode 100644 index 0000000000..c006e7ccdb --- /dev/null +++ b/src/shared/mkdir.h @@ -0,0 +1,28 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef foomkdirhfoo +#define foomkdirhfoo + +/*** + This file is part of systemd. + + Copyright 2010 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with systemd; If not, see . +***/ + +int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); +int mkdir_parents(const char *path, mode_t mode); +int mkdir_p(const char *path, mode_t mode); +#endif diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index acc4d33372..554f8ac965 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -34,6 +34,7 @@ #include "macro.h" #include "util.h" +#include "mkdir.h" #include "socket-util.h" #include "missing.h" #include "label.h" diff --git a/src/shared/util.c b/src/shared/util.c index 563853fad6..fef58d5f30 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -1591,74 +1591,6 @@ char *file_in_same_dir(const char *path, const char *filename) { return r; } -int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) { - struct stat st; - - if (label_mkdir(path, mode) >= 0) - if (chmod_and_chown(path, mode, uid, gid) < 0) - return -errno; - - if (lstat(path, &st) < 0) - return -errno; - - if ((st.st_mode & 0777) != mode || - st.st_uid != uid || - st.st_gid != gid || - !S_ISDIR(st.st_mode)) { - errno = EEXIST; - return -errno; - } - - return 0; -} - - -int mkdir_parents(const char *path, mode_t mode) { - const char *p, *e; - - assert(path); - - /* Creates every parent directory in the path except the last - * component. */ - - p = path + strspn(path, "/"); - for (;;) { - int r; - char *t; - - e = p + strcspn(p, "/"); - p = e + strspn(e, "/"); - - /* Is this the last component? If so, then we're - * done */ - if (*p == 0) - return 0; - - if (!(t = strndup(path, e - path))) - return -ENOMEM; - - r = label_mkdir(t, mode); - free(t); - - if (r < 0 && errno != EEXIST) - return -errno; - } -} - -int mkdir_p(const char *path, mode_t mode) { - int r; - - /* Like mkdir -p */ - - if ((r = mkdir_parents(path, mode)) < 0) - return r; - - if (label_mkdir(path, mode) < 0 && errno != EEXIST) - return -errno; - - return 0; -} - int rmdir_parents(const char *path, const char *stop) { size_t l; int r = 0; diff --git a/src/shared/util.h b/src/shared/util.h index e96d56dd2a..a45f54d661 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -242,9 +242,6 @@ char *delete_chars(char *s, const char *bad); char *truncate_nl(char *s); char *file_in_same_dir(const char *path, const char *filename); -int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); -int mkdir_parents(const char *path, mode_t mode); -int mkdir_p(const char *path, mode_t mode); int parent_of_path(const char *path, char **parent); diff --git a/src/shutdown.c b/src/shutdown.c index 9f65b1dab0..b0c680a030 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -41,6 +41,7 @@ #include "log.h" #include "umount.h" #include "util.h" +#include "mkdir.h" #include "virt.h" #include "watchdog.h" diff --git a/src/socket.c b/src/socket.c index bb75d960ab..5b24b3422b 100644 --- a/src/socket.c +++ b/src/socket.c @@ -36,6 +36,7 @@ #include "load-dropin.h" #include "load-fragment.h" #include "strv.h" +#include "mkdir.h" #include "unit-name.h" #include "dbus-socket.h" #include "missing.h" diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 873bf233fd..5e85e37411 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -41,6 +41,7 @@ #include "log.h" #include "util.h" +#include "mkdir.h" #include "strv.h" #include "label.h" #include "set.h" diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c index 13481b29e9..c928b5f454 100644 --- a/src/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent.c @@ -33,6 +33,7 @@ #include #include "util.h" +#include "mkdir.h" #include "conf-parser.h" #include "utmp-wtmp.h" #include "socket-util.h" -- cgit v1.2.3-54-g00ecf From 5430f7f2bc7330f3088b894166bf3524a067e3d8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Apr 2012 00:20:58 +0200 Subject: relicense to LGPLv2.1 (with exceptions) We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends. --- LICENSE | 339 --------------- LICENSE.GPL2 | 339 +++++++++++++++ LICENSE.LGPL2.1 | 508 +++++++++++++++++++++++ LICENSE.MIT | 19 + Makefile.am | 12 +- README | 10 +- autogen.sh | 8 +- configure.ac | 8 +- man/binfmt.d.xml | 8 +- man/custom-html.xsl | 8 +- man/daemon.xml | 8 +- man/halt.xml | 8 +- man/hostname.xml | 8 +- man/journalctl.xml | 8 +- man/journald.conf.xml | 8 +- man/locale.conf.xml | 8 +- man/loginctl.xml | 8 +- man/logind.conf.xml | 8 +- man/machine-id.xml | 8 +- man/machine-info.xml | 8 +- man/modules-load.d.xml | 8 +- man/os-release.xml | 8 +- man/pam_systemd.xml | 8 +- man/runlevel.xml | 8 +- man/sd-daemon.xml | 8 +- man/sd-login.xml | 8 +- man/sd-readahead.xml | 8 +- man/sd_booted.xml | 8 +- man/sd_get_seats.xml | 8 +- man/sd_is_fifo.xml | 8 +- man/sd_listen_fds.xml | 8 +- man/sd_login_monitor_new.xml | 8 +- man/sd_notify.xml | 8 +- man/sd_pid_get_session.xml | 8 +- man/sd_readahead.xml | 8 +- man/sd_seat_get_active.xml | 8 +- man/sd_session_is_active.xml | 8 +- man/sd_uid_get_state.xml | 8 +- man/shutdown.xml | 8 +- man/sysctl.d.xml | 8 +- man/systemctl.xml | 8 +- man/systemd-ask-password.xml | 8 +- man/systemd-cat.xml | 8 +- man/systemd-cgls.xml | 8 +- man/systemd-cgtop.xml | 8 +- man/systemd-machine-id-setup.xml | 8 +- man/systemd-notify.xml | 8 +- man/systemd-nspawn.xml | 8 +- man/systemd-tmpfiles.xml | 8 +- man/systemd.automount.xml | 8 +- man/systemd.conf.xml | 8 +- man/systemd.device.xml | 8 +- man/systemd.exec.xml | 8 +- man/systemd.journal-fields.xml | 8 +- man/systemd.mount.xml | 8 +- man/systemd.path.xml | 8 +- man/systemd.service.xml | 8 +- man/systemd.snapshot.xml | 8 +- man/systemd.socket.xml | 8 +- man/systemd.special.xml | 8 +- man/systemd.swap.xml | 8 +- man/systemd.target.xml | 8 +- man/systemd.timer.xml | 8 +- man/systemd.unit.xml | 8 +- man/systemd.xml | 8 +- man/telinit.xml | 8 +- man/timezone.xml | 8 +- man/tmpfiles.d.xml | 8 +- man/vconsole.conf.xml | 8 +- rules/99-systemd.rules.in | 4 +- src/Makefile | 8 +- src/ac-power.c | 8 +- src/ask-password-api.c | 8 +- src/ask-password.c | 8 +- src/binfmt/binfmt.c | 8 +- src/bridge.c | 8 +- src/cgls.c | 8 +- src/cgroup-show.c | 8 +- src/cgroup-show.h | 8 +- src/cgroups-agent.c | 8 +- src/cgtop.c | 8 +- src/core/ask-password-api.h | 8 +- src/core/automount.c | 8 +- src/core/automount.h | 8 +- src/core/build.h | 8 +- src/core/bus-errors.h | 8 +- src/core/cgroup-attr.c | 8 +- src/core/cgroup-attr.h | 8 +- src/core/cgroup.c | 8 +- src/core/cgroup.h | 8 +- src/core/condition.c | 8 +- src/core/condition.h | 8 +- src/core/dbus-automount.c | 8 +- src/core/dbus-automount.h | 8 +- src/core/dbus-device.c | 8 +- src/core/dbus-device.h | 8 +- src/core/dbus-execute.c | 8 +- src/core/dbus-execute.h | 8 +- src/core/dbus-job.c | 8 +- src/core/dbus-job.h | 8 +- src/core/dbus-loop.h | 8 +- src/core/dbus-manager.c | 8 +- src/core/dbus-manager.h | 8 +- src/core/dbus-mount.c | 8 +- src/core/dbus-mount.h | 8 +- src/core/dbus-path.c | 8 +- src/core/dbus-path.h | 8 +- src/core/dbus-service.c | 8 +- src/core/dbus-service.h | 8 +- src/core/dbus-snapshot.c | 8 +- src/core/dbus-snapshot.h | 8 +- src/core/dbus-socket.c | 8 +- src/core/dbus-socket.h | 8 +- src/core/dbus-swap.c | 8 +- src/core/dbus-swap.h | 8 +- src/core/dbus-target.c | 8 +- src/core/dbus-target.h | 8 +- src/core/dbus-timer.c | 8 +- src/core/dbus-timer.h | 8 +- src/core/dbus-unit.c | 8 +- src/core/dbus-unit.h | 8 +- src/core/dbus.c | 8 +- src/core/dbus.h | 8 +- src/core/device.c | 8 +- src/core/device.h | 8 +- src/core/execute.c | 8 +- src/core/execute.h | 8 +- src/core/fdset.c | 8 +- src/core/fdset.h | 8 +- src/core/ima-setup.c | 8 +- src/core/ima-setup.h | 8 +- src/core/job.c | 8 +- src/core/job.h | 8 +- src/core/kmod-setup.c | 8 +- src/core/kmod-setup.h | 8 +- src/core/load-dropin.c | 8 +- src/core/load-dropin.h | 8 +- src/core/load-fragment.c | 8 +- src/core/load-fragment.h | 8 +- src/core/locale-setup.c | 8 +- src/core/locale-setup.h | 8 +- src/core/manager.c | 8 +- src/core/manager.h | 8 +- src/core/mount.c | 8 +- src/core/mount.h | 8 +- src/core/namespace.c | 8 +- src/core/namespace.h | 8 +- src/core/path.c | 8 +- src/core/path.h | 8 +- src/core/polkit.h | 8 +- src/core/selinux-setup.c | 8 +- src/core/selinux-setup.h | 8 +- src/core/service.c | 8 +- src/core/service.h | 8 +- src/core/snapshot.c | 8 +- src/core/snapshot.h | 8 +- src/core/socket.c | 8 +- src/core/socket.h | 8 +- src/core/special.h | 8 +- src/core/swap.c | 8 +- src/core/swap.h | 8 +- src/core/sysfs-show.h | 8 +- src/core/target.c | 8 +- src/core/target.h | 8 +- src/core/tcpwrap.c | 8 +- src/core/tcpwrap.h | 8 +- src/core/timer.c | 8 +- src/core/timer.h | 8 +- src/core/unit.c | 8 +- src/core/unit.h | 8 +- src/cryptsetup/cryptsetup-generator.c | 8 +- src/cryptsetup/cryptsetup.c | 8 +- src/dbus-common.c | 8 +- src/dbus-common.h | 8 +- src/dbus-loop.c | 8 +- src/def.h | 8 +- src/detect-virt.c | 8 +- src/fsck.c | 8 +- src/getty-generator.c | 8 +- src/hostname-setup.c | 8 +- src/hostname-setup.h | 8 +- src/hostname/hostnamed.c | 8 +- src/hostname/org.freedesktop.hostname1.conf | 4 +- src/hostname/org.freedesktop.hostname1.policy.in | 4 +- src/hostname/org.freedesktop.hostname1.service | 4 +- src/initctl.c | 8 +- src/install.c | 8 +- src/install.h | 8 +- src/journal/cat.c | 8 +- src/journal/compress.c | 8 +- src/journal/compress.h | 8 +- src/journal/coredump.c | 8 +- src/journal/journal-def.h | 8 +- src/journal/journal-file.c | 8 +- src/journal/journal-file.h | 8 +- src/journal/journal-internal.h | 8 +- src/journal/journal-rate-limit.c | 8 +- src/journal/journal-rate-limit.h | 8 +- src/journal/journal-send.c | 8 +- src/journal/journalctl.c | 8 +- src/journal/journald.c | 8 +- src/journal/journald.conf | 4 +- src/journal/journald.h | 8 +- src/journal/libsystemd-journal.pc.in | 4 +- src/journal/libsystemd-journal.sym | 4 +- src/journal/sd-journal.c | 8 +- src/journal/test-journal-send.c | 8 +- src/journal/test-journal.c | 8 +- src/libsystemd-id128.pc.in | 4 +- src/libsystemd-id128.sym | 4 +- src/locale/localed.c | 8 +- src/locale/org.freedesktop.locale1.conf | 4 +- src/locale/org.freedesktop.locale1.policy.in | 4 +- src/locale/org.freedesktop.locale1.service | 4 +- src/login/70-uaccess.rules | 4 +- src/login/71-seat.rules | 4 +- src/login/73-seat-late.rules.in | 4 +- src/login/libsystemd-login.pc.in | 4 +- src/login/libsystemd-login.sym | 4 +- src/login/loginctl.c | 8 +- src/login/logind-acl.c | 8 +- src/login/logind-acl.h | 8 +- src/login/logind-dbus.c | 8 +- src/login/logind-device.c | 8 +- src/login/logind-device.h | 8 +- src/login/logind-seat-dbus.c | 8 +- src/login/logind-seat.c | 8 +- src/login/logind-seat.h | 8 +- src/login/logind-session-dbus.c | 8 +- src/login/logind-session.c | 8 +- src/login/logind-session.h | 8 +- src/login/logind-user-dbus.c | 8 +- src/login/logind-user.c | 8 +- src/login/logind-user.h | 8 +- src/login/logind.c | 8 +- src/login/logind.conf | 4 +- src/login/logind.h | 8 +- src/login/multi-seat-x.c | 8 +- src/login/org.freedesktop.login1.conf | 4 +- src/login/org.freedesktop.login1.policy.in | 4 +- src/login/org.freedesktop.login1.service | 4 +- src/login/pam-module.c | 8 +- src/login/sd-login.c | 8 +- src/login/sysfs-show.c | 8 +- src/login/test-login.c | 8 +- src/login/uaccess.c | 8 +- src/login/user-sessions.c | 8 +- src/logs-show.c | 8 +- src/logs-show.h | 8 +- src/loopback-setup.c | 8 +- src/loopback-setup.h | 8 +- src/machine-id-main.c | 8 +- src/machine-id-setup.c | 8 +- src/machine-id-setup.h | 8 +- src/main.c | 8 +- src/missing.h | 8 +- src/modules-load.c | 8 +- src/mount-setup.c | 8 +- src/mount-setup.h | 8 +- src/notify.c | 8 +- src/nspawn.c | 8 +- src/org.freedesktop.systemd1.conf | 4 +- src/org.freedesktop.systemd1.policy.in.in | 4 +- src/org.freedesktop.systemd1.service | 4 +- src/path-lookup.c | 8 +- src/path-lookup.h | 8 +- src/polkit.c | 8 +- src/quotacheck.c | 8 +- src/random-seed.c | 8 +- src/rc-local-generator.c | 8 +- src/readahead/readahead-collect.c | 8 +- src/readahead/readahead-common.c | 8 +- src/readahead/readahead-common.h | 8 +- src/readahead/readahead-replay.c | 8 +- src/remount-api-vfs.c | 8 +- src/reply-password.c | 8 +- src/sd-id128.c | 8 +- src/shared/acl-util.c | 8 +- src/shared/acl-util.h | 8 +- src/shared/audit.c | 8 +- src/shared/audit.h | 8 +- src/shared/capability.c | 8 +- src/shared/capability.h | 8 +- src/shared/cgroup-label.c | 8 +- src/shared/cgroup-util.c | 8 +- src/shared/cgroup-util.h | 8 +- src/shared/conf-parser.c | 8 +- src/shared/conf-parser.h | 8 +- src/shared/exit-status.c | 8 +- src/shared/exit-status.h | 8 +- src/shared/hashmap.c | 8 +- src/shared/hashmap.h | 8 +- src/shared/label.c | 8 +- src/shared/label.h | 8 +- src/shared/list.h | 8 +- src/shared/log.c | 8 +- src/shared/log.h | 8 +- src/shared/macro.h | 8 +- src/shared/mkdir.c | 8 +- src/shared/mkdir.h | 8 +- src/shared/pager.c | 8 +- src/shared/pager.h | 8 +- src/shared/ratelimit.c | 8 +- src/shared/ratelimit.h | 8 +- src/shared/set.c | 8 +- src/shared/set.h | 8 +- src/shared/socket-label.c | 8 +- src/shared/socket-util.c | 8 +- src/shared/socket-util.h | 8 +- src/shared/strv.c | 8 +- src/shared/strv.h | 8 +- src/shared/utf8.c | 8 +- src/shared/utf8.h | 8 +- src/shared/util.c | 8 +- src/shared/util.h | 8 +- src/shared/virt.c | 8 +- src/shared/virt.h | 8 +- src/shutdown.c | 8 +- src/shutdownd.c | 8 +- src/spawn-ask-password-agent.c | 8 +- src/spawn-ask-password-agent.h | 8 +- src/spawn-polkit-agent.c | 8 +- src/spawn-polkit-agent.h | 8 +- src/specifier.c | 8 +- src/specifier.h | 8 +- src/sysctl.c | 8 +- src/system.conf | 4 +- src/systemctl.c | 8 +- src/systemd-bash-completion.sh | 6 +- src/systemd.pc.in | 4 +- src/systemd/sd-id128.h | 8 +- src/systemd/sd-journal.h | 8 +- src/systemd/sd-login.h | 8 +- src/systemd/sd-messages.h | 8 +- src/systemd/sd-shutdown.h | 8 +- src/test-cgroup.c | 8 +- src/test-daemon.c | 8 +- src/test-engine.c | 8 +- src/test-env-replace.c | 8 +- src/test-hostname.c | 8 +- src/test-id128.c | 8 +- src/test-install.c | 8 +- src/test-job-type.c | 8 +- src/test-loopback.c | 8 +- src/test-ns.c | 8 +- src/test-strv.c | 8 +- src/test-watchdog.c | 8 +- src/timedate/org.freedesktop.timedate1.conf | 4 +- src/timedate/org.freedesktop.timedate1.policy.in | 4 +- src/timedate/org.freedesktop.timedate1.service | 4 +- src/timedate/timedated.c | 8 +- src/timestamp.c | 8 +- src/tmpfiles.c | 8 +- src/tty-ask-password-agent.c | 8 +- src/umount.c | 8 +- src/umount.h | 8 +- src/unit-name.c | 8 +- src/unit-name.h | 8 +- src/update-utmp.c | 8 +- src/user.conf | 4 +- src/utmp-wtmp.c | 8 +- src/utmp-wtmp.h | 8 +- src/vconsole/vconsole-setup.c | 8 +- src/watchdog.c | 8 +- src/watchdog.h | 8 +- sysctl.d/coredump.conf.in | 4 +- tmpfiles.d/legacy.conf | 4 +- tmpfiles.d/systemd.conf | 4 +- tmpfiles.d/tmp.conf | 4 +- tmpfiles.d/x11.conf | 4 +- units/basic.target | 4 +- units/bluetooth.target | 4 +- units/console-shell.service.m4.in | 4 +- units/cryptsetup.target | 4 +- units/dev-hugepages.mount | 4 +- units/dev-mqueue.mount | 4 +- units/emergency.service.in | 4 +- units/emergency.target | 4 +- units/fedora/halt-local.service | 4 +- units/fedora/prefdm.service | 4 +- units/fedora/rc-local.service | 4 +- units/final.target | 4 +- units/frugalware/display-manager.service | 4 +- units/fsck-root.service.in | 4 +- units/fsck@.service.in | 4 +- units/getty.target | 4 +- units/getty@.service.m4 | 4 +- units/graphical.target | 4 +- units/halt.service.in | 4 +- units/halt.target | 4 +- units/http-daemon.target | 4 +- units/kexec.service.in | 4 +- units/kexec.target | 4 +- units/local-fs-pre.target | 4 +- units/local-fs.target | 4 +- units/mageia/prefdm.service | 4 +- units/mail-transfer-agent.target | 4 +- units/mandriva/prefdm.service | 4 +- units/multi-user.target | 4 +- units/network.target | 4 +- units/nss-lookup.target | 4 +- units/nss-user-lookup.target | 4 +- units/plymouth-halt.service | 4 +- units/plymouth-kexec.service | 4 +- units/plymouth-poweroff.service | 4 +- units/plymouth-quit-wait.service | 4 +- units/plymouth-quit.service | 4 +- units/plymouth-read-write.service | 4 +- units/plymouth-reboot.service | 4 +- units/plymouth-start.service | 4 +- units/poweroff.service.in | 4 +- units/poweroff.target | 4 +- units/printer.target | 4 +- units/proc-sys-fs-binfmt_misc.automount | 4 +- units/proc-sys-fs-binfmt_misc.mount | 4 +- units/quotacheck.service.in | 4 +- units/quotaon.service | 4 +- units/reboot.service.in | 4 +- units/reboot.target | 4 +- units/remote-fs-pre.target | 4 +- units/remote-fs.target | 4 +- units/remount-rootfs.service | 4 +- units/rescue.service.m4.in | 4 +- units/rescue.target | 4 +- units/rpcbind.target | 4 +- units/serial-getty@.service.m4 | 4 +- units/shutdown.target | 4 +- units/sigpwr.target | 4 +- units/smartcard.target | 4 +- units/sockets.target | 4 +- units/sound.target | 4 +- units/suse/halt-local.service | 4 +- units/suse/rc-local.service | 4 +- units/swap.target | 4 +- units/sys-fs-fuse-connections.mount | 4 +- units/sys-kernel-config.mount | 4 +- units/sys-kernel-debug.mount | 4 +- units/sysinit.target | 4 +- units/syslog.socket | 4 +- units/syslog.target | 4 +- units/systemd-ask-password-console.path | 4 +- units/systemd-ask-password-console.service.in | 4 +- units/systemd-ask-password-plymouth.path | 4 +- units/systemd-ask-password-plymouth.service.in | 4 +- units/systemd-ask-password-wall.path | 4 +- units/systemd-ask-password-wall.service.in | 4 +- units/systemd-binfmt.service.in | 4 +- units/systemd-hostnamed.service.in | 4 +- units/systemd-initctl.service.in | 4 +- units/systemd-initctl.socket | 4 +- units/systemd-journald.service.in | 4 +- units/systemd-journald.socket | 4 +- units/systemd-localed.service.in | 4 +- units/systemd-logind.service.in | 4 +- units/systemd-modules-load.service.in | 4 +- units/systemd-random-seed-load.service.in | 4 +- units/systemd-random-seed-save.service.in | 4 +- units/systemd-readahead-collect.service.in | 4 +- units/systemd-readahead-done.service.in | 4 +- units/systemd-readahead-done.timer | 4 +- units/systemd-readahead-replay.service.in | 4 +- units/systemd-remount-api-vfs.service.in | 4 +- units/systemd-shutdownd.service.in | 4 +- units/systemd-shutdownd.socket | 4 +- units/systemd-sysctl.service.in | 4 +- units/systemd-timedated.service.in | 4 +- units/systemd-tmpfiles-clean.service.in | 4 +- units/systemd-tmpfiles-clean.timer | 4 +- units/systemd-tmpfiles-setup.service.in | 4 +- units/systemd-update-utmp-runlevel.service.in | 4 +- units/systemd-update-utmp-shutdown.service.in | 4 +- units/systemd-user-sessions.service.in | 4 +- units/systemd-vconsole-setup.service.in | 4 +- units/time-sync.target | 4 +- units/tmp.mount | 4 +- units/umount.target | 4 +- units/user/default.target | 4 +- units/user/exit.service.in | 4 +- units/user/exit.target | 4 +- units/user@.service.in | 4 +- 480 files changed, 2485 insertions(+), 1952 deletions(-) delete mode 100644 LICENSE create mode 100644 LICENSE.GPL2 create mode 100644 LICENSE.LGPL2.1 create mode 100644 LICENSE.MIT (limited to 'src/cryptsetup') diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d511905c16..0000000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/LICENSE.GPL2 b/LICENSE.GPL2 new file mode 100644 index 0000000000..d511905c16 --- /dev/null +++ b/LICENSE.GPL2 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/LICENSE.LGPL2.1 b/LICENSE.LGPL2.1 new file mode 100644 index 0000000000..89d4489cec --- /dev/null +++ b/LICENSE.LGPL2.1 @@ -0,0 +1,508 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/LICENSE.MIT b/LICENSE.MIT new file mode 100644 index 0000000000..fd44f736ee --- /dev/null +++ b/LICENSE.MIT @@ -0,0 +1,19 @@ +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation files +(the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile.am b/Makefile.am index 675e591352..0a9f2e5198 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,16 +4,16 @@ # Copyright 2010-2012 Kay Sievers # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} @@ -457,7 +457,9 @@ endif dist_doc_DATA = \ README \ NEWS \ - LICENSE \ + LICENSE.LGPL2.1 \ + LICENSE.GPL2 \ + LICENSE.MIT \ DISTRO_PORTING pkgconfigdata_DATA = \ diff --git a/README b/README index 6b0eb51ecd..2467b1e03e 100644 --- a/README +++ b/README @@ -24,11 +24,15 @@ BUG REPORTS: https://bugs.freedesktop.org/enter_bug.cgi?product=systemd AUTHOR: - Lennart Poettering with major support from Kay Sievers + Lennart Poettering + Kay Sievers + ...and many others LICENSE: - GPLv2+ for all code, except sd-daemon.[ch] and - sd-readahead.[ch] which are MIT + LGPLv2.1+ for all code + - except sd-daemon.[ch] and sd-readahead.[ch] which are MIT + - except src/udev/ which is GPLv2.0+, excluding + src/udev/libudev* which is LGPLv2.1+ REQUIREMENTS: Linux kernel >= 2.6.39 diff --git a/autogen.sh b/autogen.sh index fba3dc08b8..0e1b5bedf6 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,16 +3,16 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then diff --git a/configure.ac b/configure.ac index 52374c15dd..93523d53d9 100644 --- a/configure.ac +++ b/configure.ac @@ -4,16 +4,16 @@ # Copyright 2010-2012 Kay Sievers # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . AC_PREREQ(2.63) diff --git a/man/binfmt.d.xml b/man/binfmt.d.xml index f5ec805e29..e997bcf21c 100644 --- a/man/binfmt.d.xml +++ b/man/binfmt.d.xml @@ -7,16 +7,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/custom-html.xsl b/man/custom-html.xsl index 2d2f458793..df16d08718 100644 --- a/man/custom-html.xsl +++ b/man/custom-html.xsl @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/daemon.xml b/man/daemon.xml index 997ee5b253..a7217c84aa 100644 --- a/man/daemon.xml +++ b/man/daemon.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/halt.xml b/man/halt.xml index 97a53ba350..7ba85ed88d 100644 --- a/man/halt.xml +++ b/man/halt.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/hostname.xml b/man/hostname.xml index 1acda1af5d..2ada32ff71 100644 --- a/man/hostname.xml +++ b/man/hostname.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/journalctl.xml b/man/journalctl.xml index 4728d36e1c..5e0c6dd5c1 100644 --- a/man/journalctl.xml +++ b/man/journalctl.xml @@ -8,16 +8,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/journald.conf.xml b/man/journald.conf.xml index eb596eb3ab..251e01dddf 100644 --- a/man/journald.conf.xml +++ b/man/journald.conf.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/locale.conf.xml b/man/locale.conf.xml index 37239974b6..0c4d351ec7 100644 --- a/man/locale.conf.xml +++ b/man/locale.conf.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/loginctl.xml b/man/loginctl.xml index cf0be0d19b..8e34a29801 100644 --- a/man/loginctl.xml +++ b/man/loginctl.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/logind.conf.xml b/man/logind.conf.xml index 950f81fa93..6a10fa9868 100644 --- a/man/logind.conf.xml +++ b/man/logind.conf.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/machine-id.xml b/man/machine-id.xml index 97c622c6fa..73f0926c0b 100644 --- a/man/machine-id.xml +++ b/man/machine-id.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/machine-info.xml b/man/machine-info.xml index 240da25a6b..e27b600211 100644 --- a/man/machine-info.xml +++ b/man/machine-info.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/modules-load.d.xml b/man/modules-load.d.xml index e2f7d5c68c..91d230c35a 100644 --- a/man/modules-load.d.xml +++ b/man/modules-load.d.xml @@ -7,16 +7,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/os-release.xml b/man/os-release.xml index ff8fdf16be..a5f1a917a8 100644 --- a/man/os-release.xml +++ b/man/os-release.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml index c07b46bab2..d681276c40 100644 --- a/man/pam_systemd.xml +++ b/man/pam_systemd.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/runlevel.xml b/man/runlevel.xml index 160d1b14e7..02d5371c5d 100644 --- a/man/runlevel.xml +++ b/man/runlevel.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml index 4ea88e43d7..31115a5d69 100644 --- a/man/sd-daemon.xml +++ b/man/sd-daemon.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd-login.xml b/man/sd-login.xml index 3fc0e16f69..acb78ac689 100644 --- a/man/sd-login.xml +++ b/man/sd-login.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd-readahead.xml b/man/sd-readahead.xml index 7fb8634120..4eed56ad32 100644 --- a/man/sd-readahead.xml +++ b/man/sd-readahead.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_booted.xml b/man/sd_booted.xml index 141625d9ad..62d6e57415 100644 --- a/man/sd_booted.xml +++ b/man/sd_booted.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml index 2ac76500ec..d30d193a59 100644 --- a/man/sd_get_seats.xml +++ b/man/sd_get_seats.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml index 4db512012c..289e1ba138 100644 --- a/man/sd_is_fifo.xml +++ b/man/sd_is_fifo.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml index c3c70a0df0..e76630e4ff 100644 --- a/man/sd_listen_fds.xml +++ b/man/sd_listen_fds.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml index de484329a9..4642e99f74 100644 --- a/man/sd_login_monitor_new.xml +++ b/man/sd_login_monitor_new.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_notify.xml b/man/sd_notify.xml index 9d9ea4132f..eb449555cb 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml index 94f5330222..9a1b1997d9 100644 --- a/man/sd_pid_get_session.xml +++ b/man/sd_pid_get_session.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_readahead.xml b/man/sd_readahead.xml index 2e7e09c5ec..2a92727881 100644 --- a/man/sd_readahead.xml +++ b/man/sd_readahead.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml index acc6ee4ea7..997c388901 100644 --- a/man/sd_seat_get_active.xml +++ b/man/sd_seat_get_active.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml index afdeed55d6..45151aaaf9 100644 --- a/man/sd_session_is_active.xml +++ b/man/sd_session_is_active.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml index 9249021aa1..c5096e885b 100644 --- a/man/sd_uid_get_state.xml +++ b/man/sd_uid_get_state.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/shutdown.xml b/man/shutdown.xml index c8c4b54620..d54fcb25ab 100644 --- a/man/shutdown.xml +++ b/man/shutdown.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml index 20f2e24820..4f30276ad4 100644 --- a/man/sysctl.d.xml +++ b/man/sysctl.d.xml @@ -7,16 +7,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemctl.xml b/man/systemctl.xml index 84f1b1cd60..dd0ff786ec 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-ask-password.xml b/man/systemd-ask-password.xml index c607b1a367..f09b38cd8d 100644 --- a/man/systemd-ask-password.xml +++ b/man/systemd-ask-password.xml @@ -8,16 +8,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-cat.xml b/man/systemd-cat.xml index 350a345d43..8acf9b7781 100644 --- a/man/systemd-cat.xml +++ b/man/systemd-cat.xml @@ -8,16 +8,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-cgls.xml b/man/systemd-cgls.xml index 1e53147e1b..fb9f06b307 100644 --- a/man/systemd-cgls.xml +++ b/man/systemd-cgls.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml index 2d67ae5ef4..9322fb0920 100644 --- a/man/systemd-cgtop.xml +++ b/man/systemd-cgtop.xml @@ -8,16 +8,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml index 49b92f6891..b6b236ac7e 100644 --- a/man/systemd-machine-id-setup.xml +++ b/man/systemd-machine-id-setup.xml @@ -8,16 +8,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-notify.xml b/man/systemd-notify.xml index c5ffafe895..073bc1313e 100644 --- a/man/systemd-notify.xml +++ b/man/systemd-notify.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml index dbd2ff5a8a..2a26b1ef18 100644 --- a/man/systemd-nspawn.xml +++ b/man/systemd-nspawn.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml index bbb80b2f98..f58913d0c2 100644 --- a/man/systemd-tmpfiles.xml +++ b/man/systemd-tmpfiles.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.automount.xml b/man/systemd.automount.xml index 754d1e37f3..bf4b5d8214 100644 --- a/man/systemd.automount.xml +++ b/man/systemd.automount.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.conf.xml b/man/systemd.conf.xml index c7890287b5..d05a30bd48 100644 --- a/man/systemd.conf.xml +++ b/man/systemd.conf.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.device.xml b/man/systemd.device.xml index 63863bebdf..78cddd6518 100644 --- a/man/systemd.device.xml +++ b/man/systemd.device.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index e6f49c9fd0..219733be37 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml index e638893b63..99b1caab9b 100644 --- a/man/systemd.journal-fields.xml +++ b/man/systemd.journal-fields.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index 8f1cc514cf..2352b6a8fe 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.path.xml b/man/systemd.path.xml index 5b1ff75f7a..01082ad61d 100644 --- a/man/systemd.path.xml +++ b/man/systemd.path.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 837a992ba4..258b059efa 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.snapshot.xml b/man/systemd.snapshot.xml index a3e23225c6..db3343af67 100644 --- a/man/systemd.snapshot.xml +++ b/man/systemd.snapshot.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index d9921e496d..d3762cd63d 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 4c64a0fef2..39c3802210 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml index ab00f9f318..30a15ecfc3 100644 --- a/man/systemd.swap.xml +++ b/man/systemd.swap.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.target.xml b/man/systemd.target.xml index 6b1dbfbde3..61eeb7fd8a 100644 --- a/man/systemd.target.xml +++ b/man/systemd.target.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml index 9b6b486bf4..0b204353f4 100644 --- a/man/systemd.timer.xml +++ b/man/systemd.timer.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 3cc126b12a..3fc7f78198 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/systemd.xml b/man/systemd.xml index aef65e30c1..d179273caa 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/telinit.xml b/man/telinit.xml index fec059aa66..4c6064f54a 100644 --- a/man/telinit.xml +++ b/man/telinit.xml @@ -8,16 +8,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/timezone.xml b/man/timezone.xml index 4e33279158..dedb7d90ff 100644 --- a/man/timezone.xml +++ b/man/timezone.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index f70bf0ef9f..5d4b2ac6d4 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -7,16 +7,16 @@ Copyright 2010 Brandon Philips systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/man/vconsole.conf.xml b/man/vconsole.conf.xml index a73db00d1c..72f1530620 100644 --- a/man/vconsole.conf.xml +++ b/man/vconsole.conf.xml @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . --> diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in index d306f71b63..1d53735c82 100644 --- a/rules/99-systemd.rules.in +++ b/rules/99-systemd.rules.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. ACTION=="remove", GOTO="systemd_end" diff --git a/src/Makefile b/src/Makefile index bc7e9fa363..9d07505194 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,16 +3,16 @@ # Copyright 2010 Lennart Poettering # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. +# Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . # This file is a dirty trick to simplify compilation from within diff --git a/src/ac-power.c b/src/ac-power.c index 24a68e717e..37313cf144 100644 --- a/src/ac-power.c +++ b/src/ac-power.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/ask-password-api.c b/src/ask-password-api.c index 4b50d28d30..55be807cf2 100644 --- a/src/ask-password-api.c +++ b/src/ask-password-api.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ #include diff --git a/src/ask-password.c b/src/ask-password.c index 5162f62eee..5f675700f8 100644 --- a/src/ask-password.c +++ b/src/ask-password.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c index 3c8d815d64..5bd763339e 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/bridge.c b/src/bridge.c index bfb38a8bb4..f926fe5538 100644 --- a/src/bridge.c +++ b/src/bridge.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cgls.c b/src/cgls.c index d5417f9505..fd02d52c23 100644 --- a/src/cgls.c +++ b/src/cgls.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cgroup-show.c b/src/cgroup-show.c index ee2a241c9f..550a2f5f31 100644 --- a/src/cgroup-show.c +++ b/src/cgroup-show.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cgroup-show.h b/src/cgroup-show.h index 992e17b986..5433f46a53 100644 --- a/src/cgroup-show.h +++ b/src/cgroup-show.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cgroups-agent.c b/src/cgroups-agent.c index 1bbc8827d7..7a6173e2a2 100644 --- a/src/cgroups-agent.c +++ b/src/cgroups-agent.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cgtop.c b/src/cgtop.c index 8b8617dc1c..1fe247c667 100644 --- a/src/cgtop.c +++ b/src/cgtop.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/ask-password-api.h b/src/core/ask-password-api.h index fec8625a0f..155afad33b 100644 --- a/src/core/ask-password-api.h +++ b/src/core/ask-password-api.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/automount.c b/src/core/automount.c index 6857a6fd76..11c217beb9 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/automount.h b/src/core/automount.h index 19baee208b..5704502ef7 100644 --- a/src/core/automount.h +++ b/src/core/automount.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/build.h b/src/core/build.h index 0619013141..4ccfab1361 100644 --- a/src/core/build.h +++ b/src/core/build.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/bus-errors.h b/src/core/bus-errors.h index 82d4e99eef..a6f055f099 100644 --- a/src/core/bus-errors.h +++ b/src/core/bus-errors.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/cgroup-attr.c b/src/core/cgroup-attr.c index 474a6865c4..71af09cf87 100644 --- a/src/core/cgroup-attr.c +++ b/src/core/cgroup-attr.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/cgroup-attr.h b/src/core/cgroup-attr.h index 63a73b8101..2b3c1aea9e 100644 --- a/src/core/cgroup-attr.h +++ b/src/core/cgroup-attr.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 1f6139e25f..ef9b02f463 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 5faa7dc0f7..de248fbca3 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/condition.c b/src/core/condition.c index 2b51a16f17..5dad5248bb 100644 --- a/src/core/condition.c +++ b/src/core/condition.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/condition.h b/src/core/condition.h index 71b1c6761e..2a44ba681f 100644 --- a/src/core/condition.h +++ b/src/core/condition.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-automount.c b/src/core/dbus-automount.c index 8e45f81fcf..b93e3ea35f 100644 --- a/src/core/dbus-automount.c +++ b/src/core/dbus-automount.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-automount.h b/src/core/dbus-automount.h index 2fc8345048..6849244b43 100644 --- a/src/core/dbus-automount.h +++ b/src/core/dbus-automount.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-device.c b/src/core/dbus-device.c index b39fb9d381..dfbbafb66d 100644 --- a/src/core/dbus-device.c +++ b/src/core/dbus-device.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-device.h b/src/core/dbus-device.h index fba270b4e6..068adee5b8 100644 --- a/src/core/dbus-device.h +++ b/src/core/dbus-device.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 1fd2b21336..ef55ef12b9 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-execute.h b/src/core/dbus-execute.h index 03cd69d126..b8bbe1c9f2 100644 --- a/src/core/dbus-execute.h +++ b/src/core/dbus-execute.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-job.c b/src/core/dbus-job.c index ab6d610243..1b86e96624 100644 --- a/src/core/dbus-job.c +++ b/src/core/dbus-job.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-job.h b/src/core/dbus-job.h index 103c2ff3ec..1ee0a42793 100644 --- a/src/core/dbus-job.h +++ b/src/core/dbus-job.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-loop.h b/src/core/dbus-loop.h index 0bbdfe5925..3902b354cf 100644 --- a/src/core/dbus-loop.h +++ b/src/core/dbus-loop.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 3bf0c07b88..46b47849d2 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-manager.h b/src/core/dbus-manager.h index 2eb2fbbed6..0563b324f3 100644 --- a/src/core/dbus-manager.h +++ b/src/core/dbus-manager.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-mount.c b/src/core/dbus-mount.c index 35d6ea7a1d..f6db4682af 100644 --- a/src/core/dbus-mount.c +++ b/src/core/dbus-mount.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-mount.h b/src/core/dbus-mount.h index b5613fa7b6..097421396e 100644 --- a/src/core/dbus-mount.h +++ b/src/core/dbus-mount.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-path.c b/src/core/dbus-path.c index 5506784c38..b77b5191c9 100644 --- a/src/core/dbus-path.c +++ b/src/core/dbus-path.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-path.h b/src/core/dbus-path.h index 2888400a13..db2d5b9161 100644 --- a/src/core/dbus-path.h +++ b/src/core/dbus-path.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index d840415417..e0e5ffcbfd 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-service.h b/src/core/dbus-service.h index d6eab65c52..27f65f5c98 100644 --- a/src/core/dbus-service.h +++ b/src/core/dbus-service.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-snapshot.c b/src/core/dbus-snapshot.c index e69388a524..7ff0bca2c8 100644 --- a/src/core/dbus-snapshot.c +++ b/src/core/dbus-snapshot.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-snapshot.h b/src/core/dbus-snapshot.h index 0b82279f1c..fea13872aa 100644 --- a/src/core/dbus-snapshot.h +++ b/src/core/dbus-snapshot.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index 2e3342cb55..80d19dd1bd 100644 --- a/src/core/dbus-socket.c +++ b/src/core/dbus-socket.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-socket.h b/src/core/dbus-socket.h index 069a2f5df0..eafb3af6b8 100644 --- a/src/core/dbus-socket.h +++ b/src/core/dbus-socket.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-swap.c b/src/core/dbus-swap.c index 09cd1e8b9c..f327ca8b02 100644 --- a/src/core/dbus-swap.c +++ b/src/core/dbus-swap.c @@ -7,16 +7,16 @@ Copyright 2010 Maarten Lankhorst systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-swap.h b/src/core/dbus-swap.h index 15b914726b..196756534b 100644 --- a/src/core/dbus-swap.h +++ b/src/core/dbus-swap.h @@ -10,16 +10,16 @@ Copyright 2010 Maarten Lankhorst systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-target.c b/src/core/dbus-target.c index 55cf862de0..67ffff870f 100644 --- a/src/core/dbus-target.c +++ b/src/core/dbus-target.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-target.h b/src/core/dbus-target.h index 13d38764a2..f11cec7d21 100644 --- a/src/core/dbus-target.h +++ b/src/core/dbus-target.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index b396aed047..c76c2e0500 100644 --- a/src/core/dbus-timer.c +++ b/src/core/dbus-timer.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-timer.h b/src/core/dbus-timer.h index e692e12fcb..daa26c8512 100644 --- a/src/core/dbus-timer.h +++ b/src/core/dbus-timer.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index c7532c7255..0484d75829 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h index 4f19a808bf..e6d549c0fb 100644 --- a/src/core/dbus-unit.h +++ b/src/core/dbus-unit.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus.c b/src/core/dbus.c index ddf91f225a..fe73b0a434 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/dbus.h b/src/core/dbus.h index bd539d0e72..ed0b1c7cec 100644 --- a/src/core/dbus.h +++ b/src/core/dbus.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/device.c b/src/core/device.c index 0575379d80..88ce0cdd18 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/device.h b/src/core/device.h index a05c3d37b0..fa806575c9 100644 --- a/src/core/device.h +++ b/src/core/device.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/execute.c b/src/core/execute.c index 179ca7e55c..8ae3923c5d 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/execute.h b/src/core/execute.h index 0d7e7dd65d..fc4c71e534 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/fdset.c b/src/core/fdset.c index e67fe6fabf..fe918cd8cc 100644 --- a/src/core/fdset.c +++ b/src/core/fdset.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/fdset.h b/src/core/fdset.h index 044a9e6d1f..bb58172430 100644 --- a/src/core/fdset.h +++ b/src/core/fdset.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/ima-setup.c b/src/core/ima-setup.c index 03e43dcf16..e8cc1ba8b6 100644 --- a/src/core/ima-setup.c +++ b/src/core/ima-setup.c @@ -8,16 +8,16 @@ TORSEC group -- http://security.polito.it systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/ima-setup.h b/src/core/ima-setup.h index 7d677cf852..8de64bfdb1 100644 --- a/src/core/ima-setup.h +++ b/src/core/ima-setup.h @@ -11,16 +11,16 @@ TORSEC group -- http://security.polito.it systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/job.c b/src/core/job.c index bae6ab9f32..781f83e175 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/job.h b/src/core/job.h index 60a43e074d..3ce2d65a0d 100644 --- a/src/core/job.h +++ b/src/core/job.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c index debf87130d..22ff067d58 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/kmod-setup.h b/src/core/kmod-setup.h index 496aef3e15..faaaa9ab41 100644 --- a/src/core/kmod-setup.h +++ b/src/core/kmod-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c index d869ee0c76..4323147a01 100644 --- a/src/core/load-dropin.c +++ b/src/core/load-dropin.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/load-dropin.h b/src/core/load-dropin.h index cf3a799381..0b613c53f1 100644 --- a/src/core/load-dropin.h +++ b/src/core/load-dropin.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 637c82b427..1665be82a0 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h index 79fc76da92..03e13a9c8c 100644 --- a/src/core/load-fragment.h +++ b/src/core/load-fragment.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c index 7f692e9c5d..aab454e83b 100644 --- a/src/core/locale-setup.c +++ b/src/core/locale-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/locale-setup.h b/src/core/locale-setup.h index 09a6bc682d..418fdfae1a 100644 --- a/src/core/locale-setup.h +++ b/src/core/locale-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/manager.c b/src/core/manager.c index 312527aa9c..6be8e8fbe2 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/manager.h b/src/core/manager.h index 9ecc926cbf..39e16aee98 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/mount.c b/src/core/mount.c index 7dbeaf9cf0..6c768a3d02 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/mount.h b/src/core/mount.h index 9318444249..3153a2a99d 100644 --- a/src/core/mount.h +++ b/src/core/mount.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/namespace.c b/src/core/namespace.c index 09bc82909f..da555cd23c 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/namespace.h b/src/core/namespace.h index 7cf1dedd32..eb912e9e2d 100644 --- a/src/core/namespace.h +++ b/src/core/namespace.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/path.c b/src/core/path.c index 1d50885ed4..0f23f1494d 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/path.h b/src/core/path.h index efb6b5eb44..1b4d0d49d4 100644 --- a/src/core/path.h +++ b/src/core/path.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/polkit.h b/src/core/polkit.h index 0d08194b26..5aecfff635 100644 --- a/src/core/polkit.h +++ b/src/core/polkit.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c index a7e1fa4007..d8643bc162 100644 --- a/src/core/selinux-setup.c +++ b/src/core/selinux-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/selinux-setup.h b/src/core/selinux-setup.h index 6b8fe00b7d..e9a45f589a 100644 --- a/src/core/selinux-setup.h +++ b/src/core/selinux-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/service.c b/src/core/service.c index bf2e0a9d98..1c04ed338a 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/service.h b/src/core/service.h index 60b10516eb..eb41314931 100644 --- a/src/core/service.h +++ b/src/core/service.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/snapshot.c b/src/core/snapshot.c index 82ec5104db..5bb3c4a8fd 100644 --- a/src/core/snapshot.c +++ b/src/core/snapshot.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/snapshot.h b/src/core/snapshot.h index bf92e99a8b..9c63216421 100644 --- a/src/core/snapshot.h +++ b/src/core/snapshot.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/socket.c b/src/core/socket.c index 5b24b3422b..37a0236156 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/socket.h b/src/core/socket.h index 6470d8b63e..576506fef7 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/special.h b/src/core/special.h index 43e2e6f6d7..f1ff1b94c0 100644 --- a/src/core/special.h +++ b/src/core/special.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/swap.c b/src/core/swap.c index 9c72732b94..6331864d8c 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/swap.h b/src/core/swap.h index 62d08da30b..5c0ef73026 100644 --- a/src/core/swap.h +++ b/src/core/swap.h @@ -10,16 +10,16 @@ Copyright 2010 Maarten Lankhorst systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/sysfs-show.h b/src/core/sysfs-show.h index 9939e8b069..51d73fb151 100644 --- a/src/core/sysfs-show.h +++ b/src/core/sysfs-show.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/target.c b/src/core/target.c index 6c1e0c368a..f99b2a5af0 100644 --- a/src/core/target.c +++ b/src/core/target.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/target.h b/src/core/target.h index 5b97c86fbf..62bc34382b 100644 --- a/src/core/target.h +++ b/src/core/target.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/tcpwrap.c b/src/core/tcpwrap.c index 0aab1427dd..6c630fac60 100644 --- a/src/core/tcpwrap.c +++ b/src/core/tcpwrap.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/tcpwrap.h b/src/core/tcpwrap.h index 4d4553e8ae..0c87b111ee 100644 --- a/src/core/tcpwrap.h +++ b/src/core/tcpwrap.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/timer.c b/src/core/timer.c index e318fee201..6bd4cc359c 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/timer.h b/src/core/timer.h index f5c5c64f25..985b460ab1 100644 --- a/src/core/timer.h +++ b/src/core/timer.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/unit.c b/src/core/unit.c index 9e33701c8f..df79fe3a69 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/core/unit.h b/src/core/unit.h index 756f465da3..d8f4644ca9 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 5e92fb9af8..4d10373a79 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index ac7b6d6c38..f214d60d56 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/dbus-common.c b/src/dbus-common.c index fc97108e95..038fdd41a0 100644 --- a/src/dbus-common.c +++ b/src/dbus-common.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/dbus-common.h b/src/dbus-common.h index 892d1297fe..38d8e6538c 100644 --- a/src/dbus-common.h +++ b/src/dbus-common.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/dbus-loop.c b/src/dbus-loop.c index 8eb1d171a7..da0a00443a 100644 --- a/src/dbus-loop.c +++ b/src/dbus-loop.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/def.h b/src/def.h index 20aaa7c580..be969fca2e 100644 --- a/src/def.h +++ b/src/def.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/detect-virt.c b/src/detect-virt.c index 79cad5d8ab..b3d8fb53a4 100644 --- a/src/detect-virt.c +++ b/src/detect-virt.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/fsck.c b/src/fsck.c index d3ac83c25e..f25ec49442 100644 --- a/src/fsck.c +++ b/src/fsck.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/getty-generator.c b/src/getty-generator.c index dc979e9e8e..58ad8a6635 100644 --- a/src/getty-generator.c +++ b/src/getty-generator.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/hostname-setup.c b/src/hostname-setup.c index 2c2f10cfd1..550d3c2113 100644 --- a/src/hostname-setup.c +++ b/src/hostname-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/hostname-setup.h b/src/hostname-setup.h index ff11df945e..9550b8c5ab 100644 --- a/src/hostname-setup.h +++ b/src/hostname-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index ad72440845..67c56f3313 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/hostname/org.freedesktop.hostname1.conf b/src/hostname/org.freedesktop.hostname1.conf index eb241c022f..46b4aadc83 100644 --- a/src/hostname/org.freedesktop.hostname1.conf +++ b/src/hostname/org.freedesktop.hostname1.conf @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/hostname/org.freedesktop.hostname1.policy.in b/src/hostname/org.freedesktop.hostname1.policy.in index 7d56b22c28..df082d8e6f 100644 --- a/src/hostname/org.freedesktop.hostname1.policy.in +++ b/src/hostname/org.freedesktop.hostname1.policy.in @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/hostname/org.freedesktop.hostname1.service b/src/hostname/org.freedesktop.hostname1.service index 42e4adb2c9..6041ed60ca 100644 --- a/src/hostname/org.freedesktop.hostname1.service +++ b/src/hostname/org.freedesktop.hostname1.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [D-BUS Service] diff --git a/src/initctl.c b/src/initctl.c index 53d03a9e10..0eb008d9e6 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/install.c b/src/install.c index 45018043c2..080ae6a01d 100644 --- a/src/install.c +++ b/src/install.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty . ***/ diff --git a/src/install.h b/src/install.h index 0505a82f00..d365c01bc7 100644 --- a/src/install.h +++ b/src/install.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/cat.c b/src/journal/cat.c index f0a666642c..cdd46bcf5b 100644 --- a/src/journal/cat.c +++ b/src/journal/cat.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/compress.c b/src/journal/compress.c index ff906581f0..75e70c5ffa 100644 --- a/src/journal/compress.c +++ b/src/journal/compress.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/compress.h b/src/journal/compress.h index f187a6e00c..1cdfe3d481 100644 --- a/src/journal/compress.h +++ b/src/journal/compress.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/coredump.c b/src/journal/coredump.c index 5ecdef37a7..db805d6cb5 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-def.h b/src/journal/journal-def.h index 9cb8051082..d1174456cb 100644 --- a/src/journal/journal-def.h +++ b/src/journal/journal-def.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index be92c90447..973c51f802 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 57d66cafc5..aeb6d46c79 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h index 17f1d317c7..bcffa35055 100644 --- a/src/journal/journal-internal.h +++ b/src/journal/journal-internal.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-rate-limit.c b/src/journal/journal-rate-limit.c index 243ff2a378..25ea437ea3 100644 --- a/src/journal/journal-rate-limit.c +++ b/src/journal/journal-rate-limit.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-rate-limit.h b/src/journal/journal-rate-limit.h index 2bbdd5f9fe..cbf526c64f 100644 --- a/src/journal/journal-rate-limit.h +++ b/src/journal/journal-rate-limit.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c index 32e94af91f..4c9753cec1 100644 --- a/src/journal/journal-send.c +++ b/src/journal/journal-send.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 01dceca237..ebc2a6aa49 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journald.c b/src/journal/journald.c index ea23cff26e..1549e6e039 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/journald.conf b/src/journal/journald.conf index 710b0aa941..26bdc36baa 100644 --- a/src/journal/journald.conf +++ b/src/journal/journald.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # See system-journald.conf(5) for details diff --git a/src/journal/journald.h b/src/journal/journald.h index 7840fd5730..3c69f7ec24 100644 --- a/src/journal/journald.h +++ b/src/journal/journald.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/libsystemd-journal.pc.in b/src/journal/libsystemd-journal.pc.in index 13cc8208df..9883595644 100644 --- a/src/journal/libsystemd-journal.pc.in +++ b/src/journal/libsystemd-journal.pc.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. prefix=@prefix@ diff --git a/src/journal/libsystemd-journal.sym b/src/journal/libsystemd-journal.sym index cd434aea26..3ebcd28aa1 100644 --- a/src/journal/libsystemd-journal.sym +++ b/src/journal/libsystemd-journal.sym @@ -2,8 +2,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. ***/ diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 92ba57822b..9d381e044c 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/test-journal-send.c b/src/journal/test-journal-send.c index 2f9987dcde..d682abbf01 100644 --- a/src/journal/test-journal-send.c +++ b/src/journal/test-journal-send.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/journal/test-journal.c b/src/journal/test-journal.c index a023509b70..39f4c16778 100644 --- a/src/journal/test-journal.c +++ b/src/journal/test-journal.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/libsystemd-id128.pc.in b/src/libsystemd-id128.pc.in index 4d984fdff5..bb65ffde33 100644 --- a/src/libsystemd-id128.pc.in +++ b/src/libsystemd-id128.pc.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. prefix=@prefix@ diff --git a/src/libsystemd-id128.sym b/src/libsystemd-id128.sym index 2373fe6646..604c0026c6 100644 --- a/src/libsystemd-id128.sym +++ b/src/libsystemd-id128.sym @@ -2,8 +2,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. ***/ diff --git a/src/locale/localed.c b/src/locale/localed.c index e6aaa5cab3..d582a9cbab 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/locale/org.freedesktop.locale1.conf b/src/locale/org.freedesktop.locale1.conf index 68273311e7..79d0ecd2bb 100644 --- a/src/locale/org.freedesktop.locale1.conf +++ b/src/locale/org.freedesktop.locale1.conf @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/locale/org.freedesktop.locale1.policy.in b/src/locale/org.freedesktop.locale1.policy.in index 1ac50bf86c..91296c2356 100644 --- a/src/locale/org.freedesktop.locale1.policy.in +++ b/src/locale/org.freedesktop.locale1.policy.in @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/locale/org.freedesktop.locale1.service b/src/locale/org.freedesktop.locale1.service index 29bd582459..025f9a0fc2 100644 --- a/src/locale/org.freedesktop.locale1.service +++ b/src/locale/org.freedesktop.locale1.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [D-BUS Service] diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules index 18dd4433e7..ca7ca133a3 100644 --- a/src/login/70-uaccess.rules +++ b/src/login/70-uaccess.rules @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. ACTION=="remove", GOTO="uaccess_end" diff --git a/src/login/71-seat.rules b/src/login/71-seat.rules index 04ccac7570..52750f7885 100644 --- a/src/login/71-seat.rules +++ b/src/login/71-seat.rules @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. ACTION=="remove", GOTO="seat_end" diff --git a/src/login/73-seat-late.rules.in b/src/login/73-seat-late.rules.in index 933c952b97..901df750fd 100644 --- a/src/login/73-seat-late.rules.in +++ b/src/login/73-seat-late.rules.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. ACTION=="remove", GOTO="seat_late_end" diff --git a/src/login/libsystemd-login.pc.in b/src/login/libsystemd-login.pc.in index cd36a9cb35..7b2a7245fc 100644 --- a/src/login/libsystemd-login.pc.in +++ b/src/login/libsystemd-login.pc.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. prefix=@prefix@ diff --git a/src/login/libsystemd-login.sym b/src/login/libsystemd-login.sym index a5e6c1e756..0fd61e000b 100644 --- a/src/login/libsystemd-login.sym +++ b/src/login/libsystemd-login.sym @@ -2,8 +2,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. ***/ diff --git a/src/login/loginctl.c b/src/login/loginctl.c index 2633b47e1c..c4604909cd 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c index eb8a48d191..cb045a9928 100644 --- a/src/login/logind-acl.c +++ b/src/login/logind-acl.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-acl.h b/src/login/logind-acl.h index 72740f5b95..ea34590bd1 100644 --- a/src/login/logind-acl.h +++ b/src/login/logind-acl.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 1c6dc979ed..6b013b9fb2 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-device.c b/src/login/logind-device.c index bbd370fbff..828e1efe4a 100644 --- a/src/login/logind-device.c +++ b/src/login/logind-device.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-device.h b/src/login/logind-device.h index e25a5344ef..bdb9741727 100644 --- a/src/login/logind-device.h +++ b/src/login/logind-device.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c index 95ef5ffdb5..4bf9bf7b1f 100644 --- a/src/login/logind-seat-dbus.c +++ b/src/login/logind-seat-dbus.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 906ede6cda..1bae6f6e07 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-seat.h b/src/login/logind-seat.h index 3b2c7f0965..d41320da46 100644 --- a/src/login/logind-seat.h +++ b/src/login/logind-seat.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index 102f8ac99b..0780f3f42a 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 641678210f..cbc4b5cf3c 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-session.h b/src/login/logind-session.h index d0b8c87fab..1afbdcc410 100644 --- a/src/login/logind-session.h +++ b/src/login/logind-session.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c index a9d680f899..2d3375a09c 100644 --- a/src/login/logind-user-dbus.c +++ b/src/login/logind-user-dbus.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 92ba2c2208..27f78adae1 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind-user.h b/src/login/logind-user.h index db9a5f6a34..78249ac647 100644 --- a/src/login/logind-user.h +++ b/src/login/logind-user.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind.c b/src/login/logind.c index a54195cebb..67117405e6 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/logind.conf b/src/login/logind.conf index 24b9d77a67..6a2cefa576 100644 --- a/src/login/logind.conf +++ b/src/login/logind.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # See logind.conf(5) for details diff --git a/src/login/logind.h b/src/login/logind.h index 9586793ad4..a3080371d0 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c index 96554462a8..32d868888f 100644 --- a/src/login/multi-seat-x.c +++ b/src/login/multi-seat-x.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/org.freedesktop.login1.conf b/src/login/org.freedesktop.login1.conf index 9ef852bb73..7ebf9ea99c 100644 --- a/src/login/org.freedesktop.login1.conf +++ b/src/login/org.freedesktop.login1.conf @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/login/org.freedesktop.login1.policy.in b/src/login/org.freedesktop.login1.policy.in index adc904886d..fb5c539d50 100644 --- a/src/login/org.freedesktop.login1.policy.in +++ b/src/login/org.freedesktop.login1.policy.in @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/login/org.freedesktop.login1.service b/src/login/org.freedesktop.login1.service index 4a64177e30..762dae2bb3 100644 --- a/src/login/org.freedesktop.login1.service +++ b/src/login/org.freedesktop.login1.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [D-BUS Service] diff --git a/src/login/pam-module.c b/src/login/pam-module.c index 1edb91c804..0727164db2 100644 --- a/src/login/pam-module.c +++ b/src/login/pam-module.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/sd-login.c b/src/login/sd-login.c index 887c421009..8e5667c705 100644 --- a/src/login/sd-login.c +++ b/src/login/sd-login.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c index b8b356d77b..b0edc33b80 100644 --- a/src/login/sysfs-show.c +++ b/src/login/sysfs-show.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/test-login.c b/src/login/test-login.c index dd8404285b..707cf21589 100644 --- a/src/login/test-login.c +++ b/src/login/test-login.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/uaccess.c b/src/login/uaccess.c index e1af5bf431..2c530c8f39 100644 --- a/src/login/uaccess.c +++ b/src/login/uaccess.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/login/user-sessions.c b/src/login/user-sessions.c index 64aa3bb1c6..98b36c60e8 100644 --- a/src/login/user-sessions.c +++ b/src/login/user-sessions.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/logs-show.c b/src/logs-show.c index 42d84edbaf..fedb4532db 100644 --- a/src/logs-show.c +++ b/src/logs-show.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/logs-show.h b/src/logs-show.h index db9c7e34ab..94caed5579 100644 --- a/src/logs-show.h +++ b/src/logs-show.h @@ -9,16 +9,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/loopback-setup.c b/src/loopback-setup.c index b6359def7f..46c1fc843a 100644 --- a/src/loopback-setup.c +++ b/src/loopback-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/loopback-setup.h b/src/loopback-setup.h index 81f4529630..cbb969e1e4 100644 --- a/src/loopback-setup.h +++ b/src/loopback-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/machine-id-main.c b/src/machine-id-main.c index 03970a2b06..ca8af596f7 100644 --- a/src/machine-id-main.c +++ b/src/machine-id-main.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/machine-id-setup.c b/src/machine-id-setup.c index 94198cb83b..9e84ac0cb9 100644 --- a/src/machine-id-setup.c +++ b/src/machine-id-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/machine-id-setup.h b/src/machine-id-setup.h index 4d0a9cf331..16f45d86d3 100644 --- a/src/machine-id-setup.h +++ b/src/machine-id-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/main.c b/src/main.c index 4e800e7430..8c115bd548 100644 --- a/src/main.c +++ b/src/main.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/missing.h b/src/missing.h index 095bf1fe04..5951e06cfc 100644 --- a/src/missing.h +++ b/src/missing.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/modules-load.c b/src/modules-load.c index ff1f690aac..0f2144c2ed 100644 --- a/src/modules-load.c +++ b/src/modules-load.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/mount-setup.c b/src/mount-setup.c index dd7938ebe7..52fe523674 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/mount-setup.h b/src/mount-setup.h index c1a27ba6bd..720b66f76c 100644 --- a/src/mount-setup.h +++ b/src/mount-setup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/notify.c b/src/notify.c index 943808eb0d..ffc8dfeb9b 100644 --- a/src/notify.c +++ b/src/notify.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/nspawn.c b/src/nspawn.c index 8c4f49a1ed..5a04404587 100644 --- a/src/nspawn.c +++ b/src/nspawn.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/org.freedesktop.systemd1.conf b/src/org.freedesktop.systemd1.conf index 201afe65be..a07a8e1ce3 100644 --- a/src/org.freedesktop.systemd1.conf +++ b/src/org.freedesktop.systemd1.conf @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/org.freedesktop.systemd1.policy.in.in b/src/org.freedesktop.systemd1.policy.in.in index 1771314e09..51bdafac45 100644 --- a/src/org.freedesktop.systemd1.policy.in.in +++ b/src/org.freedesktop.systemd1.policy.in.in @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/org.freedesktop.systemd1.service b/src/org.freedesktop.systemd1.service index 7e1dfd47e0..d4df3e93a2 100644 --- a/src/org.freedesktop.systemd1.service +++ b/src/org.freedesktop.systemd1.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [D-BUS Service] diff --git a/src/path-lookup.c b/src/path-lookup.c index d33ebc71be..1d95f7d1f8 100644 --- a/src/path-lookup.c +++ b/src/path-lookup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/path-lookup.h b/src/path-lookup.h index fc2887d3c7..e8a5a77a7b 100644 --- a/src/path-lookup.h +++ b/src/path-lookup.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/polkit.c b/src/polkit.c index 3acbdc6135..07d18e7d5f 100644 --- a/src/polkit.c +++ b/src/polkit.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/quotacheck.c b/src/quotacheck.c index b6648b8369..e4420eeb1b 100644 --- a/src/quotacheck.c +++ b/src/quotacheck.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/random-seed.c b/src/random-seed.c index c1022c719f..d1cab8b87a 100644 --- a/src/random-seed.c +++ b/src/random-seed.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/rc-local-generator.c b/src/rc-local-generator.c index 108827d699..42d7ae41ed 100644 --- a/src/rc-local-generator.c +++ b/src/rc-local-generator.c @@ -7,16 +7,16 @@ Copyright 2011 Michal Schmidt systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c index 7e6c243b5e..3e91d5c28a 100644 --- a/src/readahead/readahead-collect.c +++ b/src/readahead/readahead-collect.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c index 67214ec379..4e8e636975 100644 --- a/src/readahead/readahead-common.c +++ b/src/readahead/readahead-common.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/readahead/readahead-common.h b/src/readahead/readahead-common.h index 9547ad201c..b4eab71b1a 100644 --- a/src/readahead/readahead-common.h +++ b/src/readahead/readahead-common.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c index 0c739c82be..7c263f6e53 100644 --- a/src/readahead/readahead-replay.c +++ b/src/readahead/readahead-replay.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/remount-api-vfs.c b/src/remount-api-vfs.c index 3e146ebb5c..6cb77c1d1a 100644 --- a/src/remount-api-vfs.c +++ b/src/remount-api-vfs.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/reply-password.c b/src/reply-password.c index 3a96049d7f..a935d0f084 100644 --- a/src/reply-password.c +++ b/src/reply-password.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/sd-id128.c b/src/sd-id128.c index b4184e1c7e..4286ae7d14 100644 --- a/src/sd-id128.c +++ b/src/sd-id128.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c index a2a9f9a22b..d1eb6f2268 100644 --- a/src/shared/acl-util.c +++ b/src/shared/acl-util.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h index 798ce43364..9f11636aa1 100644 --- a/src/shared/acl-util.h +++ b/src/shared/acl-util.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/audit.c b/src/shared/audit.c index 3850059132..e5c483ab08 100644 --- a/src/shared/audit.c +++ b/src/shared/audit.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/audit.h b/src/shared/audit.h index 3529046ff3..f2740bc42c 100644 --- a/src/shared/audit.h +++ b/src/shared/audit.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/capability.c b/src/shared/capability.c index b8002159ec..b2cd9ed75e 100644 --- a/src/shared/capability.c +++ b/src/shared/capability.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/capability.h b/src/shared/capability.h index ab7e40b601..9f9c49cf5b 100644 --- a/src/shared/capability.h +++ b/src/shared/capability.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/cgroup-label.c b/src/shared/cgroup-label.c index f9a42c679e..f132d71e21 100644 --- a/src/shared/cgroup-label.c +++ b/src/shared/cgroup-label.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index ad677d4262..86f354dbe7 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/cgroup-util.h b/src/shared/cgroup-util.h index 37e4255a9c..5da0004d81 100644 --- a/src/shared/cgroup-util.h +++ b/src/shared/cgroup-util.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index a9b01135e6..30980a3ea2 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h index be7d708171..d37029f083 100644 --- a/src/shared/conf-parser.h +++ b/src/shared/conf-parser.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c index ab8907d32c..b07a66a3e2 100644 --- a/src/shared/exit-status.c +++ b/src/shared/exit-status.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/exit-status.h b/src/shared/exit-status.h index 44ef879562..349e24fbf2 100644 --- a/src/shared/exit-status.h +++ b/src/shared/exit-status.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c index 6928118615..5d1e63208a 100644 --- a/src/shared/hashmap.c +++ b/src/shared/hashmap.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h index ab4363a7a3..fcf2cb1c81 100644 --- a/src/shared/hashmap.h +++ b/src/shared/hashmap.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/label.c b/src/shared/label.c index 2c887a0fe5..dce6f45c80 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/label.h b/src/shared/label.h index ead44837a4..ccf405bbe0 100644 --- a/src/shared/label.h +++ b/src/shared/label.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/list.h b/src/shared/list.h index 2bec8c9e73..9a491b990e 100644 --- a/src/shared/list.h +++ b/src/shared/list.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/log.c b/src/shared/log.c index 9fffc1dbc0..2151200644 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/log.h b/src/shared/log.h index 3283808ff8..b2f5f2a920 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/macro.h b/src/shared/macro.h index 19f259e4f1..1355aac908 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c index e668cc2558..3d98221296 100644 --- a/src/shared/mkdir.c +++ b/src/shared/mkdir.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/mkdir.h b/src/shared/mkdir.h index c006e7ccdb..b1477c5f63 100644 --- a/src/shared/mkdir.h +++ b/src/shared/mkdir.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/pager.c b/src/shared/pager.c index 3fc81820e9..6a85af33c4 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/pager.h b/src/shared/pager.h index b5b4998445..7d2108f73e 100644 --- a/src/shared/pager.h +++ b/src/shared/pager.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/ratelimit.c b/src/shared/ratelimit.c index 93157c7a2e..1054d52f97 100644 --- a/src/shared/ratelimit.c +++ b/src/shared/ratelimit.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/ratelimit.h b/src/shared/ratelimit.h index a6443e7f87..07e8205c81 100644 --- a/src/shared/ratelimit.h +++ b/src/shared/ratelimit.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/set.c b/src/shared/set.c index 097b9d3aae..20e457eda4 100644 --- a/src/shared/set.c +++ b/src/shared/set.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/set.h b/src/shared/set.h index 885780c4c0..a4653b3a45 100644 --- a/src/shared/set.h +++ b/src/shared/set.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/socket-label.c b/src/shared/socket-label.c index 9ab07a9b31..5158beeda8 100644 --- a/src/shared/socket-label.c +++ b/src/shared/socket-label.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index 618c928f06..471b6dc284 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/socket-util.h b/src/shared/socket-util.h index 8ccbd371cf..a5a9463f18 100644 --- a/src/shared/socket-util.h +++ b/src/shared/socket-util.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/strv.c b/src/shared/strv.c index f61680d476..18de4f8391 100644 --- a/src/shared/strv.c +++ b/src/shared/strv.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/strv.h b/src/shared/strv.h index 9becf9b575..afb31f385f 100644 --- a/src/shared/strv.h +++ b/src/shared/strv.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/utf8.c b/src/shared/utf8.c index 11619dce2f..13f0521e8c 100644 --- a/src/shared/utf8.c +++ b/src/shared/utf8.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/utf8.h b/src/shared/utf8.h index 9a72bec084..af2420fda4 100644 --- a/src/shared/utf8.h +++ b/src/shared/utf8.h @@ -9,16 +9,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/util.c b/src/shared/util.c index 7778b0a06b..a3873a9318 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/util.h b/src/shared/util.h index 062ab6dd05..3f4e49e6bc 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/virt.c b/src/shared/virt.c index 4c526ff454..b74c513d12 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shared/virt.h b/src/shared/virt.h index f55c9a68fd..0b6dc1a9bd 100644 --- a/src/shared/virt.h +++ b/src/shared/virt.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shutdown.c b/src/shutdown.c index b0c680a030..cd478b0349 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -6,16 +6,16 @@ Copyright 2010 ProFUSION embedded systems systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/shutdownd.c b/src/shutdownd.c index 9801b5e19c..0497cd41a0 100644 --- a/src/shutdownd.c +++ b/src/shutdownd.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/spawn-ask-password-agent.c b/src/spawn-ask-password-agent.c index c77c71340c..c1a9c58681 100644 --- a/src/spawn-ask-password-agent.c +++ b/src/spawn-ask-password-agent.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/spawn-ask-password-agent.h b/src/spawn-ask-password-agent.h index dae039ad05..fa5e7b0260 100644 --- a/src/spawn-ask-password-agent.h +++ b/src/spawn-ask-password-agent.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/spawn-polkit-agent.c b/src/spawn-polkit-agent.c index 97bc9f5e9e..fd72588417 100644 --- a/src/spawn-polkit-agent.c +++ b/src/spawn-polkit-agent.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/spawn-polkit-agent.h b/src/spawn-polkit-agent.h index 34131f019a..b91d20f120 100644 --- a/src/spawn-polkit-agent.h +++ b/src/spawn-polkit-agent.h @@ -9,16 +9,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/specifier.c b/src/specifier.c index a9fff88d35..ae00ae10bb 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/specifier.h b/src/specifier.h index 041166c90e..57d1fcb35c 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/sysctl.c b/src/sysctl.c index 17c6719841..57fba25605 100644 --- a/src/sysctl.c +++ b/src/sysctl.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/system.conf b/src/system.conf index 36eac07788..83c1f46814 100644 --- a/src/system.conf +++ b/src/system.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # See systemd.conf(5) for details diff --git a/src/systemctl.c b/src/systemctl.c index 7abd928389..28bdfa96a4 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/systemd-bash-completion.sh b/src/systemd-bash-completion.sh index 62601de90a..25ab0c5e97 100644 --- a/src/systemd-bash-completion.sh +++ b/src/systemd-bash-completion.sh @@ -3,8 +3,8 @@ # Copyright 2010 Ran Benita # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # systemd is distributed in the hope that it will be useful, but @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . __systemctl() { diff --git a/src/systemd.pc.in b/src/systemd.pc.in index 79470f4edd..49f65b2a65 100644 --- a/src/systemd.pc.in +++ b/src/systemd.pc.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. prefix=@prefix@ diff --git a/src/systemd/sd-id128.h b/src/systemd/sd-id128.h index af2841eb77..30cb686557 100644 --- a/src/systemd/sd-id128.h +++ b/src/systemd/sd-id128.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h index f27e461b03..72c23ba522 100644 --- a/src/systemd/sd-journal.h +++ b/src/systemd/sd-journal.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h index 6e99cfc951..f8c3c6913a 100644 --- a/src/systemd/sd-login.h +++ b/src/systemd/sd-login.h @@ -9,16 +9,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/systemd/sd-messages.h b/src/systemd/sd-messages.h index c5ac3abd0c..3f7eedd806 100644 --- a/src/systemd/sd-messages.h +++ b/src/systemd/sd-messages.h @@ -9,16 +9,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/systemd/sd-shutdown.h b/src/systemd/sd-shutdown.h index 29fcf3417e..cee4350173 100644 --- a/src/systemd/sd-shutdown.h +++ b/src/systemd/sd-shutdown.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-cgroup.c b/src/test-cgroup.c index eb189374fa..e742632032 100644 --- a/src/test-cgroup.c +++ b/src/test-cgroup.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-daemon.c b/src/test-daemon.c index 20c5d1517e..3215f0c560 100644 --- a/src/test-daemon.c +++ b/src/test-daemon.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-engine.c b/src/test-engine.c index 46a2d2cda0..11389a5ac7 100644 --- a/src/test-engine.c +++ b/src/test-engine.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-env-replace.c b/src/test-env-replace.c index 05dbacd7df..4b6b884779 100644 --- a/src/test-env-replace.c +++ b/src/test-env-replace.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-hostname.c b/src/test-hostname.c index 0a08416a17..8c1a60f940 100644 --- a/src/test-hostname.c +++ b/src/test-hostname.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-id128.c b/src/test-id128.c index 617c95568b..bfd743eca3 100644 --- a/src/test-id128.c +++ b/src/test-id128.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-install.c b/src/test-install.c index f8e87e0c74..709974f9e5 100644 --- a/src/test-install.c +++ b/src/test-install.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-job-type.c b/src/test-job-type.c index 9de21e1823..ba8b307dd3 100644 --- a/src/test-job-type.c +++ b/src/test-job-type.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-loopback.c b/src/test-loopback.c index 9784aaf24b..ab330ac840 100644 --- a/src/test-loopback.c +++ b/src/test-loopback.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-ns.c b/src/test-ns.c index e2bdfc5894..102b005880 100644 --- a/src/test-ns.c +++ b/src/test-ns.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-strv.c b/src/test-strv.c index 1d577dfd3c..5ee4447669 100644 --- a/src/test-strv.c +++ b/src/test-strv.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/test-watchdog.c b/src/test-watchdog.c index d53fddbb9d..ccb1854708 100644 --- a/src/test-watchdog.c +++ b/src/test-watchdog.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/timedate/org.freedesktop.timedate1.conf b/src/timedate/org.freedesktop.timedate1.conf index c9c221b644..36557d5841 100644 --- a/src/timedate/org.freedesktop.timedate1.conf +++ b/src/timedate/org.freedesktop.timedate1.conf @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/timedate/org.freedesktop.timedate1.policy.in b/src/timedate/org.freedesktop.timedate1.policy.in index 3d9c2081d6..dd0a54d81a 100644 --- a/src/timedate/org.freedesktop.timedate1.policy.in +++ b/src/timedate/org.freedesktop.timedate1.policy.in @@ -6,8 +6,8 @@ This file is part of systemd. systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. --> diff --git a/src/timedate/org.freedesktop.timedate1.service b/src/timedate/org.freedesktop.timedate1.service index c3120b66cb..875f4bec78 100644 --- a/src/timedate/org.freedesktop.timedate1.service +++ b/src/timedate/org.freedesktop.timedate1.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [D-BUS Service] diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 6a7d980c3e..4fbee7ccbd 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/timestamp.c b/src/timestamp.c index ce5142946a..1152f1b52e 100644 --- a/src/timestamp.c +++ b/src/timestamp.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/tmpfiles.c b/src/tmpfiles.c index c5f6fc00b3..15913089ba 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering, Kay Sievers systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c index c928b5f454..9fbd7f5fb2 100644 --- a/src/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/umount.c b/src/umount.c index 0a63d23a01..24c0947f21 100644 --- a/src/umount.c +++ b/src/umount.c @@ -6,16 +6,16 @@ Copyright 2010 ProFUSION embedded systems systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/umount.h b/src/umount.h index acdf09acf1..2e2f9c181a 100644 --- a/src/umount.h +++ b/src/umount.h @@ -9,16 +9,16 @@ Copyright 2010 ProFUSION embedded systems systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/unit-name.c b/src/unit-name.c index 1cbb804561..566cdc51cc 100644 --- a/src/unit-name.c +++ b/src/unit-name.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/unit-name.h b/src/unit-name.h index e369910aea..4dfb9fa3ce 100644 --- a/src/unit-name.h +++ b/src/unit-name.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/update-utmp.c b/src/update-utmp.c index 0d177d6164..ec07b92125 100644 --- a/src/update-utmp.c +++ b/src/update-utmp.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/user.conf b/src/user.conf index 9508a02eec..e02b46bc3a 100644 --- a/src/user.conf +++ b/src/user.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # See systemd.conf(5) for details diff --git a/src/utmp-wtmp.c b/src/utmp-wtmp.c index 217ae1e2c7..6bba325d3e 100644 --- a/src/utmp-wtmp.c +++ b/src/utmp-wtmp.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/utmp-wtmp.h b/src/utmp-wtmp.h index a5998ebb21..ab950617a1 100644 --- a/src/utmp-wtmp.h +++ b/src/utmp-wtmp.h @@ -9,16 +9,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 91967891f1..9ce6fae1da 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -6,16 +6,16 @@ Copyright 2010 Kay Sievers systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/watchdog.c b/src/watchdog.c index 372c16f317..13265e7692 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -6,16 +6,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/src/watchdog.h b/src/watchdog.h index 5ba70798ae..2e00cb9f4b 100644 --- a/src/watchdog.h +++ b/src/watchdog.h @@ -9,16 +9,16 @@ Copyright 2012 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ diff --git a/sysctl.d/coredump.conf.in b/sysctl.d/coredump.conf.in index ab19b1e988..5c791b791b 100644 --- a/sysctl.d/coredump.conf.in +++ b/sysctl.d/coredump.conf.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See sysctl.d(5) for details diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf index 9198e89dd1..92bd71b98c 100644 --- a/tmpfiles.d/legacy.conf +++ b/tmpfiles.d/legacy.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See tmpfiles.d(5) for details diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf index 2f9b038460..28362e86bc 100644 --- a/tmpfiles.d/systemd.conf +++ b/tmpfiles.d/systemd.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See tmpfiles.d(5) for details diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf index 8915b82ab5..1284fc4700 100644 --- a/tmpfiles.d/tmp.conf +++ b/tmpfiles.d/tmp.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See tmpfiles.d(5) for details diff --git a/tmpfiles.d/x11.conf b/tmpfiles.d/x11.conf index 7f81af62da..ece6a5ce98 100644 --- a/tmpfiles.d/x11.conf +++ b/tmpfiles.d/x11.conf @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See tmpfiles.d(5) for details diff --git a/units/basic.target b/units/basic.target index 0258ca0c03..c3c7ced7c6 100644 --- a/units/basic.target +++ b/units/basic.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/bluetooth.target b/units/bluetooth.target index c66718e113..6b9b5b5442 100644 --- a/units/bluetooth.target +++ b/units/bluetooth.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in index b0ced10aaa..7d0da9b860 100644 --- a/units/console-shell.service.m4.in +++ b/units/console-shell.service.m4.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/cryptsetup.target b/units/cryptsetup.target index 64ee8c6144..af38e5d673 100644 --- a/units/cryptsetup.target +++ b/units/cryptsetup.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/dev-hugepages.mount b/units/dev-hugepages.mount index 72a522e69c..fcc50736e0 100644 --- a/units/dev-hugepages.mount +++ b/units/dev-hugepages.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/dev-mqueue.mount b/units/dev-mqueue.mount index cffdaf773f..a55ac935c4 100644 --- a/units/dev-mqueue.mount +++ b/units/dev-mqueue.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/emergency.service.in b/units/emergency.service.in index 11ff472f6e..c1421ba22c 100644 --- a/units/emergency.service.in +++ b/units/emergency.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/emergency.target b/units/emergency.target index 6a99e05f03..791dbe595c 100644 --- a/units/emergency.target +++ b/units/emergency.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/fedora/halt-local.service b/units/fedora/halt-local.service index a9f6feb320..a0a3a292e7 100644 --- a/units/fedora/halt-local.service +++ b/units/fedora/halt-local.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/fedora/prefdm.service b/units/fedora/prefdm.service index 77a0e9ad7c..51da6c77f1 100644 --- a/units/fedora/prefdm.service +++ b/units/fedora/prefdm.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/fedora/rc-local.service b/units/fedora/rc-local.service index 0bef5c72ab..3b3bda9f6f 100644 --- a/units/fedora/rc-local.service +++ b/units/fedora/rc-local.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # This unit gets pulled automatically into multi-user.target by diff --git a/units/final.target b/units/final.target index 9cfda197b0..d516f38e9e 100644 --- a/units/final.target +++ b/units/final.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/frugalware/display-manager.service b/units/frugalware/display-manager.service index 2376e1977c..a5c475cd9e 100644 --- a/units/frugalware/display-manager.service +++ b/units/frugalware/display-manager.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/fsck-root.service.in b/units/fsck-root.service.in index 4086149128..f2870bdee7 100644 --- a/units/fsck-root.service.in +++ b/units/fsck-root.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/fsck@.service.in b/units/fsck@.service.in index c06684b634..4c595772de 100644 --- a/units/fsck@.service.in +++ b/units/fsck@.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/getty.target b/units/getty.target index e4435dc8e7..f1c926c72d 100644 --- a/units/getty.target +++ b/units/getty.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index 6b931fb871..762fbfe383 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/graphical.target b/units/graphical.target index f2e30341d4..2e82d6f898 100644 --- a/units/graphical.target +++ b/units/graphical.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/halt.service.in b/units/halt.service.in index 42e347043e..b746d1ea35 100644 --- a/units/halt.service.in +++ b/units/halt.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/halt.target b/units/halt.target index 04b42cd3d1..dc908805db 100644 --- a/units/halt.target +++ b/units/halt.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/http-daemon.target b/units/http-daemon.target index 45f10182e9..1de1ec4018 100644 --- a/units/http-daemon.target +++ b/units/http-daemon.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/kexec.service.in b/units/kexec.service.in index cf6bd65615..17d0344972 100644 --- a/units/kexec.service.in +++ b/units/kexec.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/kexec.target b/units/kexec.target index b77e6a43f1..4941f51c91 100644 --- a/units/kexec.target +++ b/units/kexec.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/local-fs-pre.target b/units/local-fs-pre.target index 11e67bac1c..a928c1d79e 100644 --- a/units/local-fs-pre.target +++ b/units/local-fs-pre.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/local-fs.target b/units/local-fs.target index 1886f7499d..2aa51fca8c 100644 --- a/units/local-fs.target +++ b/units/local-fs.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/mageia/prefdm.service b/units/mageia/prefdm.service index 4a896bf582..c85a7a93a8 100644 --- a/units/mageia/prefdm.service +++ b/units/mageia/prefdm.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/mail-transfer-agent.target b/units/mail-transfer-agent.target index ebb1ea125a..94d134e345 100644 --- a/units/mail-transfer-agent.target +++ b/units/mail-transfer-agent.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/mandriva/prefdm.service b/units/mandriva/prefdm.service index 4a896bf582..c85a7a93a8 100644 --- a/units/mandriva/prefdm.service +++ b/units/mandriva/prefdm.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/multi-user.target b/units/multi-user.target index 66f1a950f9..fe19cbcd0b 100644 --- a/units/multi-user.target +++ b/units/multi-user.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/network.target b/units/network.target index d97f64f674..da800da5b0 100644 --- a/units/network.target +++ b/units/network.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/nss-lookup.target b/units/nss-lookup.target index f7b0b5c955..c2d605c8a1 100644 --- a/units/nss-lookup.target +++ b/units/nss-lookup.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/nss-user-lookup.target b/units/nss-user-lookup.target index 40e214897c..0053f0608c 100644 --- a/units/nss-user-lookup.target +++ b/units/nss-user-lookup.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/plymouth-halt.service b/units/plymouth-halt.service index 2e194b360e..5dca3cc622 100644 --- a/units/plymouth-halt.service +++ b/units/plymouth-halt.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-kexec.service b/units/plymouth-kexec.service index 919c3f1294..8c36b7583b 100644 --- a/units/plymouth-kexec.service +++ b/units/plymouth-kexec.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-poweroff.service b/units/plymouth-poweroff.service index 8fcff3bab1..e69033a8e3 100644 --- a/units/plymouth-poweroff.service +++ b/units/plymouth-poweroff.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-quit-wait.service b/units/plymouth-quit-wait.service index 45c67bdabd..55a95ef02d 100644 --- a/units/plymouth-quit-wait.service +++ b/units/plymouth-quit-wait.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-quit.service b/units/plymouth-quit.service index 164499a2a6..b68b016664 100644 --- a/units/plymouth-quit.service +++ b/units/plymouth-quit.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-read-write.service b/units/plymouth-read-write.service index 09fbf7d4c4..e8ef447b74 100644 --- a/units/plymouth-read-write.service +++ b/units/plymouth-read-write.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-reboot.service b/units/plymouth-reboot.service index fb65bcc836..5c52bc6ece 100644 --- a/units/plymouth-reboot.service +++ b/units/plymouth-reboot.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/plymouth-start.service b/units/plymouth-start.service index f618257a93..1f05d5cd7b 100644 --- a/units/plymouth-start.service +++ b/units/plymouth-start.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/poweroff.service.in b/units/poweroff.service.in index 124a4c0f36..851a0f9451 100644 --- a/units/poweroff.service.in +++ b/units/poweroff.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/poweroff.target b/units/poweroff.target index d2ccf4b2c7..b81d6ee0d4 100644 --- a/units/poweroff.target +++ b/units/poweroff.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/printer.target b/units/printer.target index 14c90ff84b..b8582da7ad 100644 --- a/units/printer.target +++ b/units/printer.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount index acbbcbb0cb..6edd1f55d3 100644 --- a/units/proc-sys-fs-binfmt_misc.automount +++ b/units/proc-sys-fs-binfmt_misc.automount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/proc-sys-fs-binfmt_misc.mount b/units/proc-sys-fs-binfmt_misc.mount index 1829c2162a..ff958ca01b 100644 --- a/units/proc-sys-fs-binfmt_misc.mount +++ b/units/proc-sys-fs-binfmt_misc.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/quotacheck.service.in b/units/quotacheck.service.in index c97b7a4687..d28b533f9c 100644 --- a/units/quotacheck.service.in +++ b/units/quotacheck.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/quotaon.service b/units/quotaon.service index ef2fc8c976..f90a7fe7d9 100644 --- a/units/quotaon.service +++ b/units/quotaon.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/reboot.service.in b/units/reboot.service.in index f320fd886d..e6a8aabd9d 100644 --- a/units/reboot.service.in +++ b/units/reboot.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/reboot.target b/units/reboot.target index 41e133cb76..6d02417eb5 100644 --- a/units/reboot.target +++ b/units/reboot.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/remote-fs-pre.target b/units/remote-fs-pre.target index eca271b3be..8f688ad7af 100644 --- a/units/remote-fs-pre.target +++ b/units/remote-fs-pre.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/remote-fs.target b/units/remote-fs.target index a48f87e5dd..87455a4a99 100644 --- a/units/remote-fs.target +++ b/units/remote-fs.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/remount-rootfs.service b/units/remount-rootfs.service index 7b63752c7e..6ca057ec67 100644 --- a/units/remount-rootfs.service +++ b/units/remount-rootfs.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in index da4c4da03f..c736f83478 100644 --- a/units/rescue.service.m4.in +++ b/units/rescue.service.m4.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/rescue.target b/units/rescue.target index 5bf3f8e8ee..85099a1ee0 100644 --- a/units/rescue.target +++ b/units/rescue.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/rpcbind.target b/units/rpcbind.target index a5cea8c576..5a286ebe6a 100644 --- a/units/rpcbind.target +++ b/units/rpcbind.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 index d1d14d35e6..ed6912d034 100644 --- a/units/serial-getty@.service.m4 +++ b/units/serial-getty@.service.m4 @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/shutdown.target b/units/shutdown.target index 99a659e92f..1bbef68280 100644 --- a/units/shutdown.target +++ b/units/shutdown.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/sigpwr.target b/units/sigpwr.target index 0ca502dbbe..18a9683fb8 100644 --- a/units/sigpwr.target +++ b/units/sigpwr.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/smartcard.target b/units/smartcard.target index 28dd2bba1a..3e554a0303 100644 --- a/units/smartcard.target +++ b/units/smartcard.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/sockets.target b/units/sockets.target index 22963128d7..ab1b786870 100644 --- a/units/sockets.target +++ b/units/sockets.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/sound.target b/units/sound.target index e53221c7a6..6a17360c10 100644 --- a/units/sound.target +++ b/units/sound.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/suse/halt-local.service b/units/suse/halt-local.service index 796012c0c4..3a3a7930e2 100644 --- a/units/suse/halt-local.service +++ b/units/suse/halt-local.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/suse/rc-local.service b/units/suse/rc-local.service index 2384a18f94..0fd70e0fc9 100644 --- a/units/suse/rc-local.service +++ b/units/suse/rc-local.service @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # This unit gets pulled automatically into multi-user.target by diff --git a/units/swap.target b/units/swap.target index 26dd261d17..4e165424b2 100644 --- a/units/swap.target +++ b/units/swap.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/sys-fs-fuse-connections.mount b/units/sys-fs-fuse-connections.mount index 037471537b..6f3670155a 100644 --- a/units/sys-fs-fuse-connections.mount +++ b/units/sys-fs-fuse-connections.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/sys-kernel-config.mount b/units/sys-kernel-config.mount index d6862bf6bd..9150da4b50 100644 --- a/units/sys-kernel-config.mount +++ b/units/sys-kernel-config.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/sys-kernel-debug.mount b/units/sys-kernel-debug.mount index d9fca1ff3d..85d53072f1 100644 --- a/units/sys-kernel-debug.mount +++ b/units/sys-kernel-debug.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/sysinit.target b/units/sysinit.target index eb9a1c7cc2..5bc568ff22 100644 --- a/units/sysinit.target +++ b/units/sysinit.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/syslog.socket b/units/syslog.socket index 0e211e16e7..f644f6e38b 100644 --- a/units/syslog.socket +++ b/units/syslog.socket @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/syslog.target b/units/syslog.target index 825b26e7bf..92d2576e95 100644 --- a/units/syslog.target +++ b/units/syslog.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-ask-password-console.path b/units/systemd-ask-password-console.path index c3143d1da6..dc8ab32bcb 100644 --- a/units/systemd-ask-password-console.path +++ b/units/systemd-ask-password-console.path @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-ask-password-console.service.in b/units/systemd-ask-password-console.service.in index 5ff3ed55d7..55e3d8648e 100644 --- a/units/systemd-ask-password-console.service.in +++ b/units/systemd-ask-password-console.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-ask-password-plymouth.path b/units/systemd-ask-password-plymouth.path index 06a587620f..b938ae57cf 100644 --- a/units/systemd-ask-password-plymouth.path +++ b/units/systemd-ask-password-plymouth.path @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-ask-password-plymouth.service.in b/units/systemd-ask-password-plymouth.service.in index 92cbfdbf09..fcc2853642 100644 --- a/units/systemd-ask-password-plymouth.service.in +++ b/units/systemd-ask-password-plymouth.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-ask-password-wall.path b/units/systemd-ask-password-wall.path index 050b73b2e1..73e13616b6 100644 --- a/units/systemd-ask-password-wall.path +++ b/units/systemd-ask-password-wall.path @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-ask-password-wall.service.in b/units/systemd-ask-password-wall.service.in index d8e27bf96b..1db408e55b 100644 --- a/units/systemd-ask-password-wall.service.in +++ b/units/systemd-ask-password-wall.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in index d43497c151..267d5c3fd8 100644 --- a/units/systemd-binfmt.service.in +++ b/units/systemd-binfmt.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-hostnamed.service.in b/units/systemd-hostnamed.service.in index 6efab1e25f..1ed942fe17 100644 --- a/units/systemd-hostnamed.service.in +++ b/units/systemd-hostnamed.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-initctl.service.in b/units/systemd-initctl.service.in index 7df3aa6db3..bcadcc8d1a 100644 --- a/units/systemd-initctl.service.in +++ b/units/systemd-initctl.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-initctl.socket b/units/systemd-initctl.socket index 7a3a0236eb..66597ee107 100644 --- a/units/systemd-initctl.socket +++ b/units/systemd-initctl.socket @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in index 92606b0d88..a3c22c8ffa 100644 --- a/units/systemd-journald.service.in +++ b/units/systemd-journald.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-journald.socket b/units/systemd-journald.socket index 15fc49ef29..d613e2288f 100644 --- a/units/systemd-journald.socket +++ b/units/systemd-journald.socket @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-localed.service.in b/units/systemd-localed.service.in index 4be65df75d..ae94bee3c5 100644 --- a/units/systemd-localed.service.in +++ b/units/systemd-localed.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in index 48c1f2c3f0..a16bc81e79 100644 --- a/units/systemd-logind.service.in +++ b/units/systemd-logind.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-modules-load.service.in b/units/systemd-modules-load.service.in index 5dc373d208..72e1d70dce 100644 --- a/units/systemd-modules-load.service.in +++ b/units/systemd-modules-load.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-random-seed-load.service.in b/units/systemd-random-seed-load.service.in index a2b6a557dc..6360436021 100644 --- a/units/systemd-random-seed-load.service.in +++ b/units/systemd-random-seed-load.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-random-seed-save.service.in b/units/systemd-random-seed-save.service.in index 9a074cf3fe..219731bae5 100644 --- a/units/systemd-random-seed-save.service.in +++ b/units/systemd-random-seed-save.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-readahead-collect.service.in b/units/systemd-readahead-collect.service.in index 56ba54f0b3..63840b916b 100644 --- a/units/systemd-readahead-collect.service.in +++ b/units/systemd-readahead-collect.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-readahead-done.service.in b/units/systemd-readahead-done.service.in index d665e45f24..893a819a7f 100644 --- a/units/systemd-readahead-done.service.in +++ b/units/systemd-readahead-done.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-readahead-done.timer b/units/systemd-readahead-done.timer index d144bfaece..c64e6ea341 100644 --- a/units/systemd-readahead-done.timer +++ b/units/systemd-readahead-done.timer @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-readahead-replay.service.in b/units/systemd-readahead-replay.service.in index 7c82e408e2..ad27395d9a 100644 --- a/units/systemd-readahead-replay.service.in +++ b/units/systemd-readahead-replay.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-remount-api-vfs.service.in b/units/systemd-remount-api-vfs.service.in index f4df0ca263..d1eba4b17e 100644 --- a/units/systemd-remount-api-vfs.service.in +++ b/units/systemd-remount-api-vfs.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-shutdownd.service.in b/units/systemd-shutdownd.service.in index 657365a451..ec88b23fde 100644 --- a/units/systemd-shutdownd.service.in +++ b/units/systemd-shutdownd.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-shutdownd.socket b/units/systemd-shutdownd.socket index 7f13c9386e..c97e01a337 100644 --- a/units/systemd-shutdownd.socket +++ b/units/systemd-shutdownd.socket @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in index 6d53422630..692fa3b889 100644 --- a/units/systemd-sysctl.service.in +++ b/units/systemd-sysctl.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-timedated.service.in b/units/systemd-timedated.service.in index 90ff4432ba..4073de58e7 100644 --- a/units/systemd-timedated.service.in +++ b/units/systemd-timedated.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/systemd-tmpfiles-clean.service.in b/units/systemd-tmpfiles-clean.service.in index 3c8e72ebf5..0a8707e138 100644 --- a/units/systemd-tmpfiles-clean.service.in +++ b/units/systemd-tmpfiles-clean.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-tmpfiles-clean.timer b/units/systemd-tmpfiles-clean.timer index d8529a8d7e..c9f89e803d 100644 --- a/units/systemd-tmpfiles-clean.timer +++ b/units/systemd-tmpfiles-clean.timer @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in index f90121e12e..58c3415b1e 100644 --- a/units/systemd-tmpfiles-setup.service.in +++ b/units/systemd-tmpfiles-setup.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-update-utmp-runlevel.service.in b/units/systemd-update-utmp-runlevel.service.in index 614c759a63..0a227cd396 100644 --- a/units/systemd-update-utmp-runlevel.service.in +++ b/units/systemd-update-utmp-runlevel.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-update-utmp-shutdown.service.in b/units/systemd-update-utmp-shutdown.service.in index e7c3c04a00..4af9212700 100644 --- a/units/systemd-update-utmp-shutdown.service.in +++ b/units/systemd-update-utmp-shutdown.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-user-sessions.service.in b/units/systemd-user-sessions.service.in index a93d586a43..363093ee1d 100644 --- a/units/systemd-user-sessions.service.in +++ b/units/systemd-user-sessions.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/systemd-vconsole-setup.service.in b/units/systemd-vconsole-setup.service.in index 673fb6ccf6..ef222a5f7d 100644 --- a/units/systemd-vconsole-setup.service.in +++ b/units/systemd-vconsole-setup.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/time-sync.target b/units/time-sync.target index aa34ecb5f4..36b9e7aeea 100644 --- a/units/time-sync.target +++ b/units/time-sync.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/tmp.mount b/units/tmp.mount index de3ec1b657..7367f7e642 100644 --- a/units/tmp.mount +++ b/units/tmp.mount @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] diff --git a/units/umount.target b/units/umount.target index b9ecca6fb1..c583062911 100644 --- a/units/umount.target +++ b/units/umount.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/user/default.target b/units/user/default.target index deb310c2f7..4f9379ea5e 100644 --- a/units/user/default.target +++ b/units/user/default.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/user/exit.service.in b/units/user/exit.service.in index a20b089c9a..c785fbd64a 100644 --- a/units/user/exit.service.in +++ b/units/user/exit.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/user/exit.target b/units/user/exit.target index f34844c0d3..ffc8fad019 100644 --- a/units/user/exit.target +++ b/units/user/exit.target @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See systemd.special(7) for details diff --git a/units/user@.service.in b/units/user@.service.in index 91e3b25158..2c154953b1 100644 --- a/units/user@.service.in +++ b/units/user@.service.in @@ -1,8 +1,8 @@ # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] -- cgit v1.2.3-54-g00ecf From e0295d2651cff034ab8200156f1ece06154b7bbc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 22 Apr 2012 15:33:43 +0200 Subject: mount: don't fail if fstab doesn't exist --- src/core/mount.c | 5 +++-- src/cryptsetup/cryptsetup.c | 3 ++- src/remount-api-vfs/remount-api-vfs.c | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/core/mount.c b/src/core/mount.c index 760ffcdbf6..dbd4893bcb 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1537,8 +1537,9 @@ static int mount_load_etc_fstab(Manager *m) { assert(m); errno = 0; - if (!(f = setmntent("/etc/fstab", "r"))) - return -errno; + f = setmntent("/etc/fstab", "r"); + if (!f) + return errno == ENOENT ? 0 : -errno; while ((me = getmntent(f))) { char *where, *what; diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index f214d60d56..3ff0ddf2cc 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -190,7 +190,8 @@ static char *disk_mount_point(const char *label) { if (asprintf(&device, "/dev/mapper/%s", label) < 0) goto finish; - if (!(f = setmntent("/etc/fstab", "r"))) + f = setmntent("/etc/fstab", "r"); + if (!f) goto finish; while ((m = getmntent(f))) diff --git a/src/remount-api-vfs/remount-api-vfs.c b/src/remount-api-vfs/remount-api-vfs.c index 6cb77c1d1a..373ae25520 100644 --- a/src/remount-api-vfs/remount-api-vfs.c +++ b/src/remount-api-vfs/remount-api-vfs.c @@ -56,6 +56,11 @@ int main(int argc, char *argv[]) { f = setmntent("/etc/fstab", "r"); if (!f) { + if (errno == ENOENT) { + ret = EXIT_SUCCESS; + goto finish; + } + log_error("Failed to open /etc/fstab: %m"); goto finish; } -- cgit v1.2.3-54-g00ecf From 9eb977db5b89b44f254ab40c1876a76b7d7ea2d0 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 7 May 2012 21:36:12 +0200 Subject: util: split-out path-util.[ch] --- Makefile.am | 2 + src/cgls/cgls.c | 1 + src/cgtop/cgtop.c | 1 + src/core/automount.c | 1 + src/core/cgroup.c | 1 + src/core/condition.c | 1 + src/core/device.c | 1 + src/core/execute.c | 7 +- src/core/load-fragment.c | 3 +- src/core/manager.c | 3 +- src/core/mount-setup.c | 1 + src/core/mount.c | 1 + src/core/namespace.c | 1 + src/core/path.c | 1 + src/core/service.c | 5 +- src/core/socket.c | 1 + src/core/swap.c | 1 + src/core/umount.c | 1 + src/core/unit.c | 7 +- src/cryptsetup/cryptsetup.c | 1 + src/journal/sd-journal.c | 3 +- src/login/logind-dbus.c | 1 + src/login/logind-inhibit.c | 4 +- src/login/logind-seat.c | 3 +- src/login/logind-session.c | 3 +- src/login/sysfs-show.c | 1 + src/nspawn/nspawn.c | 3 +- src/remount-fs/remount-fs.c | 1 + src/shared/cgroup-show.c | 5 +- src/shared/cgroup-util.c | 3 +- src/shared/conf-files.c | 7 +- src/shared/conf-parser.c | 1 + src/shared/install.c | 11 +- src/shared/label.c | 1 + src/shared/path-lookup.c | 22 +- src/shared/path-util.c | 371 +++++++++++++++++++++ src/shared/path-util.h | 46 +++ src/shared/socket-util.c | 1 + src/shared/unit-name.c | 1 + src/shared/util.c | 350 +------------------ src/shared/util.h | 27 -- src/shared/utmp-wtmp.c | 3 +- src/sysctl/sysctl.c | 1 + src/systemctl/systemctl.c | 10 +- src/test/test-cgroup.c | 1 + src/test/test-install.c | 19 +- src/tmpfiles/tmpfiles.c | 1 + .../tty-ask-password-agent.c | 1 + src/udev/udev-rules.c | 3 +- 49 files changed, 521 insertions(+), 424 deletions(-) create mode 100644 src/shared/path-util.c create mode 100644 src/shared/path-util.h (limited to 'src/cryptsetup') diff --git a/Makefile.am b/Makefile.am index a6c4988382..dbcfeb384f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -526,6 +526,8 @@ libsystemd_shared_la_SOURCES = \ src/shared/util.h \ src/shared/virt.c \ src/shared/virt.h \ + src/shared/path-util.c \ + src/shared/path-util.h \ src/shared/hashmap.c \ src/shared/hashmap.h \ src/shared/set.c \ diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index 4bec6a827e..b2cd968e46 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -29,6 +29,7 @@ #include "cgroup-show.h" #include "cgroup-util.h" #include "log.h" +#include "path-util.h" #include "util.h" #include "pager.h" #include "build.h" diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index 1fe247c667..cc7a99f3df 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -26,6 +26,7 @@ #include #include +#include "path-util.h" #include "util.h" #include "hashmap.h" #include "cgroup-util.h" diff --git a/src/core/automount.c b/src/core/automount.c index 11c217beb9..c31e3d8bac 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -39,6 +39,7 @@ #include "special.h" #include "label.h" #include "mkdir.h" +#include "path-util.h" static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = { [AUTOMOUNT_DEAD] = UNIT_INACTIVE, diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 713c1ca768..5513f6560c 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -31,6 +31,7 @@ #include "cgroup-util.h" #include "log.h" #include "strv.h" +#include "path-util.h" int cgroup_bonding_realize(CGroupBonding *b) { int r; diff --git a/src/core/condition.c b/src/core/condition.c index 5d44039e5d..e4080d569d 100644 --- a/src/core/condition.c +++ b/src/core/condition.c @@ -33,6 +33,7 @@ #include "util.h" #include "condition.h" #include "virt.h" +#include "path-util.h" Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) { Condition *c; diff --git a/src/core/device.c b/src/core/device.c index 88ce0cdd18..f2bb656397 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -30,6 +30,7 @@ #include "unit-name.h" #include "dbus-device.h" #include "def.h" +#include "path-util.h" static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = { [DEVICE_DEAD] = UNIT_INACTIVE, diff --git a/src/core/execute.c b/src/core/execute.c index 99a7881f1c..953cfa2baa 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -59,6 +59,7 @@ #include "utmp-wtmp.h" #include "def.h" #include "loopback-setup.h" +#include "path-util.h" /* This assumes there is a 'tty' group */ #define TTY_MODE 0620 @@ -929,7 +930,7 @@ static void rename_process_from_path(const char *path) { /* This resulting string must fit in 10 chars (i.e. the length * of "/sbin/init") to look pretty in /bin/ps */ - p = file_name_from_path(path); + p = path_get_file_name(path); if (isempty(p)) { rename_process("(...)"); return; @@ -1152,14 +1153,14 @@ int exec_spawn(ExecCommand *command, } if (!keep_stdout) { - err = setup_output(context, socket_fd, file_name_from_path(command->path), apply_tty_stdin); + err = setup_output(context, socket_fd, path_get_file_name(command->path), apply_tty_stdin); if (err < 0) { r = EXIT_STDOUT; goto fail_child; } } - err = setup_error(context, socket_fd, file_name_from_path(command->path), apply_tty_stdin); + err = setup_error(context, socket_fd, path_get_file_name(command->path), apply_tty_stdin); if (err < 0) { r = EXIT_STDERR; goto fail_child; diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index d24919f998..c2efec6657 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -44,6 +44,7 @@ #include "unit-name.h" #include "bus-errors.h" #include "utf8.h" +#include "path-util.h" #ifndef HAVE_SYSV_COMPAT int config_parse_warn_compat( @@ -2089,7 +2090,7 @@ static int open_follow(char **filename, FILE **_f, Set *names, char **_final) { /* Add the file name we are currently looking at to * the names of this unit, but only if it is a valid * unit name. */ - name = file_name_from_path(*filename); + name = path_get_file_name(*filename); if (unit_name_is_valid(name, true)) { diff --git a/src/core/manager.c b/src/core/manager.c index 62222e6c7a..c6baf22ae5 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -65,6 +65,7 @@ #include "virt.h" #include "watchdog.h" #include "cgroup-util.h" +#include "path-util.h" /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */ #define GC_QUEUE_ENTRIES_MAX 16 @@ -785,7 +786,7 @@ int manager_load_unit_prepare(Manager *m, const char *name, const char *path, DB } if (!name) - name = file_name_from_path(path); + name = path_get_file_name(path); t = unit_name_to_type(name); diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 6d37bbde3c..56ce2ae71a 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -38,6 +38,7 @@ #include "set.h" #include "strv.h" #include "mkdir.h" +#include "path-util.h" #ifndef TTY_GID #define TTY_GID 5 diff --git a/src/core/mount.c b/src/core/mount.c index 8bdd462ea1..01e9d78ad5 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -32,6 +32,7 @@ #include "log.h" #include "strv.h" #include "mkdir.h" +#include "path-util.h" #include "mount-setup.h" #include "unit-name.h" #include "dbus-mount.h" diff --git a/src/core/namespace.c b/src/core/namespace.c index 7ac6b381ab..ba1edbe512 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -33,6 +33,7 @@ #include "strv.h" #include "util.h" +#include "path-util.h" #include "namespace.h" #include "missing.h" diff --git a/src/core/path.c b/src/core/path.c index 0f23f1494d..d6fedc736a 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -32,6 +32,7 @@ #include "dbus-path.h" #include "special.h" #include "bus-errors.h" +#include "path-util.h" static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = { [PATH_DEAD] = UNIT_INACTIVE, diff --git a/src/core/service.c b/src/core/service.c index 40f1682784..e9a7000bae 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -38,6 +38,7 @@ #include "bus-errors.h" #include "exit-status.h" #include "def.h" +#include "path-util.h" #include "util.h" #include "utf8.h" @@ -722,7 +723,7 @@ static int service_load_sysv_path(Service *s, const char *path) { goto finish; } - r = sysv_translate_facility(n, file_name_from_path(path), &m); + r = sysv_translate_facility(n, path_get_file_name(path), &m); free(n); if (r < 0) @@ -772,7 +773,7 @@ static int service_load_sysv_path(Service *s, const char *path) { goto finish; } - r = sysv_translate_facility(n, file_name_from_path(path), &m); + r = sysv_translate_facility(n, path_get_file_name(path), &m); if (r < 0) { log_error("[%s:%u] Failed to translate LSB dependency %s, ignoring: %s", path, line, n, strerror(-r)); diff --git a/src/core/socket.c b/src/core/socket.c index 60ea3cb25c..37e85d5fbe 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -37,6 +37,7 @@ #include "load-fragment.h" #include "strv.h" #include "mkdir.h" +#include "path-util.h" #include "unit-name.h" #include "dbus-socket.h" #include "missing.h" diff --git a/src/core/swap.c b/src/core/swap.c index 3881d2831f..a7e2126edd 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -38,6 +38,7 @@ #include "bus-errors.h" #include "exit-status.h" #include "def.h" +#include "path-util.h" static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = { [SWAP_DEAD] = UNIT_INACTIVE, diff --git a/src/core/umount.c b/src/core/umount.c index 488e1e4a4d..71ad4b623d 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -32,6 +32,7 @@ #include "list.h" #include "mount-setup.h" #include "umount.h" +#include "path-util.h" #include "util.h" typedef struct MountPoint { diff --git a/src/core/unit.c b/src/core/unit.c index fea75e88fe..68948574ed 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -33,6 +33,7 @@ #include "unit.h" #include "macro.h" #include "strv.h" +#include "path-util.h" #include "load-fragment.h" #include "load-dropin.h" #include "log.h" @@ -1670,7 +1671,7 @@ static const char *resolve_template(Unit *u, const char *name, const char*path, assert(name || path); if (!name) - name = file_name_from_path(path); + name = path_get_file_name(path); if (!unit_name_is_template(name)) { *p = NULL; @@ -2179,7 +2180,7 @@ static char *specifier_cgroup_root(char specifier, void *data, void *userdata) { if (specifier == 'r') return strdup(u->manager->cgroup_hierarchy); - if (parent_of_path(u->manager->cgroup_hierarchy, &p) < 0) + if (path_get_parent(u->manager->cgroup_hierarchy, &p) < 0) return strdup(""); if (streq(p, "/")) { @@ -2681,7 +2682,7 @@ UnitFileState unit_get_unit_file_state(Unit *u) { if (u->unit_file_state < 0 && u->fragment_path) u->unit_file_state = unit_file_get_state( u->manager->running_as == MANAGER_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, - NULL, file_name_from_path(u->fragment_path)); + NULL, path_get_file_name(u->fragment_path)); return u->unit_file_state; } diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 3ff0ddf2cc..6d4e965fe1 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -29,6 +29,7 @@ #include "log.h" #include "util.h" +#include "path-util.h" #include "strv.h" #include "ask-password-api.h" #include "def.h" diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 9d381e044c..4f3f1b5ff3 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -30,6 +30,7 @@ #include "journal-file.h" #include "hashmap.h" #include "list.h" +#include "path-util.h" #include "lookup3.h" #include "compress.h" #include "journal-internal.h" @@ -765,7 +766,7 @@ _public_ int sd_journal_get_cursor(sd_journal *j, char **cursor) { bid, (unsigned long long) le64toh(o->entry.monotonic), (unsigned long long) le64toh(o->entry.realtime), (unsigned long long) le64toh(o->entry.xor_hash), - file_name_from_path(j->current_file->path)) < 0) + path_get_file_name(j->current_file->path)) < 0) return -ENOMEM; return 1; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index a361b93dc7..9fc3a14317 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -28,6 +28,7 @@ #include "dbus-common.h" #include "strv.h" #include "mkdir.h" +#include "path-util.h" #include "polkit.h" #include "special.h" diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index e4eefd0def..b5b801e5e0 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -28,7 +28,7 @@ #include "util.h" #include "mkdir.h" - +#include "path-util.h" #include "logind-inhibit.h" Inhibitor* inhibitor_new(Manager *m, const char* id) { @@ -46,7 +46,7 @@ Inhibitor* inhibitor_new(Manager *m, const char* id) { return NULL; } - i->id = file_name_from_path(i->state_file); + i->id = path_get_file_name(i->state_file); if (hashmap_put(m->inhibitors, i->id, i) < 0) { free(i->state_file); diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 1bae6f6e07..06debf887a 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -31,6 +31,7 @@ #include "logind-acl.h" #include "util.h" #include "mkdir.h" +#include "path-util.h" Seat *seat_new(Manager *m, const char *id) { Seat *s; @@ -48,7 +49,7 @@ Seat *seat_new(Manager *m, const char *id) { return NULL; } - s->id = file_name_from_path(s->state_file); + s->id = path_get_file_name(s->state_file); s->manager = m; if (hashmap_put(m->seats, s->id, s) < 0) { diff --git a/src/login/logind-session.c b/src/login/logind-session.c index e297d3feeb..475ebcaa5e 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -28,6 +28,7 @@ #include "strv.h" #include "util.h" #include "mkdir.h" +#include "path-util.h" #include "cgroup-util.h" #include "logind-session.h" @@ -49,7 +50,7 @@ Session* session_new(Manager *m, User *u, const char *id) { return NULL; } - s->id = file_name_from_path(s->state_file); + s->id = path_get_file_name(s->state_file); if (hashmap_put(m->sessions, s->id, s) < 0) { free(s->state_file); diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c index b0edc33b80..bc1bbccff7 100644 --- a/src/login/sysfs-show.c +++ b/src/login/sysfs-show.c @@ -25,6 +25,7 @@ #include "util.h" #include "sysfs-show.h" +#include "path-util.h" static int show_sysfs_one( struct udev *udev, diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 2a1f37bffc..31e8b015df 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -50,6 +50,7 @@ #include "missing.h" #include "cgroup-util.h" #include "strv.h" +#include "path-util.h" #include "loopback-setup.h" static char *arg_directory = NULL; @@ -524,7 +525,7 @@ static int setup_hostname(void) { char *hn; int r = 0; - hn = file_name_from_path(arg_directory); + hn = path_get_file_name(arg_directory); if (hn) { hn = strdup(hn); if (!hn) diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c index 35b71548a3..ef68e506e5 100644 --- a/src/remount-fs/remount-fs.c +++ b/src/remount-fs/remount-fs.c @@ -29,6 +29,7 @@ #include "log.h" #include "util.h" +#include "path-util.h" #include "set.h" #include "mount-setup.h" #include "exit-status.h" diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c index 19f87e4bc6..9003a1228e 100644 --- a/src/shared/cgroup-show.c +++ b/src/shared/cgroup-show.c @@ -26,6 +26,7 @@ #include "util.h" #include "macro.h" +#include "path-util.h" #include "cgroup-util.h" #include "cgroup-show.h" @@ -205,7 +206,7 @@ int show_cgroup_by_path(const char *path, const char *prefix, unsigned n_columns } if (last) { - printf("%s\342\224\234 %s\n", prefix, file_name_from_path(last)); + printf("%s\342\224\234 %s\n", prefix, path_get_file_name(last)); if (!p1) { p1 = strappend(prefix, "\342\224\202 "); @@ -230,7 +231,7 @@ int show_cgroup_by_path(const char *path, const char *prefix, unsigned n_columns show_cgroup_one_by_path(path, prefix, n_columns, !!last, kernel_threads); if (last) { - printf("%s\342\224\224 %s\n", prefix, file_name_from_path(last)); + printf("%s\342\224\224 %s\n", prefix, path_get_file_name(last)); if (!p2) { p2 = strappend(prefix, " "); diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 1f310d31f0..8d3bdce0f5 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -34,6 +34,7 @@ #include "set.h" #include "macro.h" #include "util.h" +#include "path-util.h" #include "strv.h" int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) { @@ -673,7 +674,7 @@ int cg_delete(const char *controller, const char *path) { assert(controller); assert(path); - if ((r = parent_of_path(path, &parent)) < 0) + if ((r = path_get_parent(path, &parent)) < 0) return r; r = cg_migrate_recursive(controller, path, parent, false, true); diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c index 019fadcf5e..487c9a5e68 100644 --- a/src/shared/conf-files.c +++ b/src/shared/conf-files.c @@ -33,6 +33,7 @@ #include "missing.h" #include "log.h" #include "strv.h" +#include "path-util.h" #include "hashmap.h" #include "conf-files.h" @@ -69,7 +70,7 @@ static int files_add(Hashmap *h, const char *path, const char *suffix) { goto finish; } - if (hashmap_put(h, file_name_from_path(p), p) <= 0) { + if (hashmap_put(h, path_get_file_name(p), p) <= 0) { log_debug("Skip overridden file: %s.", p); free(p); } @@ -85,7 +86,7 @@ static int base_cmp(const void *a, const void *b) { s1 = *(char * const *)a; s2 = *(char * const *)b; - return strcmp(file_name_from_path(s1), file_name_from_path(s2)); + return strcmp(path_get_file_name(s1), path_get_file_name(s2)); } int conf_files_list_strv(char ***strv, const char *suffix, const char **dirs) { @@ -137,7 +138,7 @@ int conf_files_list(char ***strv, const char *suffix, const char *dir, ...) { goto finish; } - if (!strv_path_canonicalize(dirs)) { + if (!path_strv_canonicalize(dirs)) { r = -ENOMEM; goto finish; } diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 30980a3ea2..65035e4c6a 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -31,6 +31,7 @@ #include "strv.h" #include "log.h" #include "utf8.h" +#include "path-util.h" int config_item_table_lookup( void *table, diff --git a/src/shared/install.c b/src/shared/install.c index a77dfc77e4..fc1bf96207 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -29,6 +29,7 @@ #include "mkdir.h" #include "hashmap.h" #include "set.h" +#include "path-util.h" #include "path-lookup.h" #include "strv.h" #include "unit-name.h" @@ -283,7 +284,7 @@ static int remove_marked_symlinks_fd( found = set_get(remove_symlinks_to, dest) || - set_get(remove_symlinks_to, file_name_from_path(dest)); + set_get(remove_symlinks_to, path_get_file_name(dest)); if (found) { @@ -468,7 +469,7 @@ static int find_symlinks_fd( if (path_is_absolute(name)) found_dest = path_equal(dest, name); else - found_dest = streq(file_name_from_path(dest), name); + found_dest = streq(path_get_file_name(dest), name); free(dest); @@ -754,7 +755,7 @@ int unit_file_link( char *path, *fn; struct stat st; - fn = file_name_from_path(*i); + fn = path_get_file_name(*i); if (!path_is_absolute(*i) || !unit_name_is_valid_no_type(fn, true)) { @@ -917,7 +918,7 @@ static int install_info_add( assert(name || path); if (!name) - name = file_name_from_path(path); + name = path_get_file_name(path); if (!unit_name_is_valid_no_type(name, true)) return -EINVAL; @@ -1915,7 +1916,7 @@ int unit_file_get_list( continue; found: - r = hashmap_put(h, file_name_from_path(f->path), f); + r = hashmap_put(h, path_get_file_name(f->path), f); if (r < 0) { free(f->path); free(f); diff --git a/src/shared/label.c b/src/shared/label.c index bd38f0ba67..2d7d42a40e 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -28,6 +28,7 @@ #include "label.h" #include "util.h" +#include "path-util.h" #ifdef HAVE_SELINUX #include diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 1d95f7d1f8..41ebc7f5b3 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -28,7 +28,7 @@ #include "util.h" #include "mkdir.h" #include "strv.h" - +#include "path-util.h" #include "path-lookup.h" int user_config_home(char **config_home) { @@ -165,7 +165,7 @@ static char** user_dirs(void) { strv_free(r); r = t; - if (!strv_path_make_absolute_cwd(r)) + if (!path_strv_make_absolute_cwd(r)) goto fail; finish: @@ -191,7 +191,7 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal /* First priority is whatever has been passed to us via env * vars */ if ((e = getenv("SYSTEMD_UNIT_PATH"))) - if (!(p->unit_path = split_path_and_make_absolute(e))) + if (!(p->unit_path = path_split_and_make_absolute(e))) return -ENOMEM; if (strv_isempty(p->unit_path)) { @@ -239,11 +239,11 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal } if (p->unit_path) - if (!strv_path_canonicalize(p->unit_path)) + if (!path_strv_canonicalize(p->unit_path)) return -ENOMEM; strv_uniq(p->unit_path); - strv_path_remove_empty(p->unit_path); + path_strv_remove_empty(p->unit_path); if (!strv_isempty(p->unit_path)) { @@ -262,7 +262,7 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal /* /etc/init.d/ compatibility does not matter to users */ if ((e = getenv("SYSTEMD_SYSVINIT_PATH"))) - if (!(p->sysvinit_path = split_path_and_make_absolute(e))) + if (!(p->sysvinit_path = path_split_and_make_absolute(e))) return -ENOMEM; if (strv_isempty(p->sysvinit_path)) { @@ -275,7 +275,7 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal } if ((e = getenv("SYSTEMD_SYSVRCND_PATH"))) - if (!(p->sysvrcnd_path = split_path_and_make_absolute(e))) + if (!(p->sysvrcnd_path = path_split_and_make_absolute(e))) return -ENOMEM; if (strv_isempty(p->sysvrcnd_path)) { @@ -288,18 +288,18 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal } if (p->sysvinit_path) - if (!strv_path_canonicalize(p->sysvinit_path)) + if (!path_strv_canonicalize(p->sysvinit_path)) return -ENOMEM; if (p->sysvrcnd_path) - if (!strv_path_canonicalize(p->sysvrcnd_path)) + if (!path_strv_canonicalize(p->sysvrcnd_path)) return -ENOMEM; strv_uniq(p->sysvinit_path); strv_uniq(p->sysvrcnd_path); - strv_path_remove_empty(p->sysvinit_path); - strv_path_remove_empty(p->sysvrcnd_path); + path_strv_remove_empty(p->sysvinit_path); + path_strv_remove_empty(p->sysvrcnd_path); if (!strv_isempty(p->sysvinit_path)) { diff --git a/src/shared/path-util.c b/src/shared/path-util.c new file mode 100644 index 0000000000..ccd7667608 --- /dev/null +++ b/src/shared/path-util.c @@ -0,0 +1,371 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2010-2012 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see . +***/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "macro.h" +#include "util.h" +#include "log.h" +#include "strv.h" +#include "path-util.h" + +bool path_is_absolute(const char *p) { + return p[0] == '/'; +} + +bool is_path(const char *p) { + return !!strchr(p, '/'); +} + +char *path_get_file_name(const char *p) { + char *r; + + assert(p); + + if ((r = strrchr(p, '/'))) + return r + 1; + + return (char*) p; +} + +int path_get_parent(const char *path, char **_r) { + const char *e, *a = NULL, *b = NULL, *p; + char *r; + bool slash = false; + + assert(path); + assert(_r); + + if (!*path) + return -EINVAL; + + for (e = path; *e; e++) { + + if (!slash && *e == '/') { + a = b; + b = e; + slash = true; + } else if (slash && *e != '/') + slash = false; + } + + if (*(e-1) == '/') + p = a; + else + p = b; + + if (!p) + return -EINVAL; + + if (p == path) + r = strdup("/"); + else + r = strndup(path, p-path); + + if (!r) + return -ENOMEM; + + *_r = r; + return 0; +} + +char **path_split_and_make_absolute(const char *p) { + char **l; + assert(p); + + if (!(l = strv_split(p, ":"))) + return NULL; + + if (!path_strv_make_absolute_cwd(l)) { + strv_free(l); + return NULL; + } + + return l; +} + +char *path_make_absolute(const char *p, const char *prefix) { + assert(p); + + /* Makes every item in the list an absolute path by prepending + * the prefix, if specified and necessary */ + + if (path_is_absolute(p) || !prefix) + return strdup(p); + + return join(prefix, "/", p, NULL); +} + +char *path_make_absolute_cwd(const char *p) { + char *cwd, *r; + + assert(p); + + /* Similar to path_make_absolute(), but prefixes with the + * current working directory. */ + + if (path_is_absolute(p)) + return strdup(p); + + if (!(cwd = get_current_dir_name())) + return NULL; + + r = path_make_absolute(p, cwd); + free(cwd); + + return r; +} + +char **path_strv_make_absolute_cwd(char **l) { + char **s; + + /* Goes through every item in the string list and makes it + * absolute. This works in place and won't rollback any + * changes on failure. */ + + STRV_FOREACH(s, l) { + char *t; + + if (!(t = path_make_absolute_cwd(*s))) + return NULL; + + free(*s); + *s = t; + } + + return l; +} + +char **path_strv_canonicalize(char **l) { + char **s; + unsigned k = 0; + bool enomem = false; + + if (strv_isempty(l)) + return l; + + /* Goes through every item in the string list and canonicalize + * the path. This works in place and won't rollback any + * changes on failure. */ + + STRV_FOREACH(s, l) { + char *t, *u; + + t = path_make_absolute_cwd(*s); + free(*s); + + if (!t) { + enomem = true; + continue; + } + + errno = 0; + u = canonicalize_file_name(t); + free(t); + + if (!u) { + if (errno == ENOMEM || !errno) + enomem = true; + + continue; + } + + l[k++] = u; + } + + l[k] = NULL; + + if (enomem) + return NULL; + + return l; +} + +char **path_strv_remove_empty(char **l) { + char **f, **t; + + if (!l) + return NULL; + + for (f = t = l; *f; f++) { + + if (dir_is_empty(*f) > 0) { + free(*f); + continue; + } + + *(t++) = *f; + } + + *t = NULL; + return l; +} + +char *path_kill_slashes(char *path) { + char *f, *t; + bool slash = false; + + /* Removes redundant inner and trailing slashes. Modifies the + * passed string in-place. + * + * ///foo///bar/ becomes /foo/bar + */ + + for (f = path, t = path; *f; f++) { + + if (*f == '/') { + slash = true; + continue; + } + + if (slash) { + slash = false; + *(t++) = '/'; + } + + *(t++) = *f; + } + + /* Special rule, if we are talking of the root directory, a + trailing slash is good */ + + if (t == path && slash) + *(t++) = '/'; + + *t = 0; + return path; +} + +bool path_startswith(const char *path, const char *prefix) { + assert(path); + assert(prefix); + + if ((path[0] == '/') != (prefix[0] == '/')) + return false; + + for (;;) { + size_t a, b; + + path += strspn(path, "/"); + prefix += strspn(prefix, "/"); + + if (*prefix == 0) + return true; + + if (*path == 0) + return false; + + a = strcspn(path, "/"); + b = strcspn(prefix, "/"); + + if (a != b) + return false; + + if (memcmp(path, prefix, a) != 0) + return false; + + path += a; + prefix += b; + } +} + +bool path_equal(const char *a, const char *b) { + assert(a); + assert(b); + + if ((a[0] == '/') != (b[0] == '/')) + return false; + + for (;;) { + size_t j, k; + + a += strspn(a, "/"); + b += strspn(b, "/"); + + if (*a == 0 && *b == 0) + return true; + + if (*a == 0 || *b == 0) + return false; + + j = strcspn(a, "/"); + k = strcspn(b, "/"); + + if (j != k) + return false; + + if (memcmp(a, b, j) != 0) + return false; + + a += j; + b += k; + } +} + +int path_is_mount_point(const char *t, bool allow_symlink) { + struct stat a, b; + char *parent; + int r; + + if (allow_symlink) + r = stat(t, &a); + else + r = lstat(t, &a); + + if (r < 0) { + if (errno == ENOENT) + return 0; + + return -errno; + } + + r = path_get_parent(t, &parent); + if (r < 0) + return r; + + r = lstat(parent, &b); + free(parent); + + if (r < 0) + return -errno; + + return a.st_dev != b.st_dev; +} + +int path_is_read_only_fs(const char *path) { + struct statvfs st; + + assert(path); + + if (statvfs(path, &st) < 0) + return -errno; + + return !!(st.f_flag & ST_RDONLY); +} diff --git a/src/shared/path-util.h b/src/shared/path-util.h new file mode 100644 index 0000000000..181b981224 --- /dev/null +++ b/src/shared/path-util.h @@ -0,0 +1,46 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef foopathutilhfoo +#define foopathutilhfoo + +/*** + This file is part of systemd. + + Copyright 2010-2012 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see . +***/ + +#include "stdbool.h" + +bool is_path(const char *p); +char **path_split_and_make_absolute(const char *p); +char *path_get_file_name(const char *p); +int path_get_parent(const char *path, char **parent); +bool path_is_absolute(const char *p); +char *path_make_absolute(const char *p, const char *prefix); +char *path_make_absolute_cwd(const char *p); +int path_parent(const char *path, char **parent); +char *path_kill_slashes(char *path); +bool path_startswith(const char *path, const char *prefix); +bool path_equal(const char *a, const char *b); + +char **path_strv_make_absolute_cwd(char **l); +char **path_strv_canonicalize(char **l); +char **path_strv_remove_empty(char **l); + +int path_is_mount_point(const char *path, bool allow_symlink); +int path_is_read_only_fs(const char *path); + +#endif diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index 471b6dc284..7e65f8a691 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -35,6 +35,7 @@ #include "macro.h" #include "util.h" #include "mkdir.h" +#include "path-util.h" #include "socket-util.h" #include "missing.h" diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 566cdc51cc..e0a18d1357 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -23,6 +23,7 @@ #include #include +#include "path-util.h" #include "util.h" #include "unit-name.h" diff --git a/src/shared/util.c b/src/shared/util.c index a055ce197d..8a0b2a1b46 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -55,7 +55,6 @@ #include #include #include -#include #include "macro.h" #include "util.h" @@ -64,6 +63,7 @@ #include "log.h" #include "strv.h" #include "label.h" +#include "path-util.h" #include "exit-status.h" #include "hashmap.h" @@ -486,21 +486,6 @@ char *split_quoted(const char *c, size_t *l, char **state) { return (char*) current; } -char **split_path_and_make_absolute(const char *p) { - char **l; - assert(p); - - if (!(l = strv_split(p, ":"))) - return NULL; - - if (!strv_path_make_absolute_cwd(l)) { - strv_free(l); - return NULL; - } - - return l; -} - int get_parent_of_pid(pid_t pid, pid_t *_ppid) { int r; FILE *f; @@ -1313,187 +1298,6 @@ int readlink_and_canonicalize(const char *p, char **r) { return 0; } -int parent_of_path(const char *path, char **_r) { - const char *e, *a = NULL, *b = NULL, *p; - char *r; - bool slash = false; - - assert(path); - assert(_r); - - if (!*path) - return -EINVAL; - - for (e = path; *e; e++) { - - if (!slash && *e == '/') { - a = b; - b = e; - slash = true; - } else if (slash && *e != '/') - slash = false; - } - - if (*(e-1) == '/') - p = a; - else - p = b; - - if (!p) - return -EINVAL; - - if (p == path) - r = strdup("/"); - else - r = strndup(path, p-path); - - if (!r) - return -ENOMEM; - - *_r = r; - return 0; -} - - -char *file_name_from_path(const char *p) { - char *r; - - assert(p); - - if ((r = strrchr(p, '/'))) - return r + 1; - - return (char*) p; -} - -bool path_is_absolute(const char *p) { - assert(p); - - return p[0] == '/'; -} - -bool is_path(const char *p) { - - return !!strchr(p, '/'); -} - -char *path_make_absolute(const char *p, const char *prefix) { - assert(p); - - /* Makes every item in the list an absolute path by prepending - * the prefix, if specified and necessary */ - - if (path_is_absolute(p) || !prefix) - return strdup(p); - - return join(prefix, "/", p, NULL); -} - -char *path_make_absolute_cwd(const char *p) { - char *cwd, *r; - - assert(p); - - /* Similar to path_make_absolute(), but prefixes with the - * current working directory. */ - - if (path_is_absolute(p)) - return strdup(p); - - if (!(cwd = get_current_dir_name())) - return NULL; - - r = path_make_absolute(p, cwd); - free(cwd); - - return r; -} - -char **strv_path_make_absolute_cwd(char **l) { - char **s; - - /* Goes through every item in the string list and makes it - * absolute. This works in place and won't rollback any - * changes on failure. */ - - STRV_FOREACH(s, l) { - char *t; - - if (!(t = path_make_absolute_cwd(*s))) - return NULL; - - free(*s); - *s = t; - } - - return l; -} - -char **strv_path_canonicalize(char **l) { - char **s; - unsigned k = 0; - bool enomem = false; - - if (strv_isempty(l)) - return l; - - /* Goes through every item in the string list and canonicalize - * the path. This works in place and won't rollback any - * changes on failure. */ - - STRV_FOREACH(s, l) { - char *t, *u; - - t = path_make_absolute_cwd(*s); - free(*s); - - if (!t) { - enomem = true; - continue; - } - - errno = 0; - u = canonicalize_file_name(t); - free(t); - - if (!u) { - if (errno == ENOMEM || !errno) - enomem = true; - - continue; - } - - l[k++] = u; - } - - l[k] = NULL; - - if (enomem) - return NULL; - - return l; -} - -char **strv_path_remove_empty(char **l) { - char **f, **t; - - if (!l) - return NULL; - - for (f = t = l; *f; f++) { - - if (dir_is_empty(*f) > 0) { - free(*f); - continue; - } - - *(t++) = *f; - } - - *t = NULL; - return l; -} - int reset_all_signal_handlers(void) { int sig; @@ -1972,107 +1776,6 @@ char *bus_path_unescape(const char *f) { return r; } -char *path_kill_slashes(char *path) { - char *f, *t; - bool slash = false; - - /* Removes redundant inner and trailing slashes. Modifies the - * passed string in-place. - * - * ///foo///bar/ becomes /foo/bar - */ - - for (f = path, t = path; *f; f++) { - - if (*f == '/') { - slash = true; - continue; - } - - if (slash) { - slash = false; - *(t++) = '/'; - } - - *(t++) = *f; - } - - /* Special rule, if we are talking of the root directory, a - trailing slash is good */ - - if (t == path && slash) - *(t++) = '/'; - - *t = 0; - return path; -} - -bool path_startswith(const char *path, const char *prefix) { - assert(path); - assert(prefix); - - if ((path[0] == '/') != (prefix[0] == '/')) - return false; - - for (;;) { - size_t a, b; - - path += strspn(path, "/"); - prefix += strspn(prefix, "/"); - - if (*prefix == 0) - return true; - - if (*path == 0) - return false; - - a = strcspn(path, "/"); - b = strcspn(prefix, "/"); - - if (a != b) - return false; - - if (memcmp(path, prefix, a) != 0) - return false; - - path += a; - prefix += b; - } -} - -bool path_equal(const char *a, const char *b) { - assert(a); - assert(b); - - if ((a[0] == '/') != (b[0] == '/')) - return false; - - for (;;) { - size_t j, k; - - a += strspn(a, "/"); - b += strspn(b, "/"); - - if (*a == 0 && *b == 0) - return true; - - if (*a == 0 || *b == 0) - return false; - - j = strcspn(a, "/"); - k = strcspn(b, "/"); - - if (j != k) - return false; - - if (memcmp(a, b, j) != 0) - return false; - - a += j; - b += k; - } -} - char *ascii_strlower(char *t) { char *p; @@ -2986,36 +2689,6 @@ ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) { return n; } -int path_is_mount_point(const char *t, bool allow_symlink) { - struct stat a, b; - char *parent; - int r; - - if (allow_symlink) - r = stat(t, &a); - else - r = lstat(t, &a); - - if (r < 0) { - if (errno == ENOENT) - return 0; - - return -errno; - } - - r = parent_of_path(t, &parent); - if (r < 0) - return r; - - r = lstat(parent, &b); - free(parent); - - if (r < 0) - return -errno; - - return a.st_dev != b.st_dev; -} - int parse_usec(const char *t, usec_t *usec) { static const struct { const char *suffix; @@ -4746,7 +4419,7 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) { if (!t) return -ENOMEM; - fn = file_name_from_path(path); + fn = path_get_file_name(path); k = fn-path; memcpy(t, path, k); t[k] = '.'; @@ -4928,8 +4601,8 @@ int symlink_or_copy(const char *from, const char *to) { assert(from); assert(to); - if (parent_of_path(from, &pf) < 0 || - parent_of_path(to, &pt) < 0) { + if (path_get_parent(from, &pf) < 0 || + path_get_parent(to, &pt) < 0) { r = -ENOMEM; goto finish; } @@ -4976,7 +4649,7 @@ int symlink_or_copy_atomic(const char *from, const char *to) { if (!t) return -ENOMEM; - fn = file_name_from_path(to); + fn = path_get_file_name(to); k = fn-to; memcpy(t, to, k); t[k] = '.'; @@ -5218,7 +4891,7 @@ int in_search_path(const char *path, char **search) { char **i, *parent; int r; - r = parent_of_path(path, &parent); + r = path_get_parent(path, &parent); if (r < 0) return r; @@ -5857,17 +5530,6 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { return 0; } -int path_is_read_only_fs(const char *path) { - struct statvfs st; - - assert(path); - - if (statvfs(path, &st) < 0) - return -errno; - - return !!(st.f_flag & ST_RDONLY); -} - int getenv_for_pid(pid_t pid, const char *field, char **_value) { char path[sizeof("/proc/")-1+10+sizeof("/environ")], *value = NULL; int r; diff --git a/src/shared/util.h b/src/shared/util.h index cca6118363..59a69a898a 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -122,10 +122,6 @@ static inline const char *strna(const char *s) { return s ? s : "n/a"; } -static inline bool is_path_absolute(const char *p) { - return *p == '/'; -} - static inline bool isempty(const char *p) { return !p || !p[0]; } @@ -205,8 +201,6 @@ char *split_quoted(const char *c, size_t *l, char **state); #define FOREACH_WORD_QUOTED(word, length, s, state) \ for ((state) = NULL, (word) = split_quoted((s), &(length), &(state)); (word); (word) = split_quoted((s), &(length), &(state))) -char **split_path_and_make_absolute(const char *p); - pid_t get_parent_of_pid(pid_t pid, pid_t *ppid); int get_starttime_of_pid(pid_t pid, unsigned long long *st); @@ -229,17 +223,6 @@ int readlink_malloc(const char *p, char **r); int readlink_and_make_absolute(const char *p, char **r); int readlink_and_canonicalize(const char *p, char **r); -char *file_name_from_path(const char *p); -bool is_path(const char *p); - -bool path_is_absolute(const char *p); -char *path_make_absolute(const char *p, const char *prefix); -char *path_make_absolute_cwd(const char *p); - -char **strv_path_make_absolute_cwd(char **l); -char **strv_path_canonicalize(char **l); -char **strv_path_remove_empty(char **l); - int reset_all_signal_handlers(void); char *strstrip(char *s); @@ -248,8 +231,6 @@ char *truncate_nl(char *s); char *file_in_same_dir(const char *path, const char *filename); -int parent_of_path(const char *path, char **parent); - int rmdir_parents(const char *path, const char *stop); int get_process_comm(pid_t pid, char **name); @@ -273,11 +254,6 @@ char *xescape(const char *s, const char *bad); char *bus_path_escape(const char *s); char *bus_path_unescape(const char *s); -char *path_kill_slashes(char *path); - -bool path_startswith(const char *path, const char *prefix); -bool path_equal(const char *a, const char *b); - char *ascii_strlower(char *path); bool dirent_is_file(const struct dirent *de); @@ -351,9 +327,6 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path); ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll); ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); -int path_is_mount_point(const char *path, bool allow_symlink); -int path_is_read_only_fs(const char *path); - bool is_device_path(const char *path); int dir_is_empty(const char *path); diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c index 6bba325d3e..046fb584fb 100644 --- a/src/shared/utmp-wtmp.c +++ b/src/shared/utmp-wtmp.c @@ -29,6 +29,7 @@ #include #include "macro.h" +#include "path-util.h" #include "utmp-wtmp.h" int utmp_get_runlevel(int *runlevel, int *previous) { @@ -224,7 +225,7 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line strncpy(store.ut_id, sanitize_id(id), sizeof(store.ut_id)); if (line) - strncpy(store.ut_line, file_name_from_path(line), sizeof(store.ut_line)); + strncpy(store.ut_line, path_get_file_name(line), sizeof(store.ut_line)); return write_entry_both(&store); } diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 575095f812..72a74f9e44 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -31,6 +31,7 @@ #include "strv.h" #include "util.h" #include "strv.h" +#include "path-util.h" #include "conf-files.h" #define PROC_SYS_PREFIX "/proc/sys/" diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index c08d80912a..acede4e765 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -45,6 +45,7 @@ #include "utmp-wtmp.h" #include "special.h" #include "initreq.h" +#include "path-util.h" #include "strv.h" #include "dbus-common.h" #include "cgroup-show.h" @@ -61,6 +62,7 @@ #include "spawn-polkit-agent.h" #include "install.h" #include "logs-show.h" +#include "path-util.h" static const char *arg_type = NULL; static char **arg_property = NULL; @@ -560,7 +562,7 @@ static int compare_unit_file_list(const void *a, const void *b) { return r; } - return strcasecmp(file_name_from_path(u->path), file_name_from_path(v->path)); + return strcasecmp(path_get_file_name(u->path), path_get_file_name(v->path)); } static bool output_show_unit_file(const UnitFileList *u) { @@ -579,7 +581,7 @@ static void output_unit_file_list(const UnitFileList *units, unsigned c) { if (!output_show_unit_file(u)) continue; - max_id_len = MAX(max_id_len, strlen(file_name_from_path(u->path))); + max_id_len = MAX(max_id_len, strlen(path_get_file_name(u->path))); state_cols = MAX(state_cols, strlen(unit_file_state_to_string(u->state))); } @@ -616,7 +618,7 @@ static void output_unit_file_list(const UnitFileList *units, unsigned c) { } else on = off = ""; - id = file_name_from_path(u->path); + id = path_get_file_name(u->path); e = arg_full ? NULL : ellipsize(id, id_cols, 33); @@ -3721,7 +3723,7 @@ static int enable_sysv_units(char **args) { if (!isempty(arg_root)) argv[c++] = q = strappend("--root=", arg_root); - argv[c++] = file_name_from_path(p); + argv[c++] = path_get_file_name(p); argv[c++] = streq(verb, "enable") ? "on" : streq(verb, "disable") ? "off" : "--level=5"; diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c index e742632032..6d64a4e47f 100644 --- a/src/test/test-cgroup.c +++ b/src/test/test-cgroup.c @@ -23,6 +23,7 @@ #include #include "cgroup-util.h" +#include "path-util.h" #include "util.h" #include "log.h" diff --git a/src/test/test-install.c b/src/test/test-install.c index 709974f9e5..2c1b9efcb8 100644 --- a/src/test/test-install.c +++ b/src/test/test-install.c @@ -25,6 +25,7 @@ #include #include "util.h" +#include "path-util.h" #include "install.h" static void dump_changes(UnitFileChange *c, unsigned n) { @@ -57,7 +58,7 @@ int main(int argc, char* argv[]) { HASHMAP_FOREACH(p, h, i) { UnitFileState s; - s = unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(p->path)); + s = unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(p->path)); assert_se(p->state == s); @@ -175,7 +176,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == UNIT_FILE_ENABLED); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == UNIT_FILE_ENABLED); log_error("disable files2"); changes = NULL; @@ -187,7 +188,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == _UNIT_FILE_STATE_INVALID); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == _UNIT_FILE_STATE_INVALID); log_error("link files2"); changes = NULL; @@ -199,7 +200,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == UNIT_FILE_LINKED); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == UNIT_FILE_LINKED); log_error("disable files2"); changes = NULL; @@ -211,7 +212,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == _UNIT_FILE_STATE_INVALID); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == _UNIT_FILE_STATE_INVALID); log_error("link files2"); changes = NULL; @@ -223,7 +224,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == UNIT_FILE_LINKED); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == UNIT_FILE_LINKED); log_error("reenable files2"); changes = NULL; @@ -235,7 +236,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == UNIT_FILE_ENABLED); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == UNIT_FILE_ENABLED); log_error("disable files2"); changes = NULL; @@ -247,7 +248,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files2[0])) == _UNIT_FILE_STATE_INVALID); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files2[0])) == _UNIT_FILE_STATE_INVALID); log_error("preset files"); changes = NULL; n_changes = 0; @@ -258,7 +259,7 @@ int main(int argc, char* argv[]) { dump_changes(changes, n_changes); unit_file_changes_free(changes, n_changes); - assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, file_name_from_path(files[0])) == UNIT_FILE_ENABLED); + assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, NULL, path_get_file_name(files[0])) == UNIT_FILE_ENABLED); return 0; } diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 16666ce5a6..235617853b 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -42,6 +42,7 @@ #include "log.h" #include "util.h" #include "mkdir.h" +#include "path-util.h" #include "strv.h" #include "label.h" #include "set.h" diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 9fbd7f5fb2..de843b437e 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -34,6 +34,7 @@ #include "util.h" #include "mkdir.h" +#include "path-util.h" #include "conf-parser.h" #include "utmp-wtmp.h" #include "socket-util.h" diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 45a611474d..930c4770fe 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -31,6 +31,7 @@ #include #include "udev.h" +#include "path-util.h" #include "conf-files.h" #define PREALLOC_TOKEN 2048 @@ -1764,7 +1765,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) log_error("failed to build config directory array"); return NULL; } - if (!strv_path_canonicalize(rules->dirs)) { + if (!path_strv_canonicalize(rules->dirs)) { log_error("failed to canonicalize config directories\n"); return NULL; } -- cgit v1.2.3-54-g00ecf From f7f21d33db5dfe88dc8175c61dada44013347729 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 21 May 2012 17:22:36 +0200 Subject: cryptsetup: a few simplifications --- TODO | 2 ++ src/core/mount.c | 3 ++- src/cryptsetup/cryptsetup-generator.c | 44 +++++++++++++++++++---------------- 3 files changed, 28 insertions(+), 21 deletions(-) (limited to 'src/cryptsetup') diff --git a/TODO b/TODO index fce136dc6b..f2a844e06b 100644 --- a/TODO +++ b/TODO @@ -23,6 +23,8 @@ Bugfixes: Features: +* readahead: when bumping /sys readahead variable save mtime and compare later to detect changes + * in rescue mode don't pull in sockets * Document boot options such as forcefsck diff --git a/src/core/mount.c b/src/core/mount.c index aa81cc6ed7..0c62e8835a 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1647,7 +1647,8 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { goto clean_up; } - if (asprintf(&o, "%s,%s", options, options2) < 0) { + o = join(options, ",", options2, NULL); + if (!o) { r = -ENOMEM; goto finish; } diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 4d10373a79..edc28998b2 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -76,31 +76,36 @@ static int create_disk( noauto = has_option(options, "noauto"); nofail = has_option(options, "nofail"); - if (!(n = unit_name_build_escape("cryptsetup", name, ".service"))) { + n = unit_name_build_escape("cryptsetup", name, ".service"); + if (!n) { r = -ENOMEM; log_error("Failed to allocate unit name."); goto fail; } - if (asprintf(&p, "%s/%s", arg_dest, n) < 0) { + p = join(arg_dest, "/", n, NULL); + if (!p) { r = -ENOMEM; log_error("Failed to allocate unit file name."); goto fail; } - if (!(u = fstab_node_to_udev_node(device))) { + u = fstab_node_to_udev_node(device); + if (!u) { r = -ENOMEM; log_error("Failed to allocate device node."); goto fail; } - if (!(d = unit_name_from_path(u, ".device"))) { + d = unit_name_from_path(u, ".device"); + if (!d) { r = -ENOMEM; log_error("Failed to allocate device name."); goto fail; } - if (!(f = fopen(p, "wxe"))) { + f = fopen(p, "wxe"); + if (!f) { r = -errno; log_error("Failed to create unit file: %m"); goto fail; @@ -164,13 +169,13 @@ static int create_disk( if (!noauto) { - if (asprintf(&to, "%s/%s.wants/%s", arg_dest, d, n) < 0) { + to = join(arg_dest, "/", d, ".wants/", n, NULL); + if (!to) { r = -ENOMEM; goto fail; } mkdir_parents(to, 0755); - if (symlink(from, to) < 0) { log_error("Failed to create symlink '%s' to '%s': %m", from, to); r = -errno; @@ -178,38 +183,35 @@ static int create_disk( } free(to); - to = NULL; if (!nofail) - asprintf(&to, "%s/cryptsetup.target.requires/%s", arg_dest, n); + to = join(arg_dest, "/cryptsetup.target.requires/", n, NULL); else - asprintf(&to, "%s/cryptsetup.target.wants/%s", arg_dest, n); - + to = join(arg_dest, "/cryptsetup.target.wants/", n, NULL); if (!to) { r = -ENOMEM; goto fail; } mkdir_parents(to, 0755); - if (symlink(from, to) < 0) { log_error("Failed to create symlink '%s' to '%s': %m", from, to); r = -errno; goto fail; } - } - free(to); - to = NULL; + free(to); + to = NULL; + } e = unit_name_escape(name); - if (asprintf(&to, "%s/dev-mapper-%s.device.requires/%s", arg_dest, e, n) < 0) { + to = join(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL); + if (!to) { r = -ENOMEM; goto fail; } mkdir_parents(to, 0755); - if (symlink(from, to) < 0) { log_error("Failed to create symlink '%s' to '%s': %m", from, to); r = -errno; @@ -252,7 +254,8 @@ int main(int argc, char *argv[]) { umask(0022); - if (!(f = fopen("/etc/crypttab", "re"))) { + f = fopen("/etc/crypttab", "re"); + if (!f) { if (errno == ENOENT) r = EXIT_SUCCESS; @@ -269,7 +272,7 @@ int main(int argc, char *argv[]) { char *name = NULL, *device = NULL, *password = NULL, *options = NULL; int k; - if (!(fgets(line, sizeof(line), f))) + if (!fgets(line, sizeof(line), f)) break; n++; @@ -278,7 +281,8 @@ int main(int argc, char *argv[]) { if (*l == '#' || *l == 0) continue; - if ((k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options)) < 2 || k > 4) { + k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options); + if (k < 2 || k > 4) { log_error("Failed to parse /etc/crypttab:%u, ignoring.", n); r = EXIT_FAILURE; goto next; -- cgit v1.2.3-54-g00ecf From 2a2aab602e1d8b6bf0b440730e379f9dd6586b80 Mon Sep 17 00:00:00 2001 From: Matthew Monaco Date: Sat, 19 May 2012 09:05:50 -0600 Subject: cryptsetup: support discards (TRIM) --- src/cryptsetup/cryptsetup.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 6d4e965fe1..b26fcca836 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -41,6 +41,7 @@ static char *opt_hash = NULL; static unsigned opt_tries = 0; static bool opt_readonly = false; static bool opt_verify = false; +static bool opt_discards = false; static usec_t opt_timeout = DEFAULT_TIMEOUT_USEC; /* Options Debian's crypttab knows we don't: @@ -98,6 +99,8 @@ static int parse_one_option(const char *option) { opt_readonly = true; else if (streq(option, "verify")) opt_verify = true; + else if (streq(option, "allow-discards")) + opt_discards = true; else if (streq(option, "luks")) opt_type = CRYPT_LUKS1; else if (streq(option, "plain") || @@ -314,6 +317,9 @@ int main(int argc, char *argv[]) { if (opt_readonly) flags |= CRYPT_ACTIVATE_READONLY; + if (opt_discards) + flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS; + if (opt_timeout > 0) until = now(CLOCK_MONOTONIC) + opt_timeout; else -- cgit v1.2.3-54-g00ecf From 6b1dc2bd3cdb3bd932b0692be636ddd2879edb92 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 May 2012 19:23:33 +0200 Subject: mount: replace PID1 internal fstab parser with generator Bit by bit we should remove non-unit parsing from PID 1 and move into generators, to clean up our code base a bit and clearly separate parsers. --- .gitignore | 1 + Makefile.am | 12 +- TODO | 6 +- src/core/automount.c | 12 +- src/core/dbus-mount.c | 6 - src/core/dbus-swap.c | 2 - src/core/mount.c | 312 ++++++-------------- src/core/mount.h | 2 - src/core/swap.c | 104 +++---- src/core/swap.h | 4 - src/cryptsetup/cryptsetup-generator.c | 1 + src/fstab-generator/Makefile | 1 + src/fstab-generator/fstab-generator.c | 517 ++++++++++++++++++++++++++++++++++ 13 files changed, 657 insertions(+), 323 deletions(-) create mode 120000 src/fstab-generator/Makefile create mode 100644 src/fstab-generator/fstab-generator.c (limited to 'src/cryptsetup') diff --git a/.gitignore b/.gitignore index 01fba83563..e8d2feae4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/systemd-fstab-generator /systemd-delta /systemd-sleep /systemd-inhibit diff --git a/Makefile.am b/Makefile.am index 4c1b295cc5..08f8bfc534 100644 --- a/Makefile.am +++ b/Makefile.am @@ -237,7 +237,8 @@ rootlibexec_PROGRAMS = \ systemd-sleep systemgenerator_PROGRAMS = \ - systemd-getty-generator + systemd-getty-generator \ + systemd-fstab-generator dist_bashcompletion_DATA = \ bash-completion/systemd-bash-completion.sh @@ -1133,6 +1134,15 @@ systemd_getty_generator_LDADD = \ libsystemd-label.la \ libsystemd-shared.la +# ------------------------------------------------------------------------------ +systemd_fstab_generator_SOURCES = \ + src/fstab-generator/fstab-generator.c \ + src/core/mount-setup.c + +systemd_fstab_generator_LDADD = \ + libsystemd-label.la \ + libsystemd-shared.la + # ------------------------------------------------------------------------------ systemd_rc_local_generator_SOURCES = \ src/rc-local-generator/rc-local-generator.c diff --git a/TODO b/TODO index da8bef6548..a967efa31b 100644 --- a/TODO +++ b/TODO @@ -23,6 +23,8 @@ Bugfixes: Features: +* replace sysvpath by a new more generic property + * make sure show-logs checks for utf8 validity, not ascii validity * add CapbilityBoundingSet to system.conf to set system-wide caps bounds, and same for TimerSlackNS @@ -31,8 +33,6 @@ Features: * readahead: when bumping /sys readahead variable save mtime and compare later to detect changes -* in rescue mode don't pull in sockets - * Document boot options such as forcefsck * (attempt to) make Debianites happy: @@ -51,8 +51,6 @@ Features: * move passno parsing to fstab generator -* actually queue the new default unit after switch-root - * improve !/proc/*/loginuid situation: make /proc/*/loginuid less dependent on CONFIG_AUDIT, or use the users cgroup information when /proc/*/loginuid is not available. diff --git a/src/core/automount.c b/src/core/automount.c index f190417fa3..e13259b388 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -156,14 +156,12 @@ static int automount_add_default_dependencies(Automount *a) { assert(a); - if (UNIT(a)->manager->running_as == MANAGER_SYSTEM) { - - if ((r = unit_add_dependency_by_name(UNIT(a), UNIT_BEFORE, SPECIAL_BASIC_TARGET, NULL, true)) < 0) - return r; + if (UNIT(a)->manager->running_as != MANAGER_SYSTEM) + return 0; - if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) - return r; - } + r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true); + if (r < 0) + return r; return 0; } diff --git a/src/core/dbus-mount.c b/src/core/dbus-mount.c index f6db4682af..26b04abe5d 100644 --- a/src/core/dbus-mount.c +++ b/src/core/dbus-mount.c @@ -80,8 +80,6 @@ static int bus_mount_append_what(DBusMessageIter *i, const char *property, void d = m->parameters_proc_self_mountinfo.what; else if (m->from_fragment && m->parameters_fragment.what) d = m->parameters_fragment.what; - else if (m->from_etc_fstab && m->parameters_etc_fstab.what) - d = m->parameters_etc_fstab.what; else d = ""; @@ -103,8 +101,6 @@ static int bus_mount_append_options(DBusMessageIter *i, const char *property, vo d = m->parameters_proc_self_mountinfo.options; else if (m->from_fragment && m->parameters_fragment.options) d = m->parameters_fragment.options; - else if (m->from_etc_fstab && m->parameters_etc_fstab.options) - d = m->parameters_etc_fstab.options; else d = ""; @@ -126,8 +122,6 @@ static int bus_mount_append_type(DBusMessageIter *i, const char *property, void d = m->parameters_proc_self_mountinfo.fstype; else if (m->from_fragment && m->parameters_fragment.fstype) d = m->parameters_fragment.fstype; - else if (m->from_etc_fstab && m->parameters_etc_fstab.fstype) - d = m->parameters_etc_fstab.fstype; else d = ""; diff --git a/src/core/dbus-swap.c b/src/core/dbus-swap.c index f327ca8b02..3ede0e606e 100644 --- a/src/core/dbus-swap.c +++ b/src/core/dbus-swap.c @@ -75,8 +75,6 @@ static int bus_swap_append_priority(DBusMessageIter *i, const char *property, vo j = s->parameters_proc_swaps.priority; else if (s->from_fragment) j = s->parameters_fragment.priority; - else if (s->from_etc_fstab) - j = s->parameters_etc_fstab.priority; else j = -1; diff --git a/src/core/mount.c b/src/core/mount.c index b597e9bfe2..e8f8856414 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -68,9 +68,13 @@ static void mount_init(Unit *u) { exec_context_init(&m->exec_context); - /* The stdio/kmsg bridge socket is on /, in order to avoid a - * dep loop, don't use kmsg logging for -.mount */ - if (!unit_has_name(u, "-.mount")) { + if (unit_has_name(u, "-.mount")) { + /* Don't allow start/stop for root directory */ + UNIT(m)->refuse_manual_start = true; + UNIT(m)->refuse_manual_stop = true; + } else { + /* The stdio/kmsg bridge socket is on /, in order to avoid a + * dep loop, don't use kmsg logging for -.mount */ m->exec_context.std_output = u->manager->default_std_output; m->exec_context.std_error = u->manager->default_std_error; } @@ -116,7 +120,6 @@ static void mount_done(Unit *u) { free(m->where); m->where = NULL; - mount_parameters_done(&m->parameters_etc_fstab); mount_parameters_done(&m->parameters_proc_self_mountinfo); mount_parameters_done(&m->parameters_fragment); @@ -129,13 +132,11 @@ static void mount_done(Unit *u) { unit_unwatch_timer(u, &m->timer_watch); } -static MountParameters* get_mount_parameters_configured(Mount *m) { +static MountParameters* get_mount_parameters_fragment(Mount *m) { assert(m); if (m->from_fragment) return &m->parameters_fragment; - else if (m->from_etc_fstab) - return &m->parameters_etc_fstab; return NULL; } @@ -146,7 +147,7 @@ static MountParameters* get_mount_parameters(Mount *m) { if (m->from_proc_self_mountinfo) return &m->parameters_proc_self_mountinfo; - return get_mount_parameters_configured(m); + return get_mount_parameters_fragment(m); } static int mount_add_mount_links(Mount *m) { @@ -156,7 +157,7 @@ static int mount_add_mount_links(Mount *m) { assert(m); - pm = get_mount_parameters_configured(m); + pm = get_mount_parameters_fragment(m); /* Adds in links to other mount points that might lie below or * above us in the hierarchy */ @@ -171,7 +172,7 @@ static int mount_add_mount_links(Mount *m) { if (UNIT(n)->load_state != UNIT_LOADED) continue; - pn = get_mount_parameters_configured(n); + pn = get_mount_parameters_fragment(n); if (path_startswith(m->where, n->where)) { @@ -336,160 +337,113 @@ static bool needs_quota(MountParameters *p) { mount_test_option(p->options, "grpjquota"); } -static int mount_add_fstab_links(Mount *m) { - const char *target, *after, *tu_wants = NULL; - MountParameters *p; - Unit *tu; - int r; - bool noauto, nofail, automount; - - assert(m); - - if (UNIT(m)->manager->running_as != MANAGER_SYSTEM) - return 0; - - if (!(p = get_mount_parameters_configured(m))) - return 0; - - if (p != &m->parameters_etc_fstab) - return 0; - - noauto = !!mount_test_option(p->options, "noauto"); - nofail = !!mount_test_option(p->options, "nofail"); - automount = - mount_test_option(p->options, "comment=systemd.automount") || - mount_test_option(p->options, "x-systemd.automount"); - - if (mount_is_network(p)) { - target = SPECIAL_REMOTE_FS_TARGET; - after = tu_wants = SPECIAL_REMOTE_FS_PRE_TARGET; - } else { - target = SPECIAL_LOCAL_FS_TARGET; - after = SPECIAL_LOCAL_FS_PRE_TARGET; - } - - r = manager_load_unit(UNIT(m)->manager, target, NULL, NULL, &tu); - if (r < 0) - return r; - - if (tu_wants) { - r = unit_add_dependency_by_name(tu, UNIT_WANTS, tu_wants, NULL, true); - if (r < 0) - return r; - } - - if (after) { - r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after, NULL, true); - if (r < 0) - return r; - } - - if (automount) { - Unit *am; - - if ((r = unit_load_related_unit(UNIT(m), ".automount", &am)) < 0) - return r; - - /* If auto is configured as well also pull in the - * mount right-away, but don't rely on it. */ - if (!noauto) /* automount + auto */ - if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0) - return r; - - /* Install automount unit */ - if (!nofail) /* automount + fail */ - return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_REQUIRES, am, true); - else /* automount + nofail */ - return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_WANTS, am, true); - - } else if (!noauto) { - - /* Automatically add mount points that aren't natively - * configured to local-fs.target */ - - if (!nofail) /* auto + fail */ - return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true); - else /* auto + nofail */ - return unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true); - } - - return 0; -} - static int mount_add_device_links(Mount *m) { MountParameters *p; int r; assert(m); - if (!(p = get_mount_parameters_configured(m))) + p = get_mount_parameters_fragment(m); + if (!p) return 0; if (!p->what) return 0; if (!mount_is_bind(p) && - !path_equal(m->where, "/") && - p == &m->parameters_etc_fstab) { - bool nofail, noauto; - - noauto = !!mount_test_option(p->options, "noauto"); - nofail = !!mount_test_option(p->options, "nofail"); - - if ((r = unit_add_node_link(UNIT(m), p->what, - !noauto && nofail && - UNIT(m)->manager->running_as == MANAGER_SYSTEM)) < 0) + !path_equal(m->where, "/")) { + r = unit_add_node_link(UNIT(m), p->what, false); + if (r < 0) return r; } if (p->passno > 0 && !mount_is_bind(p) && - UNIT(m)->manager->running_as == MANAGER_SYSTEM && - !path_equal(m->where, "/")) { + !path_equal(m->where, "/") && + UNIT(m)->manager->running_as == MANAGER_SYSTEM) { char *name; Unit *fsck; /* Let's add in the fsck service */ /* aka SPECIAL_FSCK_SERVICE */ - if (!(name = unit_name_from_path_instance("fsck", p->what, ".service"))) + name = unit_name_from_path_instance("fsck", p->what, ".service"); + if (!name) return -ENOMEM; - if ((r = manager_load_unit_prepare(UNIT(m)->manager, name, NULL, NULL, &fsck)) < 0) { + r = manager_load_unit_prepare(UNIT(m)->manager, name, NULL, NULL, &fsck); + if (r < 0) { log_warning("Failed to prepare unit %s: %s", name, strerror(-r)); free(name); return r; } - free(name); SERVICE(fsck)->fsck_passno = p->passno; - if ((r = unit_add_two_dependencies(UNIT(m), UNIT_AFTER, UNIT_REQUIRES, fsck, true)) < 0) + r = unit_add_two_dependencies(UNIT(m), UNIT_AFTER, UNIT_REQUIRES, fsck, true); + if (r < 0) return r; } return 0; } +static int mount_add_quota_links(Mount *m) { + int r; + MountParameters *p; + + assert(m); + + if (UNIT(m)->manager->running_as != MANAGER_SYSTEM) + return 0; + + p = get_mount_parameters_fragment(m); + if (!p) + return 0; + + if (!needs_quota(p)) + return 0; + + r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTACHECK_SERVICE, NULL, true); + if (r < 0) + return r; + + r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTAON_SERVICE, NULL, true); + if (r < 0) + return r; + + return 0; +} + static int mount_add_default_dependencies(Mount *m) { int r; MountParameters *p; + const char *after; assert(m); if (UNIT(m)->manager->running_as != MANAGER_SYSTEM) return 0; - p = get_mount_parameters_configured(m); - if (p && needs_quota(p)) { - if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTACHECK_SERVICE, NULL, true)) < 0 || - (r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTAON_SERVICE, NULL, true)) < 0) - return r; - } + p = get_mount_parameters_fragment(m); + if (!p) + return 0; - if (!path_equal(m->where, "/")) - if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) - return r; + if (path_equal(m->where, "/")) + return 0; + + if (mount_is_network(p)) + after = SPECIAL_REMOTE_FS_PRE_TARGET; + else + after = SPECIAL_LOCAL_FS_PRE_TARGET; + + r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_WANTS, UNIT_AFTER, after, NULL, true); + if (r < 0) + return r; + + r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true); + if (r < 0) + return r; return 0; } @@ -505,7 +459,8 @@ static int mount_fix_timeouts(Mount *m) { assert(m); - if (!(p = get_mount_parameters_configured(m))) + p = get_mount_parameters_fragment(m); + if (!p) return 0; /* Allow configuration how long we wait for a device that @@ -550,7 +505,7 @@ static int mount_verify(Mount *m) { if (UNIT(m)->load_state != UNIT_LOADED) return 0; - if (!m->from_etc_fstab && !m->from_fragment && !m->from_proc_self_mountinfo) + if (!m->from_fragment && !m->from_proc_self_mountinfo) return -ENOENT; if (!(e = unit_name_from_path(m->where, ".mount"))) @@ -599,11 +554,6 @@ static int mount_load(Unit *u) { if (UNIT(m)->fragment_path) m->from_fragment = true; - else if (m->from_etc_fstab) - /* We always add several default dependencies to fstab mounts, - * but we do not want the implicit complementing of Wants= with After= - * in the target unit that this mount unit will be hooked into. */ - UNIT(m)->default_dependencies = false; if (!m->where) if (!(m->where = unit_name_to_path(u->id))) @@ -637,10 +587,11 @@ static int mount_load(Unit *u) { if ((r = mount_add_automount_links(m)) < 0) return r; - if ((r = mount_add_fstab_links(m)) < 0) + r = mount_add_quota_links(m); + if (r < 0) return r; - if (UNIT(m)->default_dependencies || m->from_etc_fstab) + if (UNIT(m)->default_dependencies) if ((r = mount_add_default_dependencies(m)) < 0) return r; @@ -775,7 +726,6 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) { "%sWhat: %s\n" "%sFile System Type: %s\n" "%sOptions: %s\n" - "%sFrom /etc/fstab: %s\n" "%sFrom /proc/self/mountinfo: %s\n" "%sFrom fragment: %s\n" "%sDirectoryMode: %04o\n", @@ -785,7 +735,6 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) { prefix, strna(p->what), prefix, strna(p->fstype), prefix, strna(p->options), - prefix, yes_no(m->from_etc_fstab), prefix, yes_no(m->from_proc_self_mountinfo), prefix, yes_no(m->from_fragment), prefix, m->directory_mode); @@ -969,7 +918,7 @@ static void mount_enter_mounting(Mount *m) { mkdir_p(m->where, m->directory_mode); /* Create the source directory for bind-mounts if needed */ - p = get_mount_parameters_configured(m); + p = get_mount_parameters_fragment(m); if (p && mount_is_bind(p)) mkdir_p(p->what, m->directory_mode); @@ -982,12 +931,6 @@ static void mount_enter_mounting(Mount *m) { "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto", m->parameters_fragment.options ? "-o" : NULL, m->parameters_fragment.options, NULL); - else if (m->from_etc_fstab) - r = exec_command_set( - m->control_command, - "/bin/mount", - m->where, - NULL); else r = -ENOENT; @@ -1046,14 +989,7 @@ static void mount_enter_remounting(Mount *m) { NULL); free(buf); - } else if (m->from_etc_fstab) - r = exec_command_set( - m->control_command, - "/bin/mount", - m->where, - "-o", "remount", - NULL); - else + } else r = -ENOENT; if (r < 0) @@ -1232,7 +1168,7 @@ static bool mount_check_gc(Unit *u) { assert(m); - return m->from_etc_fstab || m->from_proc_self_mountinfo; + return m->from_proc_self_mountinfo; } static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) { @@ -1416,7 +1352,6 @@ static int mount_add_one( const char *options, const char *fstype, int passno, - bool from_proc_self_mountinfo, bool set_flags) { int r; Unit *u; @@ -1430,8 +1365,6 @@ static int mount_add_one( assert(options); assert(fstype); - assert(!set_flags || from_proc_self_mountinfo); - /* Ignore API mount points. They should never be referenced in * dependencies ever. */ if (mount_point_is_api(where) || mount_point_ignore(where)) @@ -1483,21 +1416,15 @@ static int mount_add_one( goto fail; } - if (from_proc_self_mountinfo) { - p = &MOUNT(u)->parameters_proc_self_mountinfo; - - if (set_flags) { - MOUNT(u)->is_mounted = true; - MOUNT(u)->just_mounted = !MOUNT(u)->from_proc_self_mountinfo; - MOUNT(u)->just_changed = !streq_ptr(p->options, o); - } - - MOUNT(u)->from_proc_self_mountinfo = true; - } else { - p = &MOUNT(u)->parameters_etc_fstab; - MOUNT(u)->from_etc_fstab = true; + p = &MOUNT(u)->parameters_proc_self_mountinfo; + if (set_flags) { + MOUNT(u)->is_mounted = true; + MOUNT(u)->just_mounted = !MOUNT(u)->from_proc_self_mountinfo; + MOUNT(u)->just_changed = !streq_ptr(p->options, o); } + MOUNT(u)->from_proc_self_mountinfo = true; + free(p->what); p->what = w; @@ -1545,68 +1472,6 @@ static int mount_find_pri(char *options) { return (int) r; } -static int mount_load_etc_fstab(Manager *m) { - FILE *f; - int r = 0; - struct mntent* me; - - assert(m); - - errno = 0; - f = setmntent("/etc/fstab", "r"); - if (!f) - return errno == ENOENT ? 0 : -errno; - - while ((me = getmntent(f))) { - char *where, *what; - int k; - - if (!(what = fstab_node_to_udev_node(me->mnt_fsname))) { - r = -ENOMEM; - goto finish; - } - - if (!(where = strdup(me->mnt_dir))) { - free(what); - r = -ENOMEM; - goto finish; - } - - if (what[0] == '/') - path_kill_slashes(what); - - if (where[0] == '/') - path_kill_slashes(where); - - if (streq(me->mnt_type, "swap")) { - int pri; - - if ((pri = mount_find_pri(me->mnt_opts)) < 0) - k = pri; - else - k = swap_add_one(m, - what, - NULL, - pri, - !!mount_test_option(me->mnt_opts, "noauto"), - !!mount_test_option(me->mnt_opts, "nofail"), - false); - } else - k = mount_add_one(m, what, where, me->mnt_opts, me->mnt_type, me->mnt_passno, false, false); - - free(what); - free(where); - - if (k < 0) - r = k; - } - -finish: - - endmntent(f); - return r; -} - static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { int r = 0; unsigned i; @@ -1659,7 +1524,7 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { goto finish; } - if ((k = mount_add_one(m, d, p, o, fstype, 0, true, set_flags)) < 0) + if ((k = mount_add_one(m, d, p, o, fstype, 0, set_flags)) < 0) r = k; clean_up: @@ -1715,9 +1580,6 @@ static int mount_enumerate(Manager *m) { return -errno; } - if ((r = mount_load_etc_fstab(m)) < 0) - goto fail; - if ((r = mount_load_proc_self_mountinfo(m, false)) < 0) goto fail; diff --git a/src/core/mount.h b/src/core/mount.h index 3153a2a99d..ad9efc34d5 100644 --- a/src/core/mount.h +++ b/src/core/mount.h @@ -75,11 +75,9 @@ struct Mount { char *where; - MountParameters parameters_etc_fstab; MountParameters parameters_proc_self_mountinfo; MountParameters parameters_fragment; - bool from_etc_fstab:1; bool from_proc_self_mountinfo:1; bool from_fragment:1; diff --git a/src/core/swap.c b/src/core/swap.c index ba4413bd3c..f677d65bd2 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -87,7 +87,7 @@ static void swap_init(Unit *u) { s->exec_context.std_output = u->manager->default_std_output; s->exec_context.std_error = u->manager->default_std_error; - s->parameters_etc_fstab.priority = s->parameters_proc_swaps.priority = s->parameters_fragment.priority = -1; + s->parameters_proc_swaps.priority = s->parameters_fragment.priority = -1; s->timer_watch.type = WATCH_INVALID; @@ -116,9 +116,8 @@ static void swap_done(Unit *u) { free(s->what); s->what = NULL; - free(s->parameters_etc_fstab.what); free(s->parameters_fragment.what); - s->parameters_etc_fstab.what = s->parameters_fragment.what = NULL; + s->parameters_fragment.what = NULL; exec_context_done(&s->exec_context); exec_command_done_array(s->exec_command, _SWAP_EXEC_COMMAND_MAX); @@ -166,28 +165,16 @@ static int swap_add_mount_links(Swap *s) { static int swap_add_target_links(Swap *s) { Unit *tu; - SwapParameters *p; int r; assert(s); - if (s->from_fragment) - p = &s->parameters_fragment; - else if (s->from_etc_fstab) - p = &s->parameters_etc_fstab; - else + if (!s->from_fragment) return 0; if ((r = manager_load_unit(UNIT(s)->manager, SPECIAL_SWAP_TARGET, NULL, NULL, &tu)) < 0) return r; - if (!p->noauto && - !p->nofail && - s->from_etc_fstab && - UNIT(s)->manager->running_as == MANAGER_SYSTEM) - if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0) - return r; - return unit_add_dependency(UNIT(s), UNIT_BEFORE, tu, true); } @@ -201,8 +188,6 @@ static int swap_add_device_links(Swap *s) { if (s->from_fragment) p = &s->parameters_fragment; - else if (s->from_etc_fstab) - p = &s->parameters_etc_fstab; else return 0; @@ -222,11 +207,12 @@ static int swap_add_default_dependencies(Swap *s) { assert(s); - if (UNIT(s)->manager->running_as == MANAGER_SYSTEM) { + if (UNIT(s)->manager->running_as != MANAGER_SYSTEM) + return 0; - if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) - return r; - } + r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true); + if (r < 0) + return r; return 0; } @@ -278,8 +264,6 @@ static int swap_load(Unit *u) { if (!s->what) { if (s->parameters_fragment.what) s->what = strdup(s->parameters_fragment.what); - else if (s->parameters_etc_fstab.what) - s->what = strdup(s->parameters_etc_fstab.what); else if (s->parameters_proc_swaps.what) s->what = strdup(s->parameters_proc_swaps.what); else @@ -315,7 +299,7 @@ static int swap_load(Unit *u) { return swap_verify(s); } -int swap_add_one( +static int swap_add_one( Manager *m, const char *what, const char *what_proc_swaps, @@ -329,9 +313,11 @@ int swap_add_one( bool delete = false; int r; SwapParameters *p; + Swap *first; assert(m); assert(what); + assert(what_proc_swaps); e = unit_name_from_path(what, ".swap"); if (!e) @@ -339,8 +325,7 @@ int swap_add_one( u = manager_get_unit(m, e); - if (what_proc_swaps && - u && + if (u && SWAP(u)->from_proc_swaps && !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps)) return -EEXIST; @@ -368,54 +353,37 @@ int swap_add_one( } else delete = false; - if (what_proc_swaps) { - Swap *first; + p = &SWAP(u)->parameters_proc_swaps; - p = &SWAP(u)->parameters_proc_swaps; + if (!p->what) { + if (!(wp = strdup(what_proc_swaps))) { + r = -ENOMEM; + goto fail; + } - if (!p->what) { - if (!(wp = strdup(what_proc_swaps))) { + if (!m->swaps_by_proc_swaps) + if (!(m->swaps_by_proc_swaps = hashmap_new(string_hash_func, string_compare_func))) { r = -ENOMEM; goto fail; } - if (!m->swaps_by_proc_swaps) - if (!(m->swaps_by_proc_swaps = hashmap_new(string_hash_func, string_compare_func))) { - r = -ENOMEM; - goto fail; - } - - free(p->what); - p->what = wp; - - first = hashmap_get(m->swaps_by_proc_swaps, wp); - LIST_PREPEND(Swap, same_proc_swaps, first, SWAP(u)); - - if ((r = hashmap_replace(m->swaps_by_proc_swaps, wp, first)) < 0) - goto fail; - } - - if (set_flags) { - SWAP(u)->is_active = true; - SWAP(u)->just_activated = !SWAP(u)->from_proc_swaps; - } - - SWAP(u)->from_proc_swaps = true; + free(p->what); + p->what = wp; - } else { - p = &SWAP(u)->parameters_etc_fstab; + first = hashmap_get(m->swaps_by_proc_swaps, wp); + LIST_PREPEND(Swap, same_proc_swaps, first, SWAP(u)); - if (!(wp = strdup(what))) { - r = -ENOMEM; + if ((r = hashmap_replace(m->swaps_by_proc_swaps, wp, first)) < 0) goto fail; - } - - free(p->what); - p->what = wp; + } - SWAP(u)->from_etc_fstab = true; + if (set_flags) { + SWAP(u)->is_active = true; + SWAP(u)->just_activated = !SWAP(u)->from_proc_swaps; } + SWAP(u)->from_proc_swaps = true; + p->priority = priority; p->noauto = noauto; p->nofail = nofail; @@ -567,8 +535,6 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { p = &s->parameters_proc_swaps; else if (s->from_fragment) p = &s->parameters_fragment; - else - p = &s->parameters_etc_fstab; fprintf(f, "%sSwap State: %s\n" @@ -577,7 +543,6 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { "%sPriority: %i\n" "%sNoAuto: %s\n" "%sNoFail: %s\n" - "%sFrom /etc/fstab: %s\n" "%sFrom /proc/swaps: %s\n" "%sFrom fragment: %s\n", prefix, swap_state_to_string(s->state), @@ -586,7 +551,6 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { prefix, p->priority, prefix, yes_no(p->noauto), prefix, yes_no(p->nofail), - prefix, yes_no(s->from_etc_fstab), prefix, yes_no(s->from_proc_swaps), prefix, yes_no(s->from_fragment)); @@ -732,8 +696,6 @@ static void swap_enter_activating(Swap *s) { if (s->from_fragment) priority = s->parameters_fragment.priority; - else if (s->from_etc_fstab) - priority = s->parameters_etc_fstab.priority; else priority = -1; @@ -928,7 +890,7 @@ static bool swap_check_gc(Unit *u) { assert(s); - return s->from_etc_fstab || s->from_proc_swaps; + return s->from_proc_swaps; } static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) { @@ -1269,8 +1231,6 @@ static int swap_enumerate(Manager *m) { return -errno; } - /* We rely on mount.c to load /etc/fstab for us */ - if ((r = swap_load_proc_swaps(m, false)) < 0) swap_shutdown(m); diff --git a/src/core/swap.h b/src/core/swap.h index 2a6fceece2..ff12169b68 100644 --- a/src/core/swap.h +++ b/src/core/swap.h @@ -71,11 +71,9 @@ struct Swap { char *what; - SwapParameters parameters_etc_fstab; SwapParameters parameters_proc_swaps; SwapParameters parameters_fragment; - bool from_etc_fstab:1; bool from_proc_swaps:1; bool from_fragment:1; @@ -108,8 +106,6 @@ struct Swap { extern const UnitVTable swap_vtable; -int swap_add_one(Manager *m, const char *what, const char *what_proc_swaps, int prio, bool no_auto, bool no_fail, bool set_flags); - int swap_add_one_mount_link(Swap *s, Mount *m); int swap_dispatch_reload(Manager *m); diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index edc28998b2..c0b1cf0939 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -112,6 +112,7 @@ static int create_disk( } fprintf(f, + "# Automatically generated by systemd-cryptsetup-generator\n\n" "[Unit]\n" "Description=Cryptography Setup for %%I\n" "Conflicts=umount.target\n" diff --git a/src/fstab-generator/Makefile b/src/fstab-generator/Makefile new file mode 120000 index 0000000000..d0b0e8e008 --- /dev/null +++ b/src/fstab-generator/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c new file mode 100644 index 0000000000..39af18a9c8 --- /dev/null +++ b/src/fstab-generator/fstab-generator.c @@ -0,0 +1,517 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of systemd. + + Copyright 2012 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see . +***/ + +#include +#include +#include +#include +#include + +#include "log.h" +#include "util.h" +#include "unit-name.h" +#include "path-util.h" +#include "mount-setup.h" +#include "special.h" +#include "mkdir.h" + +static const char *arg_dest = "/tmp"; + +static int device_name(const char *path, char **unit) { + char *p; + + assert(path); + + if (!is_device_path(path)) + return 0; + + p = unit_name_from_path(path, ".device"); + if (!p) + return -ENOMEM; + + *unit = p; + return 1; +} + +static int mount_find_pri(struct mntent *me, int *ret) { + char *end, *pri; + unsigned long r; + + assert(me); + assert(ret); + + pri = hasmntopt(me, "pri"); + if (!pri) + return 0; + + pri += 4; + + errno = 0; + r = strtoul(pri, &end, 10); + if (errno != 0) + return -errno; + + if (end == pri || (*end != ',' && *end != 0)) + return -EINVAL; + + *ret = (int) r; + return 1; +} + +static int add_swap(const char *what, struct mntent *me) { + char *name = NULL, *unit = NULL, *lnk = NULL, *device = NULL; + FILE *f = NULL; + bool noauto, nofail; + int r, pri = -1; + + assert(what); + assert(me); + + r = mount_find_pri(me, &pri); + if (r < 0) { + log_error("Failed to parse priority"); + return pri; + } + + noauto = !!hasmntopt(me, "noauto"); + nofail = !!hasmntopt(me, "nofail"); + + name = unit_name_from_path(what, ".swap"); + if (!name) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + unit = join(arg_dest, "/", name, NULL); + if (!unit) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + f = fopen(unit, "wxe"); + if (!f) { + r = -errno; + log_error("Failed to create unit file: %m"); + goto finish; + } + + fputs("# Automatically generated by systemd-fstab-generator\n\n" + "[Unit]\n" + "DefaultDependencies=no\n" + "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" + "Before=" SPECIAL_UMOUNT_TARGET "\n", f); + + if (!noauto && !nofail) + fputs("Before=" SPECIAL_SWAP_TARGET "\n", f); + + fprintf(f, + "\n" + "[Swap]\n" + "What=%s\n", + what); + + if (pri >= 0) + fprintf(f, + "Priority=%i\n", + pri); + + fflush(f); + if (ferror(f)) { + log_error("Failed to write unit file: %m"); + r = -errno; + goto finish; + } + + if (!noauto) { + lnk = join(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL); + if (!lnk) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + mkdir_parents(lnk, 0755); + if (symlink(unit, lnk) < 0) { + log_error("Failed to create symlink: %m"); + r = -errno; + goto finish; + } + + r = device_name(what, &device); + if (r < 0) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + if (r > 0) { + free(lnk); + lnk = join(arg_dest, "/", device, ".wants/", name, NULL); + if (!lnk) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + mkdir_parents(lnk, 0755); + if (symlink(unit, lnk) < 0) { + log_error("Failed to create symlink: %m"); + r = -errno; + goto finish; + } + } + } + + r = 0; +finish: + if (f) + fclose(f); + + free(unit); + free(lnk); + free(name); + free(device); + + return r; +} + +static bool mount_is_bind(struct mntent *me) { + assert(me); + + return + hasmntopt(me, "bind") || + streq(me->mnt_opts, "bind"); +} + +static bool mount_is_network(struct mntent *me) { + assert(me); + + return + hasmntopt(me, "_netdev") || + fstype_is_network(me->mnt_type); +} + +static int add_mount(const char *what, const char *where, struct mntent *me) { + char *name = NULL, *unit = NULL, *lnk = NULL, *device = NULL, *automount_name = NULL, *automount_unit = NULL; + FILE *f = NULL; + bool noauto, nofail, automount, isbind, isnetwork; + int r; + const char *post, *pre; + + assert(what); + assert(where); + assert(me); + + if (streq(me->mnt_type, "autofs")) + return 0; + + if (!is_path(where)) { + log_warning("Mount point %s is not a valid path, ignoring.", where); + return 0; + } + + if (mount_point_is_api(where) || + mount_point_ignore(where)) + return 0; + + isnetwork = mount_is_network(me); + isbind = mount_is_bind(me); + + noauto = !!hasmntopt(me, "noauto"); + nofail = !!hasmntopt(me, "nofail"); + automount = + hasmntopt(me, "comment=systemd.automount") || + hasmntopt(me, "x-systemd.automount"); + + if (isnetwork) { + post = SPECIAL_REMOTE_FS_TARGET; + pre = SPECIAL_REMOTE_FS_PRE_TARGET; + } else { + post = SPECIAL_LOCAL_FS_TARGET; + pre = SPECIAL_LOCAL_FS_PRE_TARGET; + } + + name = unit_name_from_path(where, ".mount"); + if (!name) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + unit = join(arg_dest, "/", name, NULL); + if (!unit) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + f = fopen(unit, "wxe"); + if (!f) { + r = -errno; + log_error("Failed to create unit file: %m"); + goto finish; + } + + fputs("# Automatically generated by systemd-fstab-generator\n\n" + "[Unit]\n" + "DefaultDependencies=no\n", f); + + if (!path_equal(where, "/")) + fprintf(f, + "After=%s\n" + "Wants=%s\n" + "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" + "Before=" SPECIAL_UMOUNT_TARGET "\n", + pre, + pre); + + + if (!noauto && !nofail && !automount) + fprintf(f, + "Before=%s\n", + post); + + fprintf(f, + "\n" + "[Mount]\n" + "What=%s\n" + "Where=%s\n" + "Type=%s\n" + "FsckPassNo=%i\n", + what, + where, + me->mnt_type, + me->mnt_passno); + + if (!isempty(me->mnt_opts) && + !streq(me->mnt_opts, "defaults")) + fprintf(f, + "Options=%s\n", + me->mnt_opts); + + fflush(f); + if (ferror(f)) { + log_error("Failed to write unit file: %m"); + r = -errno; + goto finish; + } + + if (!noauto) { + lnk = join(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); + if (!lnk) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + mkdir_parents(lnk, 0755); + if (symlink(unit, lnk) < 0) { + log_error("Failed to create symlink: %m"); + r = -errno; + goto finish; + } + + if (!isbind && + !path_equal(where, "/")) { + + r = device_name(what, &device); + if (r < 0) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + if (r > 0) { + free(lnk); + lnk = join(arg_dest, "/", device, ".wants/", name, NULL); + if (!lnk) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + mkdir_parents(lnk, 0755); + if (symlink(unit, lnk) < 0) { + log_error("Failed to creat symlink: %m"); + r = -errno; + goto finish; + } + } + } + } + + if (automount && !path_equal(where, "/")) { + automount_name = unit_name_from_path(where, ".automount"); + if (!name) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + automount_unit = join(arg_dest, "/", automount_name, NULL); + if (!automount_unit) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + fclose(f); + f = fopen(automount_unit, "wxe"); + if (!f) { + r = -errno; + log_error("Failed to create unit file: %m"); + goto finish; + } + + fprintf(f, + "# Automatically generated by systemd-fstab-generator\n\n" + "[Unit]\n" + "DefaultDependencies=no\n" + "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" + "Before=" SPECIAL_UMOUNT_TARGET " %s\n" + "\n" + "[Automount]\n" + "Where=%s\n", + post, + where); + + fflush(f); + if (ferror(f)) { + log_error("Failed to write unit file: %m"); + r = -errno; + goto finish; + } + + free(lnk); + lnk = join(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL); + if (!lnk) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + mkdir_parents(lnk, 0755); + if (symlink(automount_unit, lnk) < 0) { + log_error("Failed to create symlink: %m"); + r = -errno; + goto finish; + } + } + + r = 0; +finish: + if (f) + fclose(f); + + free(unit); + free(lnk); + free(name); + free(device); + free(automount_name); + free(automount_unit); + + return r; +} + +static int parse_fstab(void) { + FILE *f; + int r = 0; + struct mntent *me; + + errno = 0; + f = setmntent("/etc/fstab", "r"); + if (!f) { + if (errno == ENOENT) + return 0; + + log_error("Failed to open /etc/fstab: %m"); + return -errno; + } + + while ((me = getmntent(f))) { + char *where, *what; + int k; + + what = fstab_node_to_udev_node(me->mnt_fsname); + if (!what) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + + where = strdup(me->mnt_dir); + if (!where) { + log_error("Out of memory"); + free(what); + r = -ENOMEM; + goto finish; + } + + if (is_path(what)) + path_kill_slashes(what); + + if (is_path(where)) + path_kill_slashes(where); + + log_debug("Found entry what=%s where=%s type=%s", what, where, me->mnt_type); + + if (streq(me->mnt_type, "swap")) + k = add_swap(what, me); + else + k = add_mount(what, where, me); + + free(what); + free(where); + + if (k < 0) + r = k; + } + +finish: + endmntent(f); + return r; +} + +int main(int argc, char *argv[]) { + int r; + + if (argc > 2) { + log_error("This program takes one or no arguments."); + return EXIT_FAILURE; + } + + if (argc > 1) + arg_dest = argv[1]; + + log_set_target(LOG_TARGET_AUTO); + log_parse_environment(); + log_open(); + + log_set_max_level(LOG_DEBUG); + + umask(0022); + + r = parse_fstab(); + + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; +} -- cgit v1.2.3-54-g00ecf From a6903061530cac5fbaa99a080a93221c02c349f9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 May 2012 22:00:37 +0200 Subject: log: make sure generators never log into the journal to avoid activation deadlocks This makes all generators log to kmsg by default. --- src/cryptsetup/cryptsetup-generator.c | 2 +- src/fstab-generator/fstab-generator.c | 2 +- src/getty-generator/getty-generator.c | 2 +- src/journal/journald.c | 2 +- src/rc-local-generator/rc-local-generator.c | 2 +- src/shared/log.c | 5 ++++- src/shared/log.h | 1 + src/system-update-generator/system-update-generator.c | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index c0b1cf0939..7eb122d276 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -249,7 +249,7 @@ int main(int argc, char *argv[]) { if (argc > 1) arg_dest = argv[1]; - log_set_target(LOG_TARGET_AUTO); + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 39af18a9c8..86cbc45b78 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -503,7 +503,7 @@ int main(int argc, char *argv[]) { if (argc > 1) arg_dest = argv[1]; - log_set_target(LOG_TARGET_AUTO); + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 13dca7d1b0..b2e4f52c3c 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_AUTO); + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); diff --git a/src/journal/journald.c b/src/journal/journald.c index 232457aa5b..c429896ac4 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -2774,7 +2774,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_KMSG); + log_set_target(LOG_TARGET_SAFE); log_set_facility(LOG_SYSLOG); log_parse_environment(); log_open(); diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index a5987f977e..1464c8e497 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_AUTO); + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); diff --git a/src/shared/log.c b/src/shared/log.c index da5309888c..6a10dc4540 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -240,7 +240,7 @@ int log_open(void) { return 0; } - if (log_target != LOG_TARGET_AUTO || + if ((log_target != LOG_TARGET_AUTO && log_target != LOG_TARGET_SAFE) || getpid() == 1 || isatty(STDERR_FILENO) <= 0) { @@ -266,6 +266,7 @@ int log_open(void) { } if (log_target == LOG_TARGET_AUTO || + log_target == LOG_TARGET_SAFE || log_target == LOG_TARGET_JOURNAL_OR_KMSG || log_target == LOG_TARGET_SYSLOG_OR_KMSG || log_target == LOG_TARGET_KMSG) { @@ -547,6 +548,7 @@ static int log_dispatch( if (k <= 0 && (log_target == LOG_TARGET_AUTO || + log_target == LOG_TARGET_SAFE || log_target == LOG_TARGET_SYSLOG_OR_KMSG || log_target == LOG_TARGET_JOURNAL_OR_KMSG || log_target == LOG_TARGET_KMSG)) { @@ -744,6 +746,7 @@ static const char *const log_target_table[] = { [LOG_TARGET_SYSLOG] = "syslog", [LOG_TARGET_SYSLOG_OR_KMSG] = "syslog-or-kmsg", [LOG_TARGET_AUTO] = "auto", + [LOG_TARGET_SAFE] = "safe", [LOG_TARGET_NULL] = "null" }; diff --git a/src/shared/log.h b/src/shared/log.h index b2f5f2a920..59d4c00f7d 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -36,6 +36,7 @@ typedef enum LogTarget{ LOG_TARGET_SYSLOG, LOG_TARGET_SYSLOG_OR_KMSG, LOG_TARGET_AUTO, /* console if stderr is tty, JOURNAL_OR_KMSG otherwise */ + LOG_TARGET_SAFE, /* console if stderr is tty, KMSG otherwise */ LOG_TARGET_NULL, _LOG_TARGET_MAX, _LOG_TARGET_INVALID = -1 diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c index 30fdbc3ee8..f4e8dafebd 100644 --- a/src/system-update-generator/system-update-generator.c +++ b/src/system-update-generator/system-update-generator.c @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) { if (argc > 1) arg_dest = argv[1]; - log_set_target(LOG_TARGET_AUTO); + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); -- cgit v1.2.3-54-g00ecf From 1b64d026af01277e332d10d9e67e2eed5a4ded28 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 May 2012 23:08:24 +0200 Subject: units: remove service sysv_path variable and replace it by generic unit_path UnitPath= is also writable via native units and may be used by generators to clarify from which file a unit is generated. This patch also hooks up the cryptsetup and fstab generators to set UnitPath= accordingly. --- man/systemd.unit.xml | 13 ++++++++ src/core/dbus-service.c | 4 +-- src/core/dbus-unit.c | 1 + src/core/dbus-unit.h | 1 + src/core/load-fragment-gperf.gperf.m4 | 1 + src/core/load-fragment.c | 7 +++++ src/core/service.c | 59 +++++++++++------------------------ src/core/service.h | 4 +-- src/core/socket.c | 4 +-- src/core/unit.c | 19 ++++++++--- src/core/unit.h | 5 ++- src/cryptsetup/cryptsetup-generator.c | 7 ++--- src/fstab-generator/fstab-generator.c | 3 ++ src/systemctl/systemctl.c | 49 ++++++++++------------------- 14 files changed, 85 insertions(+), 92 deletions(-) (limited to 'src/cryptsetup') diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index c0da6523c4..123965bd44 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -897,6 +897,19 @@ instances. + + + SourcePath= + A path to a + configuration file this unit has been + generated from. This is primarily + useful for implementation of generator + tools that convert configuration from + an external configuration file format + into native unit files. Thus + functionality should not be used in + normal units. + Unit file may include a [Install] section, which diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index e0e5ffcbfd..4c6d5f0648 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -29,8 +29,7 @@ #ifdef HAVE_SYSV_COMPAT #define BUS_SERVICE_SYSV_INTERFACE_FRAGMENT \ " \n" \ - " \n" \ - " \n" + " \n" #else #define BUS_SERVICE_SYSV_INTERFACE_FRAGMENT "" #endif @@ -148,7 +147,6 @@ static const BusProperty bus_service_properties[] = { #ifdef HAVE_SYSV_COMPAT { "SysVRunLevels", bus_property_append_string, "s", offsetof(Service, sysv_runlevels), true }, { "SysVStartPriority", bus_property_append_int, "i", offsetof(Service, sysv_start_priority) }, - { "SysVPath", bus_property_append_string, "s", offsetof(Service, sysv_path), true }, #endif { "FsckPassNo", bus_property_append_int, "i", offsetof(Service, fsck_passno) }, { "Result", bus_service_append_service_result,"s", offsetof(Service, result) }, diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 812f1b9f16..f85f3f898a 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -814,6 +814,7 @@ const BusProperty bus_unit_properties[] = { { "ActiveState", bus_unit_append_active_state, "s", 0 }, { "SubState", bus_unit_append_sub_state, "s", 0 }, { "FragmentPath", bus_property_append_string, "s", offsetof(Unit, fragment_path), true }, + { "SourcePath", bus_property_append_string, "s", offsetof(Unit, source_path), true }, { "UnitFileState", bus_unit_append_file_state, "s", 0 }, { "InactiveExitTimestamp",bus_property_append_usec, "t", offsetof(Unit, inactive_exit_timestamp.realtime) }, { "InactiveExitTimestampMonotonic", bus_property_append_usec, "t", offsetof(Unit, inactive_exit_timestamp.monotonic) }, diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h index 9680b56f06..ae94ca2c2b 100644 --- a/src/core/dbus-unit.h +++ b/src/core/dbus-unit.h @@ -87,6 +87,7 @@ " \n" \ " \n" \ " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index 681f2e9ae0..901c20e78e 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -93,6 +93,7 @@ $1.ControlGroupPersistent, config_parse_tristate, 0, Unit.Names, config_parse_unit_names, 0, 0 Unit.Description, config_parse_unit_string_printf, 0, offsetof(Unit, description) Unit.Documentation, config_parse_documentation, 0, offsetof(Unit, documentation) +Unit.SourcePath, config_parse_path, 0, offsetof(Unit, source_path) Unit.Requires, config_parse_unit_deps, UNIT_REQUIRES, 0 Unit.RequiresOverridable, config_parse_unit_deps, UNIT_REQUIRES_OVERRIDABLE, 0 Unit.Requisite, config_parse_unit_deps, UNIT_REQUISITE, 0 diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 3bc053341c..d2267722dd 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -2320,6 +2320,13 @@ static int load_from_path(Unit *u, const char *path) { u->fragment_mtime = timespec_load(&st.st_mtim); + if (u->source_path) { + if (stat(u->source_path, &st) >= 0) + u->source_mtime = timespec_load(&st.st_mtim); + else + u->source_mtime = 0; + } + r = 0; finish: diff --git a/src/core/service.c b/src/core/service.c index 5d82e9b545..940d664701 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -264,9 +264,6 @@ static void service_done(Unit *u) { s->pid_file = NULL; #ifdef HAVE_SYSV_COMPAT - free(s->sysv_path); - s->sysv_path = NULL; - free(s->sysv_runlevels); s->sysv_runlevels = NULL; #endif @@ -504,17 +501,21 @@ static int sysv_exec_commands(Service *s) { ExecCommand *c; assert(s); - assert(s->sysv_path); + assert(s->is_sysv); + assert(UNIT(s)->source_path); - if (!(c = exec_command_new(s->sysv_path, "start"))) + c = exec_command_new(UNIT(s)->source_path, "start"); + if (!c) return -ENOMEM; exec_command_append_list(s->exec_command+SERVICE_EXEC_START, c); - if (!(c = exec_command_new(s->sysv_path, "stop"))) + c = exec_command_new(UNIT(s)->source_path, "stop"); + if (!c) return -ENOMEM; exec_command_append_list(s->exec_command+SERVICE_EXEC_STOP, c); - if (!(c = exec_command_new(s->sysv_path, "reload"))) + c = exec_command_new(UNIT(s)->source_path, "reload"); + if (!c) return -ENOMEM; exec_command_append_list(s->exec_command+SERVICE_EXEC_RELOAD, c); @@ -540,7 +541,8 @@ static int service_load_sysv_path(Service *s, const char *path) { u = UNIT(s); - if (!(f = fopen(path, "re"))) { + f = fopen(path, "re"); + if (!f) { r = errno == ENOENT ? 0 : -errno; goto finish; } @@ -551,13 +553,13 @@ static int service_load_sysv_path(Service *s, const char *path) { goto finish; } - free(s->sysv_path); - if (!(s->sysv_path = strdup(path))) { + free(u->source_path); + u->source_path = strdup(path); + if (!u->source_path) { r = -ENOMEM; goto finish; } - - s->sysv_mtime = timespec_load(&st.st_mtim); + u->source_mtime = timespec_load(&st.st_mtim); if (null_or_empty(&st)) { u->load_state = UNIT_MASKED; @@ -565,6 +567,8 @@ static int service_load_sysv_path(Service *s, const char *path) { goto finish; } + s->is_sysv = true; + while (!feof(f)) { char l[LINE_MAX], *t; @@ -1337,12 +1341,10 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) { } #ifdef HAVE_SYSV_COMPAT - if (s->sysv_path) + if (s->is_sysv) fprintf(f, - "%sSysV Init Script Path: %s\n" "%sSysV Init Script has LSB Header: %s\n" "%sSysVEnabled: %s\n", - prefix, s->sysv_path, prefix, yes_no(s->sysv_has_lsb), prefix, yes_no(s->sysv_enabled)); @@ -2716,7 +2718,7 @@ static bool service_check_gc(Unit *u) { return true; #ifdef HAVE_SYSV_COMPAT - if (s->sysv_path) + if (s->is_sysv) return true; #endif @@ -3626,29 +3628,6 @@ static void service_reset_failed(Unit *u) { s->reload_result = SERVICE_SUCCESS; } -static bool service_need_daemon_reload(Unit *u) { - Service *s = SERVICE(u); - - assert(s); - -#ifdef HAVE_SYSV_COMPAT - if (s->sysv_path) { - struct stat st; - - zero(st); - if (stat(s->sysv_path, &st) < 0) - /* What, cannot access this anymore? */ - return true; - - if (s->sysv_mtime > 0 && - timespec_load(&st.st_mtim) != s->sysv_mtime) - return true; - } -#endif - - return false; -} - static int service_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError *error) { Service *s = SERVICE(u); int r = 0; @@ -3826,8 +3805,6 @@ const UnitVTable service_vtable = { .reset_failed = service_reset_failed, - .need_daemon_reload = service_need_daemon_reload, - .cgroup_notify_empty = service_cgroup_notify_event, .notify_message = service_notify_message, diff --git a/src/core/service.h b/src/core/service.h index 819672f617..f4ccc2b5a0 100644 --- a/src/core/service.h +++ b/src/core/service.h @@ -165,14 +165,13 @@ struct Service { bool forbid_restart:1; bool got_socket_fd:1; #ifdef HAVE_SYSV_COMPAT + bool is_sysv:1; bool sysv_has_lsb:1; bool sysv_enabled:1; int sysv_start_priority_from_rcnd; int sysv_start_priority; - char *sysv_path; char *sysv_runlevels; - usec_t sysv_mtime; #endif char *bus_name; @@ -182,7 +181,6 @@ struct Service { RateLimit start_limit; StartLimitAction start_limit_action; - UnitRef accept_socket; Watch timer_watch; diff --git a/src/core/socket.c b/src/core/socket.c index 2be1647be9..df47578a49 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -165,7 +165,7 @@ static int socket_instantiate_service(Socket *s) { return r; #ifdef HAVE_SYSV_COMPAT - if (SERVICE(u)->sysv_path) { + if (SERVICE(u)->is_sysv) { log_error("Using SysV services for socket activation is not supported. Refusing."); return -ENOENT; } @@ -1575,7 +1575,7 @@ static int socket_start(Unit *u) { } #ifdef HAVE_SYSV_COMPAT - if (service->sysv_path) { + if (service->is_sysv) { log_error("Using SysV services for socket activation is not supported. Refusing."); return -ENOENT; } diff --git a/src/core/unit.c b/src/core/unit.c index 1f1a5314f7..f53bdd5a91 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -399,6 +399,7 @@ void unit_free(Unit *u) { free(u->description); strv_free(u->documentation); free(u->fragment_path); + free(u->source_path); free(u->instance); set_free_free(u->names); @@ -682,6 +683,9 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { if (u->fragment_path) fprintf(f, "%s\tFragment Path: %s\n", prefix, u->fragment_path); + if (u->source_path) + fprintf(f, "%s\tSource Path: %s\n", prefix, u->source_path); + if (u->job_timeout > 0) fprintf(f, "%s\tJob Timeout: %s\n", prefix, format_timespan(timespan, sizeof(timespan), u->job_timeout)); @@ -2575,11 +2579,11 @@ void unit_status_printf(Unit *u, const char *status, const char *format, ...) { } bool unit_need_daemon_reload(Unit *u) { + struct stat st; + assert(u); if (u->fragment_path) { - struct stat st; - zero(st); if (stat(u->fragment_path, &st) < 0) /* What, cannot access this anymore? */ @@ -2590,8 +2594,15 @@ bool unit_need_daemon_reload(Unit *u) { return true; } - if (UNIT_VTABLE(u)->need_daemon_reload) - return UNIT_VTABLE(u)->need_daemon_reload(u); + if (u->source_path) { + zero(st); + if (stat(u->source_path, &st) < 0) + return true; + + if (u->source_mtime > 0 && + timespec_load(&st.st_mtim) != u->source_mtime) + return true; + } return false; } diff --git a/src/core/unit.h b/src/core/unit.h index 87dc88c961..cfb38d0aae 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -160,7 +160,9 @@ struct Unit { char **documentation; char *fragment_path; /* if loaded from a config file this is the primary path to it */ + char *source_path; /* if converted, the source file */ usec_t fragment_mtime; + usec_t source_mtime; /* If there is something to do with this unit, then this is the installed job for it */ Job *job; @@ -353,9 +355,6 @@ struct UnitVTable { void (*sigchld_event)(Unit *u, pid_t pid, int code, int status); void (*timer_event)(Unit *u, uint64_t n_elapsed, Watch *w); - /* Check whether unit needs a daemon reload */ - bool (*need_daemon_reload)(Unit *u); - /* Reset failed state if we are in failed state */ void (*reset_failed)(Unit *u); diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 7eb122d276..51706b7a86 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -115,6 +115,7 @@ static int create_disk( "# Automatically generated by systemd-cryptsetup-generator\n\n" "[Unit]\n" "Description=Cryptography Setup for %%I\n" + "SourcePath=/etc/crypttab\n" "Conflicts=umount.target\n" "DefaultDependencies=no\n" "BindTo=%s dev-mapper-%%i.device\n" @@ -129,11 +130,9 @@ static int create_disk( if (password && (streq(password, "/dev/urandom") || streq(password, "/dev/random") || streq(password, "/dev/hw_random"))) - fprintf(f, - "After=systemd-random-seed-load.service\n"); + fputs("After=systemd-random-seed-load.service\n", f); else - fprintf(f, - "Before=local-fs.target\n"); + fputs("Before=local-fs.target\n", f); fprintf(f, "\n[Service]\n" diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 86cbc45b78..8a519fcfd9 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -117,6 +117,7 @@ static int add_swap(const char *what, struct mntent *me) { fputs("# Automatically generated by systemd-fstab-generator\n\n" "[Unit]\n" + "SourcePath=/etc/fstab\n" "DefaultDependencies=no\n" "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" "Before=" SPECIAL_UMOUNT_TARGET "\n", f); @@ -274,6 +275,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { fputs("# Automatically generated by systemd-fstab-generator\n\n" "[Unit]\n" + "SourcePath=/etc/fstab\n" "DefaultDependencies=no\n", f); if (!path_equal(where, "/")) @@ -386,6 +388,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { fprintf(f, "# Automatically generated by systemd-fstab-generator\n\n" "[Unit]\n" + "SourcePath=/etc/fstab\n" "DefaultDependencies=no\n" "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" "Before=" SPECIAL_UMOUNT_TARGET " %s\n" diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index b4253a45b1..03c2fd2d62 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2160,7 +2160,8 @@ typedef struct UnitStatusInfo { char **documentation; - const char *path; + const char *fragment_path; + const char *source_path; const char *default_control_group; const char *load_error; @@ -2179,9 +2180,6 @@ typedef struct UnitStatusInfo { pid_t control_pid; const char *status_text; bool running:1; -#ifdef HAVE_SYSV_COMPAT - bool is_sysv:1; -#endif usec_t start_timestamp; usec_t exit_timestamp; @@ -2214,6 +2212,7 @@ static void print_status_info(UnitStatusInfo *i) { usec_t timestamp; char since1[FORMAT_TIMESTAMP_PRETTY_MAX], *s1; char since2[FORMAT_TIMESTAMP_MAX], *s2; + const char *path; assert(i); @@ -2236,12 +2235,14 @@ static void print_status_info(UnitStatusInfo *i) { } else on = off = ""; + path = i->source_path ? i->source_path : i->fragment_path; + if (i->load_error) printf("\t Loaded: %s%s%s (Reason: %s)\n", on, strna(i->load_state), off, i->load_error); - else if (i->path && i->unit_file_state) - printf("\t Loaded: %s%s%s (%s; %s)\n", on, strna(i->load_state), off, i->path, i->unit_file_state); - else if (i->path) - printf("\t Loaded: %s%s%s (%s)\n", on, strna(i->load_state), off, i->path); + else if (path && i->unit_file_state) + printf("\t Loaded: %s%s%s (%s; %s)\n", on, strna(i->load_state), off, path, i->unit_file_state); + else if (path) + printf("\t Loaded: %s%s%s (%s)\n", on, strna(i->load_state), off, path); else printf("\t Loaded: %s%s%s\n", on, strna(i->load_state), off); @@ -2333,13 +2334,7 @@ static void print_status_info(UnitStatusInfo *i) { printf("\t Process: %u %s=%s ", p->pid, p->name, strna(t)); free(t); -#ifdef HAVE_SYSV_COMPAT - if (i->is_sysv) - good = is_clean_exit_lsb(p->code, p->status); - else -#endif - good = is_clean_exit(p->code, p->status); - + good = is_clean_exit_lsb(p->code, p->status); if (!good) { on = ansi_highlight_red(true); off = ansi_highlight_red(false); @@ -2353,11 +2348,8 @@ static void print_status_info(UnitStatusInfo *i) { printf("status=%i", p->status); -#ifdef HAVE_SYSV_COMPAT - if ((c = exit_status_to_string(p->status, i->is_sysv ? EXIT_STATUS_LSB : EXIT_STATUS_SYSTEMD))) -#else - if ((c = exit_status_to_string(p->status, EXIT_STATUS_SYSTEMD))) -#endif + c = exit_status_to_string(p->status, EXIT_STATUS_SYSTEMD); + if (c) printf("/%s", c); } else @@ -2396,11 +2388,8 @@ static void print_status_info(UnitStatusInfo *i) { printf("status=%i", i->exit_status); -#ifdef HAVE_SYSV_COMPAT - if ((c = exit_status_to_string(i->exit_status, i->is_sysv ? EXIT_STATUS_LSB : EXIT_STATUS_SYSTEMD))) -#else - if ((c = exit_status_to_string(i->exit_status, EXIT_STATUS_SYSTEMD))) -#endif + c = exit_status_to_string(i->exit_status, EXIT_STATUS_SYSTEMD); + if (c) printf("/%s", c); } else @@ -2492,13 +2481,9 @@ static int status_property(const char *name, DBusMessageIter *iter, UnitStatusIn else if (streq(name, "Description")) i->description = s; else if (streq(name, "FragmentPath")) - i->path = s; -#ifdef HAVE_SYSV_COMPAT - else if (streq(name, "SysVPath")) { - i->is_sysv = true; - i->path = s; - } -#endif + i->fragment_path = s; + else if (streq(name, "SourcePath")) + i->source_path = s; else if (streq(name, "DefaultControlGroup")) i->default_control_group = s; else if (streq(name, "StatusText")) -- cgit v1.2.3-54-g00ecf From 07719a21b6425d378b36bb8d7f47ad5ec5296d28 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 23 May 2012 03:43:29 +0200 Subject: manager: rework generator logic Previously generated units were always placed at the end of the search path. With this change there will be three unit dirs instead of one, to place generated entries at the beginning, in the middle and at the end of the search path: beginning: for units that need to override all configuration, regardless of user or vendor. Example use: system-update-generator uses this to temporarily redirect default.target. middle: for units that need to override vendor configuration, but not vendor configuration. Example use: /etc/fstab should override vendor supplied configuration (think /tmp), but should not override native user configuration. end: does not override anything but is available as well. Possible usage might be to convert D-Bus bus service files to native units but allowing vendor supplied native units to win. --- src/core/manager.c | 209 +++++++++++++-------- src/core/manager.h | 2 + src/cryptsetup/cryptsetup-generator.c | 4 +- src/fstab-generator/fstab-generator.c | 6 +- src/getty-generator/getty-generator.c | 14 +- src/rc-local-generator/rc-local-generator.c | 12 +- src/shared/install.c | 3 +- src/shared/path-lookup.c | 186 ++++++++++++------ src/shared/path-lookup.h | 2 +- src/shared/strv.c | 62 +++--- src/shared/strv.h | 4 + .../system-update-generator.c | 6 +- src/systemctl/systemctl.c | 3 +- 13 files changed, 330 insertions(+), 183 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/core/manager.c b/src/core/manager.c index 30437425c4..5c6d63668d 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -299,9 +299,6 @@ int manager_new(ManagerRunningAs running_as, Manager **_m) { if ((m->epoll_fd = epoll_create1(EPOLL_CLOEXEC)) < 0) goto fail; - if ((r = lookup_paths_init(&m->lookup_paths, m->running_as, true)) < 0) - goto fail; - if ((r = manager_setup_signals(m)) < 0) goto fail; @@ -637,6 +634,14 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { manager_run_generators(m); + r = lookup_paths_init( + &m->lookup_paths, m->running_as, true, + m->generator_unit_path, + m->generator_unit_path_early, + m->generator_unit_path_late); + if (r < 0) + return r; + manager_build_unit_path_cache(m); /* If we will deserialize make sure that during enumeration @@ -649,12 +654,15 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { r = manager_enumerate(m); /* Second, deserialize if there is something to deserialize */ - if (serialization) - if ((q = manager_deserialize(m, serialization, fds)) < 0) + if (serialization) { + q = manager_deserialize(m, serialization, fds); + if (q < 0) r = q; + } /* Third, fire things up! */ - if ((q = manager_coldplug(m)) < 0) + q = manager_coldplug(m); + if (q < 0) r = q; if (serialization) { @@ -1871,18 +1879,21 @@ int manager_reload(Manager *m) { assert(m); - if ((r = manager_open_serialization(m, &f)) < 0) + r = manager_open_serialization(m, &f); + if (r < 0) return r; m->n_reloading ++; - if (!(fds = fdset_new())) { + fds = fdset_new(); + if (!fds) { m->n_reloading --; r = -ENOMEM; goto finish; } - if ((r = manager_serialize(m, f, fds)) < 0) { + r = manager_serialize(m, f, fds); + if (r < 0) { m->n_reloading --; goto finish; } @@ -1896,29 +1907,37 @@ int manager_reload(Manager *m) { /* From here on there is no way back. */ manager_clear_jobs_and_units(m); manager_undo_generators(m); - - /* Find new unit paths */ lookup_paths_free(&m->lookup_paths); - if ((q = lookup_paths_init(&m->lookup_paths, m->running_as, true)) < 0) - r = q; + /* Find new unit paths */ manager_run_generators(m); + q = lookup_paths_init( + &m->lookup_paths, m->running_as, true, + m->generator_unit_path, + m->generator_unit_path_early, + m->generator_unit_path_late); + if (q < 0) + r = q; + manager_build_unit_path_cache(m); /* First, enumerate what we can from all config files */ - if ((q = manager_enumerate(m)) < 0) + q = manager_enumerate(m); + if (q < 0) r = q; /* Second, deserialize our stored data */ - if ((q = manager_deserialize(m, f, fds)) < 0) + q = manager_deserialize(m, f, fds); + if (q < 0) r = q; fclose(f); f = NULL; /* Third, fire things up! */ - if ((q = manager_coldplug(m)) < 0) + q = manager_coldplug(m); + if (q < 0) r = q; assert(m->n_reloading > 0); @@ -2030,17 +2049,76 @@ void manager_check_finished(Manager *m) { format_timespan(sum, sizeof(sum), total_usec)); } +static int create_generator_dir(Manager *m, char **generator, const char *name) { + char *p; + int r; + + assert(m); + assert(generator); + assert(name); + + if (*generator) + return 0; + + if (m->running_as == MANAGER_SYSTEM && getpid() == 1) { + + p = strappend("/run/systemd/", name); + if (!p) { + log_error("Out of memory"); + return -ENOMEM; + } + + r = mkdir_p(p, 0755); + if (r < 0) { + log_error("Failed to create generator directory: %s", strerror(-r)); + free(p); + return r; + } + } else { + p = join("/tmp/systemd-", name, ".XXXXXX", NULL); + if (!p) { + log_error("Out of memory"); + return -ENOMEM; + } + + if (!mkdtemp(p)) { + free(p); + log_error("Failed to create generator directory: %m"); + return -errno; + } + } + + *generator = p; + return 0; +} + +static void trim_generator_dir(Manager *m, char **generator) { + assert(m); + assert(generator); + + if (!*generator) + return; + + if (rmdir(*generator) >= 0) { + free(*generator); + *generator = NULL; + } + + return; +} + void manager_run_generators(Manager *m) { DIR *d = NULL; const char *generator_path; - const char *argv[3]; + const char *argv[5]; mode_t u; + int r; assert(m); generator_path = m->running_as == MANAGER_SYSTEM ? SYSTEM_GENERATOR_PATH : USER_GENERATOR_PATH; - if (!(d = opendir(generator_path))) { - + d = opendir(generator_path); + if (!d) { if (errno == ENOENT) return; @@ -2048,79 +2126,57 @@ void manager_run_generators(Manager *m) { return; } - if (!m->generator_unit_path) { - const char *p; - char user_path[] = "/tmp/systemd-generator-XXXXXX"; - - if (m->running_as == MANAGER_SYSTEM && getpid() == 1) { - p = "/run/systemd/generator"; - - if (mkdir_p(p, 0755) < 0) { - log_error("Failed to create generator directory: %m"); - goto finish; - } + r = create_generator_dir(m, &m->generator_unit_path, "generator"); + if (r < 0) + goto finish; - } else { - if (!(p = mkdtemp(user_path))) { - log_error("Failed to create generator directory: %m"); - goto finish; - } - } + r = create_generator_dir(m, &m->generator_unit_path_early, "generator.early"); + if (r < 0) + goto finish; - if (!(m->generator_unit_path = strdup(p))) { - log_error("Failed to allocate generator unit path."); - goto finish; - } - } + r = create_generator_dir(m, &m->generator_unit_path_late, "generator.late"); + if (r < 0) + goto finish; argv[0] = NULL; /* Leave this empty, execute_directory() will fill something in */ argv[1] = m->generator_unit_path; - argv[2] = NULL; + argv[2] = m->generator_unit_path_early; + argv[3] = m->generator_unit_path_late; + argv[4] = NULL; u = umask(0022); execute_directory(generator_path, d, (char**) argv); umask(u); - if (rmdir(m->generator_unit_path) >= 0) { - /* Uh? we were able to remove this dir? I guess that - * means the directory was empty, hence let's shortcut - * this */ - - free(m->generator_unit_path); - m->generator_unit_path = NULL; - goto finish; - } - - if (!strv_find(m->lookup_paths.unit_path, m->generator_unit_path)) { - char **l; - - if (!(l = strv_append(m->lookup_paths.unit_path, m->generator_unit_path))) { - log_error("Failed to add generator directory to unit search path: %m"); - goto finish; - } - - strv_free(m->lookup_paths.unit_path); - m->lookup_paths.unit_path = l; - - log_debug("Added generator unit path %s to search path.", m->generator_unit_path); - } + trim_generator_dir(m, &m->generator_unit_path); + trim_generator_dir(m, &m->generator_unit_path_early); + trim_generator_dir(m, &m->generator_unit_path_late); finish: if (d) closedir(d); } -void manager_undo_generators(Manager *m) { +static void remove_generator_dir(Manager *m, char **generator) { assert(m); + assert(generator); - if (!m->generator_unit_path) + if (!*generator) return; - strv_remove(m->lookup_paths.unit_path, m->generator_unit_path); - rm_rf(m->generator_unit_path, false, true, false); + strv_remove(m->lookup_paths.unit_path, *generator); + rm_rf(*generator, false, true, false); - free(m->generator_unit_path); - m->generator_unit_path = NULL; + free(*generator); + *generator = NULL; +} + +void manager_undo_generators(Manager *m) { + assert(m); + + remove_generator_dir(m, &m->generator_unit_path); + remove_generator_dir(m, &m->generator_unit_path_early); + remove_generator_dir(m, &m->generator_unit_path_late); } int manager_set_default_controllers(Manager *m, char **controllers) { @@ -2146,18 +2202,17 @@ int manager_set_default_rlimits(Manager *m, struct rlimit **default_rlimit) { assert(m); for (i = 0; i < RLIMIT_NLIMITS; i++) { - if (default_rlimit[i]) { - m->rlimit[i] = newdup(struct rlimit, default_rlimit[i], 1); + if (!default_rlimit[i]) + continue; - if (!m->rlimit[i]) - return -ENOMEM; - } + m->rlimit[i] = newdup(struct rlimit, default_rlimit[i], 1); + if (!m->rlimit[i]) + return -ENOMEM; } return 0; } - void manager_recheck_journal(Manager *m) { Unit *u; diff --git a/src/core/manager.h b/src/core/manager.h index 9b947c9530..b29d0a7935 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -152,6 +152,8 @@ struct Manager { dual_timestamp finish_timestamp; char *generator_unit_path; + char *generator_unit_path_early; + char *generator_unit_path_late; /* Data specific to the device subsystem */ struct udev* udev; diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 51706b7a86..de64afd727 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -240,8 +240,8 @@ int main(int argc, char *argv[]) { int r = EXIT_SUCCESS; unsigned n = 0; - if (argc > 2) { - log_error("This program takes one or no arguments."); + if (argc > 1 && argc != 4) { + log_error("This program takes three or no arguments."); return EXIT_FAILURE; } diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 8a519fcfd9..8676a20539 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -498,8 +498,8 @@ finish: int main(int argc, char *argv[]) { int r; - if (argc > 2) { - log_error("This program takes one or no arguments."); + if (argc > 1 && argc != 4) { + log_error("This program takes three or no arguments."); return EXIT_FAILURE; } @@ -510,8 +510,6 @@ int main(int argc, char *argv[]) { log_parse_environment(); log_open(); - log_set_max_level(LOG_DEBUG); - umask(0022); r = parse_fstab(); diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index b2e4f52c3c..85600263f9 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -38,8 +38,8 @@ static int add_symlink(const char *fservice, const char *tservice) { assert(fservice); assert(tservice); - asprintf(&from, SYSTEM_DATA_UNIT_PATH "/%s", fservice); - asprintf(&to, "%s/getty.target.wants/%s", arg_dest, tservice); + from = strappend(SYSTEM_DATA_UNIT_PATH "/", fservice); + to = join(arg_dest,"/getty.target.wants/", tservice, NULL); if (!from || !to) { log_error("Out of memory"); @@ -99,20 +99,20 @@ int main(int argc, char *argv[]) { char *active; const char *j; - if (argc > 2) { - log_error("This program takes one or no arguments."); + if (argc > 1 && argc != 4) { + log_error("This program takes three or no arguments."); return EXIT_FAILURE; } + if (argc > 1) + arg_dest = argv[1]; + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); umask(0022); - if (argc > 1) - arg_dest = argv[1]; - if (detect_container(NULL) > 0) { log_debug("Automatically adding console shell."); diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index 1464c8e497..38168cc01f 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -66,7 +66,6 @@ static int add_symlink(const char *service, const char *where) { } finish: - free(from); free(to); @@ -83,20 +82,21 @@ static bool file_is_executable(const char *f) { } int main(int argc, char *argv[]) { - int r = EXIT_SUCCESS; - if (argc > 2) { - log_error("This program takes one or no arguments."); + if (argc > 1 && argc != 4) { + log_error("This program takes three or no arguments."); return EXIT_FAILURE; } + if (argc > 1) + arg_dest = argv[1]; + log_set_target(LOG_TARGET_SAFE); log_parse_environment(); log_open(); - if (argc > 1) - arg_dest = argv[1]; + umask(0022); if (file_is_executable(SCRIPT_PATH_START)) { log_debug("Automatically adding rc-local.service."); diff --git a/src/shared/install.c b/src/shared/install.c index d6644e580f..7e4f666952 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -60,7 +60,8 @@ static int lookup_paths_init_from_scope(LookupPaths *paths, UnitFileScope scope) return lookup_paths_init(paths, scope == UNIT_FILE_SYSTEM ? MANAGER_SYSTEM : MANAGER_USER, - scope == UNIT_FILE_USER); + scope == UNIT_FILE_USER, + NULL, NULL, NULL); } static int get_config_path(UnitFileScope scope, bool runtime, const char *root_dir, char **ret) { diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 41ebc7f5b3..32ddb38865 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -34,7 +34,8 @@ int user_config_home(char **config_home) { const char *e; - if ((e = getenv("XDG_CONFIG_HOME"))) { + e = getenv("XDG_CONFIG_HOME"); + if (e) { if (asprintf(config_home, "%s/systemd/user", e) < 0) return -ENOMEM; @@ -42,7 +43,8 @@ int user_config_home(char **config_home) { } else { const char *home; - if ((home = getenv("HOME"))) { + home = getenv("HOME"); + if (home) { if (asprintf(config_home, "%s/.config/systemd/user", home) < 0) return -ENOMEM; @@ -53,7 +55,11 @@ int user_config_home(char **config_home) { return 0; } -static char** user_dirs(void) { +static char** user_dirs( + const char *generator, + const char *generator_early, + const char *generator_late) { + const char * const config_unit_paths[] = { USER_CONFIG_UNIT_PATH, "/etc/systemd/user", @@ -89,15 +95,19 @@ static char** user_dirs(void) { home = getenv("HOME"); - if ((e = getenv("XDG_CONFIG_DIRS"))) - if (!(config_dirs = strv_split(e, ":"))) + e = getenv("XDG_CONFIG_DIRS"); + if (e) { + config_dirs = strv_split(e, ":"); + if (!config_dirs) goto fail; + } /* We don't treat /etc/xdg/systemd here as the spec * suggests because we assume that that is a link to * /etc/systemd/ anyway. */ - if ((e = getenv("XDG_DATA_HOME"))) { + e = getenv("XDG_DATA_HOME"); + if (e) { if (asprintf(&data_home, "%s/systemd/user", e) < 0) goto fail; @@ -116,57 +126,87 @@ static char** user_dirs(void) { (void) symlink("../../../.config/systemd/user", data_home); } - if ((e = getenv("XDG_DATA_DIRS"))) + e = getenv("XDG_DATA_DIRS"); + if (e) data_dirs = strv_split(e, ":"); else data_dirs = strv_new("/usr/local/share", "/usr/share", NULL); - if (!data_dirs) goto fail; /* Now merge everything we found. */ + if (generator_early) { + t = strv_append(r, generator_early); + if (!t) + goto fail; + strv_free(r); + r = t; + } + if (config_home) { - if (!(t = strv_append(r, config_home))) + t = strv_append(r, config_home); + if (!t) goto fail; strv_free(r); r = t; } if (!strv_isempty(config_dirs)) { - if (!(t = strv_merge_concat(r, config_dirs, "/systemd/user"))) + t = strv_merge_concat(r, config_dirs, "/systemd/user"); + if (!t) goto finish; strv_free(r); r = t; } - if (!(t = strv_merge(r, (char**) config_unit_paths))) + t = strv_merge(r, (char**) config_unit_paths); + if (!t) goto fail; strv_free(r); r = t; + if (generator) { + t = strv_append(r, generator); + if (!t) + goto fail; + strv_free(r); + r = t; + } + if (data_home) { - if (!(t = strv_append(r, data_home))) + t = strv_append(r, data_home); + if (!t) goto fail; strv_free(r); r = t; } if (!strv_isempty(data_dirs)) { - if (!(t = strv_merge_concat(r, data_dirs, "/systemd/user"))) + t = strv_merge_concat(r, data_dirs, "/systemd/user"); + if (!t) goto fail; strv_free(r); r = t; } - if (!(t = strv_merge(r, (char**) data_unit_paths))) + t = strv_merge(r, (char**) data_unit_paths); + if (!t) goto fail; strv_free(r); r = t; + if (generator_late) { + t = strv_append(r, generator_late); + if (!t) + goto fail; + strv_free(r); + r = t; + } + if (!path_strv_make_absolute_cwd(r)) - goto fail; + goto fail; finish: free(config_home); @@ -182,7 +222,14 @@ fail: goto finish; } -int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal) { +int lookup_paths_init( + LookupPaths *p, + ManagerRunningAs running_as, + bool personal, + const char *generator, + const char *generator_early, + const char *generator_late) { + const char *e; char *t; @@ -190,64 +237,83 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal /* First priority is whatever has been passed to us via env * vars */ - if ((e = getenv("SYSTEMD_UNIT_PATH"))) - if (!(p->unit_path = path_split_and_make_absolute(e))) + e = getenv("SYSTEMD_UNIT_PATH"); + if (e) { + p->unit_path = path_split_and_make_absolute(e); + if (!p->unit_path) return -ENOMEM; + } else + p->unit_path = NULL; if (strv_isempty(p->unit_path)) { - /* Nothing is set, so let's figure something out. */ strv_free(p->unit_path); + /* For the user units we include share/ in the search + * path in order to comply with the XDG basedir + * spec. For the system stuff we avoid such + * nonsense. OTOH we include /lib in the search path + * for the system stuff but avoid it for user + * stuff. */ + if (running_as == MANAGER_USER) { if (personal) - p->unit_path = user_dirs(); + p->unit_path = user_dirs(generator, generator_early, generator_late); else p->unit_path = strv_new( /* If you modify this you also want to modify * systemduserunitpath= in systemd.pc.in, and * the arrays in user_dirs() above! */ + STRV_IFNOTNULL(generator_early), USER_CONFIG_UNIT_PATH, "/etc/systemd/user", "/run/systemd/user", + STRV_IFNOTNULL(generator), "/usr/local/lib/systemd/user", "/usr/local/share/systemd/user", USER_DATA_UNIT_PATH, "/usr/lib/systemd/user", "/usr/share/systemd/user", + STRV_IFNOTNULL(generator_late), NULL); if (!p->unit_path) return -ENOMEM; - } else - if (!(p->unit_path = strv_new( - /* If you modify this you also want to modify - * systemdsystemunitpath= in systemd.pc.in! */ - SYSTEM_CONFIG_UNIT_PATH, - "/etc/systemd/system", - "/run/systemd/system", - "/usr/local/lib/systemd/system", - SYSTEM_DATA_UNIT_PATH, - "/usr/lib/systemd/system", + } else { + p->unit_path = strv_new( + /* If you modify this you also want to modify + * systemdsystemunitpath= in systemd.pc.in! */ + STRV_IFNOTNULL(generator_early), + SYSTEM_CONFIG_UNIT_PATH, + "/etc/systemd/system", + "/run/systemd/system", + STRV_IFNOTNULL(generator), + "/usr/local/lib/systemd/system", + SYSTEM_DATA_UNIT_PATH, + "/usr/lib/systemd/system", #ifdef HAVE_SPLIT_USR - "/lib/systemd/system", + "/lib/systemd/system", #endif - NULL))) + STRV_IFNOTNULL(generator_late), + NULL); + + if (!p->unit_path) return -ENOMEM; + } } - if (p->unit_path) - if (!path_strv_canonicalize(p->unit_path)) - return -ENOMEM; + if (!path_strv_canonicalize(p->unit_path)) + return -ENOMEM; strv_uniq(p->unit_path); path_strv_remove_empty(p->unit_path); if (!strv_isempty(p->unit_path)) { - if (!(t = strv_join(p->unit_path, "\n\t"))) + t = strv_join(p->unit_path, "\n\t"); + if (!t) return -ENOMEM; log_debug("Looking for unit files in:\n\t%s", t); free(t); @@ -261,51 +327,58 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal #ifdef HAVE_SYSV_COMPAT /* /etc/init.d/ compatibility does not matter to users */ - if ((e = getenv("SYSTEMD_SYSVINIT_PATH"))) - if (!(p->sysvinit_path = path_split_and_make_absolute(e))) + e = getenv("SYSTEMD_SYSVINIT_PATH"); + if (e) { + p->sysvinit_path = path_split_and_make_absolute(e); + if (!p->sysvinit_path) return -ENOMEM; + } else + p->sysvinit_path = NULL; if (strv_isempty(p->sysvinit_path)) { strv_free(p->sysvinit_path); - if (!(p->sysvinit_path = strv_new( - SYSTEM_SYSVINIT_PATH, /* /etc/init.d/ */ - NULL))) + p->sysvinit_path = strv_new( + SYSTEM_SYSVINIT_PATH, /* /etc/init.d/ */ + NULL); + if (!p->sysvinit_path) return -ENOMEM; } - if ((e = getenv("SYSTEMD_SYSVRCND_PATH"))) - if (!(p->sysvrcnd_path = path_split_and_make_absolute(e))) + e = getenv("SYSTEMD_SYSVRCND_PATH"); + if (e) { + p->sysvrcnd_path = path_split_and_make_absolute(e); + if (!p->sysvrcnd_path) return -ENOMEM; + } else + p->sysvrcnd_path = NULL; if (strv_isempty(p->sysvrcnd_path)) { strv_free(p->sysvrcnd_path); - if (!(p->sysvrcnd_path = strv_new( - SYSTEM_SYSVRCND_PATH, /* /etc/rcN.d/ */ - NULL))) + p->sysvrcnd_path = strv_new( + SYSTEM_SYSVRCND_PATH, /* /etc/rcN.d/ */ + NULL); + if (!p->sysvrcnd_path) return -ENOMEM; } - if (p->sysvinit_path) - if (!path_strv_canonicalize(p->sysvinit_path)) - return -ENOMEM; + if (!path_strv_canonicalize(p->sysvinit_path)) + return -ENOMEM; - if (p->sysvrcnd_path) - if (!path_strv_canonicalize(p->sysvrcnd_path)) - return -ENOMEM; + if (!path_strv_canonicalize(p->sysvrcnd_path)) + return -ENOMEM; strv_uniq(p->sysvinit_path); strv_uniq(p->sysvrcnd_path); - path_strv_remove_empty(p->sysvinit_path); path_strv_remove_empty(p->sysvrcnd_path); if (!strv_isempty(p->sysvinit_path)) { - if (!(t = strv_join(p->sysvinit_path, "\n\t"))) + t = strv_join(p->sysvinit_path, "\n\t"); + if (!t) return -ENOMEM; - log_debug("Looking for SysV init scripts in:\n\t%s", t); free(t); } else { @@ -316,7 +389,8 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal if (!strv_isempty(p->sysvrcnd_path)) { - if (!(t = strv_join(p->sysvrcnd_path, "\n\t"))) + t = strv_join(p->sysvrcnd_path, "\n\t"); + if (!t) return -ENOMEM; log_debug("Looking for SysV rcN.d links in:\n\t%s", t); diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index e8a5a77a7b..96c49c2400 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -34,7 +34,7 @@ typedef struct LookupPaths { int user_config_home(char **config_home); -int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal); +int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal, const char *generator, const char *generator_early, const char *generator_late); void lookup_paths_free(LookupPaths *p); #endif diff --git a/src/shared/strv.c b/src/shared/strv.c index 18de4f8391..c8d856344c 100644 --- a/src/shared/strv.c +++ b/src/shared/strv.c @@ -106,28 +106,44 @@ char **strv_new_ap(const char *x, va_list ap) { unsigned n = 0, i = 0; va_list aq; + /* As a special trick we ignore all listed strings that equal + * (const char*) -1. This is supposed to be used with the + * STRV_IFNOTNULL() macro to include possibly NULL strings in + * the string list. */ + if (x) { - n = 1; + n = x == (const char*) -1 ? 0 : 1; va_copy(aq, ap); - while (va_arg(aq, const char*)) + while ((s = va_arg(aq, const char*))) { + if (s == (const char*) -1) + continue; + n++; + } + va_end(aq); } - if (!(a = new(char*, n+1))) + a = new(char*, n+1); + if (!a) return NULL; if (x) { - if (!(a[i] = strdup(x))) { - free(a); - return NULL; + if (x != (const char*) -1) { + a[i] = strdup(x); + if (!a[i]) + goto fail; + i++; } - i++; - while ((s = va_arg(ap, const char*))) { - if (!(a[i] = strdup(s))) + + if (s == (const char*) -1) + continue; + + a[i] = strdup(s); + if (!a[i]) goto fail; i++; @@ -169,25 +185,27 @@ char **strv_merge(char **a, char **b) { if (!b) return strv_copy(a); - if (!(r = new(char*, strv_length(a)+strv_length(b)+1))) + r = new(char*, strv_length(a) + strv_length(b) + 1); + if (!r) return NULL; - for (k = r; *a; k++, a++) - if (!(*k = strdup(*a))) + for (k = r; *a; k++, a++) { + *k = strdup(*a); + if (!*k) goto fail; - for (; *b; k++, b++) - if (!(*k = strdup(*b))) + } + + for (; *b; k++, b++) { + *k = strdup(*b); + if (!*k) goto fail; + } *k = NULL; return r; fail: - for (k--; k >= r; k--) - free(*k); - - free(r); - + strv_free(r); return NULL; } @@ -221,11 +239,7 @@ char **strv_merge_concat(char **a, char **b, const char *suffix) { return r; fail: - for (k--; k >= r; k--) - free(*k); - - free(r); - + strv_free(r); return NULL; } diff --git a/src/shared/strv.h b/src/shared/strv.h index afb31f385f..635e92b728 100644 --- a/src/shared/strv.h +++ b/src/shared/strv.h @@ -47,6 +47,10 @@ char **strv_uniq(char **l); char **strv_new(const char *x, ...) _sentinel_ _malloc_; char **strv_new_ap(const char *x, va_list ap) _malloc_; +static inline const char* STRV_IFNOTNULL(const char *x) { + return x ? x : (const char *) -1; +} + static inline bool strv_isempty(char **l) { return !l || !*l; } diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c index f4e8dafebd..abda5a0190 100644 --- a/src/system-update-generator/system-update-generator.c +++ b/src/system-update-generator/system-update-generator.c @@ -66,13 +66,13 @@ static int generate_symlink(void) { int main(int argc, char *argv[]) { int r; - if (argc > 2) { - log_error("This program takes one or no arguments."); + if (argc > 1 && argc != 4) { + log_error("This program takes three or no arguments."); return EXIT_FAILURE; } if (argc > 1) - arg_dest = argv[1]; + arg_dest = argv[2]; log_set_target(LOG_TARGET_SAFE); log_parse_environment(); diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 03c2fd2d62..66f4113eb2 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3697,12 +3697,11 @@ static int enable_sysv_units(char **args) { * afterwards only the native units remain */ zero(paths); - r = lookup_paths_init(&paths, MANAGER_SYSTEM, false); + r = lookup_paths_init(&paths, MANAGER_SYSTEM, false, NULL, NULL, NULL); if (r < 0) return r; r = 0; - for (f = 1; args[f]; f++) { const char *name; char *p; -- cgit v1.2.3-54-g00ecf From d2e54fae5ca7a0f71b5ac8b356a589ff0a09ea0a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 31 May 2012 12:40:20 +0200 Subject: mkdir: append _label to all mkdir() calls that explicitly set the selinux context --- src/core/automount.c | 4 ++-- src/core/dbus.c | 2 +- src/core/manager.c | 2 +- src/core/mount-setup.c | 6 +++--- src/core/mount.c | 4 ++-- src/core/path.c | 2 +- src/core/shutdown.c | 2 +- src/core/socket.c | 2 +- src/cryptsetup/cryptsetup-generator.c | 6 +++--- src/fstab-generator/fstab-generator.c | 10 +++++----- src/getty-generator/getty-generator.c | 2 +- src/journal/coredump.c | 2 +- src/journal/journald.c | 2 +- src/libudev/libudev-device-private.c | 4 ++-- src/locale/localed.c | 2 +- src/login/logind-dbus.c | 6 +++--- src/login/logind-inhibit.c | 4 ++-- src/login/logind-seat.c | 2 +- src/login/logind-session.c | 4 ++-- src/login/logind-user.c | 6 +++--- src/login/multi-seat-x.c | 2 +- src/nspawn/nspawn.c | 10 +++++----- src/random-seed/random-seed.c | 2 +- src/rc-local-generator/rc-local-generator.c | 2 +- src/shared/ask-password-api.c | 2 +- src/shared/cgroup-label.c | 2 +- src/shared/install.c | 2 +- src/shared/mkdir.c | 12 ++++++++---- src/shared/mkdir.h | 7 ++++--- src/shared/path-lookup.c | 2 +- src/shared/socket-label.c | 2 +- src/shutdownd/shutdownd.c | 2 +- src/test/test-udev.c | 2 +- src/tmpfiles/tmpfiles.c | 2 +- src/tty-ask-password-agent/tty-ask-password-agent.c | 4 ++-- src/udev/udev-builtin-firmware.c | 2 +- src/udev/udev-node.c | 6 +++--- src/udev/udev-watch.c | 2 +- src/udev/udevd.c | 4 ++-- 39 files changed, 74 insertions(+), 69 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/core/automount.c b/src/core/automount.c index e13259b388..64b6cff72e 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -499,7 +499,7 @@ static void automount_enter_waiting(Automount *a) { } /* We knowingly ignore the results of this call */ - mkdir_p(a->where, 0555); + mkdir_p_label(a->where, 0555); if (pipe2(p, O_NONBLOCK|O_CLOEXEC) < 0) { r = -errno; @@ -588,7 +588,7 @@ static void automount_enter_runnning(Automount *a) { return; } - mkdir_p(a->where, a->directory_mode); + mkdir_p_label(a->where, a->directory_mode); /* Before we do anything, let's see if somebody is playing games with us? */ if (lstat(a->where, &st) < 0) { diff --git a/src/core/dbus.c b/src/core/dbus.c index 434796456b..1bc83a2c2a 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -1095,7 +1095,7 @@ static int bus_init_private(Manager *m) { goto fail; } - mkdir_parents(p+10, 0755); + mkdir_parents_label(p+10, 0755); unlink(p+10); m->private_bus = dbus_server_listen(p, &error); free(p); diff --git a/src/core/manager.c b/src/core/manager.c index 5c6d63668d..dedcb74be6 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2068,7 +2068,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name) return -ENOMEM; } - r = mkdir_p(p, 0755); + r = mkdir_p_label(p, 0755); if (r < 0) { log_error("Failed to create generator directory: %s", strerror(-r)); free(p); diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 56ce2ae71a..c26dedca60 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -130,7 +130,7 @@ static int mount_one(const MountPoint *p, bool relabel) { /* The access mode here doesn't really matter too much, since * the mounted file system will take precedence anyway. */ - mkdir_p(p->where, 0755); + mkdir_p_label(p->where, 0755); log_debug("Mounting %s to %s of type %s with options %s.", p->what, @@ -404,8 +404,8 @@ int mount_setup(bool loaded_policy) { dev_setup(); /* Create a few directories we always want around */ - label_mkdir("/run/systemd", 0755); - label_mkdir("/run/systemd/system", 0755); + mkdir_label("/run/systemd", 0755); + mkdir_label("/run/systemd/system", 0755); return 0; } diff --git a/src/core/mount.c b/src/core/mount.c index 11ac692c6c..b885baab00 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -915,12 +915,12 @@ static void mount_enter_mounting(Mount *m) { m->control_command_id = MOUNT_EXEC_MOUNT; m->control_command = m->exec_command + MOUNT_EXEC_MOUNT; - mkdir_p(m->where, m->directory_mode); + mkdir_p_label(m->where, m->directory_mode); /* Create the source directory for bind-mounts if needed */ p = get_mount_parameters_fragment(m); if (p && mount_is_bind(p)) - mkdir_p(p->what, m->directory_mode); + mkdir_p_label(p->what, m->directory_mode); if (m->from_fragment) r = exec_command_set( diff --git a/src/core/path.c b/src/core/path.c index d6fedc736a..6cf03add44 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -215,7 +215,7 @@ static void path_spec_mkdir(PathSpec *s, mode_t mode) { if (s->type == PATH_EXISTS || s->type == PATH_EXISTS_GLOB) return; - if ((r = mkdir_p(s->path, mode)) < 0) + if ((r = mkdir_p_label(s->path, mode)) < 0) log_warning("mkdir(%s) failed: %s", s->path, strerror(-r)); } diff --git a/src/core/shutdown.c b/src/core/shutdown.c index a8dfe2614f..baef66dd9d 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -238,7 +238,7 @@ static int prepare_new_root(void) { } NULSTR_FOREACH(dir, dirs) - if (mkdir_p(dir, 0755) < 0 && errno != EEXIST) { + if (mkdir_p_label(dir, 0755) < 0 && errno != EEXIST) { log_error("Failed to mkdir %s: %m", dir); return -errno; } diff --git a/src/core/socket.c b/src/core/socket.c index df47578a49..633663e7e0 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -761,7 +761,7 @@ static int fifo_address_create( assert(path); assert(_fd); - mkdir_parents(path, directory_mode); + mkdir_parents_label(path, directory_mode); r = label_context_set(path, S_IFIFO); if (r < 0) diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index de64afd727..3961d5d965 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -175,7 +175,7 @@ static int create_disk( goto fail; } - mkdir_parents(to, 0755); + mkdir_parents_label(to, 0755); if (symlink(from, to) < 0) { log_error("Failed to create symlink '%s' to '%s': %m", from, to); r = -errno; @@ -193,7 +193,7 @@ static int create_disk( goto fail; } - mkdir_parents(to, 0755); + mkdir_parents_label(to, 0755); if (symlink(from, to) < 0) { log_error("Failed to create symlink '%s' to '%s': %m", from, to); r = -errno; @@ -211,7 +211,7 @@ static int create_disk( goto fail; } - mkdir_parents(to, 0755); + mkdir_parents_label(to, 0755); if (symlink(from, to) < 0) { log_error("Failed to create symlink '%s' to '%s': %m", from, to); r = -errno; diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 8676a20539..8419a0c5b4 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -151,7 +151,7 @@ static int add_swap(const char *what, struct mntent *me) { goto finish; } - mkdir_parents(lnk, 0755); + mkdir_parents_label(lnk, 0755); if (symlink(unit, lnk) < 0) { log_error("Failed to create symlink: %m"); r = -errno; @@ -174,7 +174,7 @@ static int add_swap(const char *what, struct mntent *me) { goto finish; } - mkdir_parents(lnk, 0755); + mkdir_parents_label(lnk, 0755); if (symlink(unit, lnk) < 0) { log_error("Failed to create symlink: %m"); r = -errno; @@ -326,7 +326,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { goto finish; } - mkdir_parents(lnk, 0755); + mkdir_parents_label(lnk, 0755); if (symlink(unit, lnk) < 0) { log_error("Failed to create symlink: %m"); r = -errno; @@ -352,7 +352,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { goto finish; } - mkdir_parents(lnk, 0755); + mkdir_parents_label(lnk, 0755); if (symlink(unit, lnk) < 0) { log_error("Failed to creat symlink: %m"); r = -errno; @@ -413,7 +413,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { goto finish; } - mkdir_parents(lnk, 0755); + mkdir_parents_label(lnk, 0755); if (symlink(automount_unit, lnk) < 0) { log_error("Failed to create symlink: %m"); r = -errno; diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 85600263f9..bb7c225e02 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -47,7 +47,7 @@ static int add_symlink(const char *fservice, const char *tservice) { goto finish; } - mkdir_parents(to, 0755); + mkdir_parents_label(to, 0755); r = symlink(from, to); if (r < 0) { diff --git a/src/journal/coredump.c b/src/journal/coredump.c index 10897f3461..300677bb92 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -54,7 +54,7 @@ static int divert_coredump(void) { log_info("Detected coredump of the journal daemon itself, diverting coredump to /var/lib/systemd/coredump/."); - mkdir_p("/var/lib/systemd/coredump", 0755); + mkdir_p_label("/var/lib/systemd/coredump", 0755); f = fopen("/var/lib/systemd/coredump/core.systemd-journald", "we"); if (!f) { diff --git a/src/journal/journald.c b/src/journal/journald.c index f034a569a9..e0e7cce122 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -1973,7 +1973,7 @@ static int system_journal_open(Server *s) { /* OK, we really need the runtime journal, so create * it if necessary. */ - (void) mkdir_parents(fn, 0755); + (void) mkdir_parents_label(fn, 0755); r = journal_file_open_reliably(fn, O_RDWR|O_CREAT, 0640, NULL, &s->runtime_journal); free(fn); diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c index 234773662b..bdb0e70c11 100644 --- a/src/libudev/libudev-device-private.c +++ b/src/libudev/libudev-device-private.c @@ -35,7 +35,7 @@ static void udev_device_tag(struct udev_device *dev, const char *tag, bool add) if (add) { int fd; - mkdir_parents(filename, 0755); + mkdir_parents_label(filename, 0755); fd = open(filename, O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444); if (fd >= 0) close(fd); @@ -119,7 +119,7 @@ int udev_device_update_db(struct udev_device *udev_device) /* write a database file */ util_strscpyl(filename_tmp, sizeof(filename_tmp), filename, ".tmp", NULL); - mkdir_parents(filename_tmp, 0755); + mkdir_parents_label(filename_tmp, 0755); f = fopen(filename_tmp, "we"); if (f == NULL) { udev_err(udev, "unable to create temporary db file '%s': %m\n", filename_tmp); diff --git a/src/locale/localed.c b/src/locale/localed.c index d582a9cbab..56fb339e19 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -591,7 +591,7 @@ static int write_data_x11(void) { return 0; } - mkdir_parents("/etc/X11/xorg.conf.d", 0755); + mkdir_parents_label("/etc/X11/xorg.conf.d", 0755); r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path); if (r < 0) diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 5cdd0890e3..6175d57d8c 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -874,7 +874,7 @@ static int attach_device(Manager *m, const char *seat, const char *sysfs) { goto finish; } - mkdir_p("/etc/udev/rules.d", 0755); + mkdir_p_label("/etc/udev/rules.d", 0755); r = write_one_line_file_atomic(file, rule); if (r < 0) goto finish; @@ -1890,9 +1890,9 @@ static DBusHandlerResult manager_message_handler( if (r < 0) return bus_send_error_reply(connection, message, &error, r); - mkdir_p("/var/lib/systemd", 0755); + mkdir_p_label("/var/lib/systemd", 0755); - r = safe_mkdir("/var/lib/systemd/linger", 0755, 0, 0); + r = mkdir_safe_label("/var/lib/systemd/linger", 0755, 0, 0); if (r < 0) return bus_send_error_reply(connection, message, &error, r); diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index 2d25b79c25..96b7c6cd7e 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -84,7 +84,7 @@ int inhibitor_save(Inhibitor *i) { assert(i); - r = safe_mkdir("/run/systemd/inhibit", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/inhibit", 0755, 0, 0); if (r < 0) goto finish; @@ -272,7 +272,7 @@ int inhibitor_create_fifo(Inhibitor *i) { /* Create FIFO */ if (!i->fifo_path) { - r = safe_mkdir("/run/systemd/inhibit", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/inhibit", 0755, 0, 0); if (r < 0) return r; diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 06debf887a..755f20c03a 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -91,7 +91,7 @@ int seat_save(Seat *s) { if (!s->started) return 0; - r = safe_mkdir("/run/systemd/seats", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/seats", 0755, 0, 0); if (r < 0) goto finish; diff --git a/src/login/logind-session.c b/src/login/logind-session.c index dd0de7805b..5c8d549316 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -116,7 +116,7 @@ int session_save(Session *s) { if (!s->started) return 0; - r = safe_mkdir("/run/systemd/sessions", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/sessions", 0755, 0, 0); if (r < 0) goto finish; @@ -816,7 +816,7 @@ int session_create_fifo(Session *s) { /* Create FIFO */ if (!s->fifo_path) { - r = safe_mkdir("/run/systemd/sessions", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/sessions", 0755, 0, 0); if (r < 0) return r; diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 2b80ff844c..b971845e14 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -98,7 +98,7 @@ int user_save(User *u) { if (!u->started) return 0; - r = safe_mkdir("/run/systemd/users", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/users", 0755, 0, 0); if (r < 0) goto finish; @@ -250,7 +250,7 @@ static int user_mkdir_runtime_path(User *u) { assert(u); - r = safe_mkdir("/run/user", 0755, 0, 0); + r = mkdir_safe_label("/run/user", 0755, 0, 0); if (r < 0) { log_error("Failed to create /run/user: %s", strerror(-r)); return r; @@ -266,7 +266,7 @@ static int user_mkdir_runtime_path(User *u) { } else p = u->runtime_path; - r = safe_mkdir(p, 0700, u->uid, u->gid); + r = mkdir_safe_label(p, 0700, u->uid, u->gid); if (r < 0) { log_error("Failed to create runtime directory %s: %s", p, strerror(-r)); free(p); diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c index 32d868888f..92014f5316 100644 --- a/src/login/multi-seat-x.c +++ b/src/login/multi-seat-x.c @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) { goto fail; } - r = safe_mkdir("/run/systemd/multi-session-x", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0); if (r < 0) { log_error("Failed to create directory: %s", strerror(-r)); goto fail; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 8a5eb34c7f..fec39d6448 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -222,7 +222,7 @@ static int mount_all(const char *dest) { continue; } - mkdir_p(where, 0755); + mkdir_p_label(where, 0755); if (mount(mount_table[k].what, where, @@ -1035,13 +1035,13 @@ int main(int argc, char *argv[]) { goto child_fail; } - if (mkdir_parents(home, 0775) < 0) { - log_error("mkdir_parents() failed: %m"); + if (mkdir_parents_label(home, 0775) < 0) { + log_error("mkdir_parents_label() failed: %m"); goto child_fail; } - if (safe_mkdir(home, 0775, uid, gid) < 0) { - log_error("safe_mkdir() failed: %m"); + if (mkdir_safe_label(home, 0775, uid, gid) < 0) { + log_error("mkdir_safe_label() failed: %m"); goto child_fail; } diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c index d1cab8b87a..c2729fe416 100644 --- a/src/random-seed/random-seed.c +++ b/src/random-seed/random-seed.c @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) { goto finish; } - if (mkdir_parents(RANDOM_SEED, 0755) < 0) { + if (mkdir_parents_label(RANDOM_SEED, 0755) < 0) { log_error("Failed to create directories parents of %s: %m", RANDOM_SEED); goto finish; } diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index 38168cc01f..f41a6bf265 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -53,7 +53,7 @@ static int add_symlink(const char *service, const char *where) { goto finish; } - mkdir_parents(to, 0755); + mkdir_parents_label(to, 0755); r = symlink(from, to); if (r < 0) { diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 55be807cf2..4333bfb564 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -324,7 +324,7 @@ int ask_password_agent( sigset_add_many(&mask, SIGINT, SIGTERM, -1); assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) == 0); - mkdir_p("/run/systemd/ask-password", 0755); + mkdir_p_label("/run/systemd/ask-password", 0755); u = umask(0022); fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY); diff --git a/src/shared/cgroup-label.c b/src/shared/cgroup-label.c index 06e3c16260..beeeec5830 100644 --- a/src/shared/cgroup-label.c +++ b/src/shared/cgroup-label.c @@ -47,7 +47,7 @@ int cg_create(const char *controller, const char *path) { if (r < 0) return r; - r = mkdir_parents(fs, 0755); + r = mkdir_parents_label(fs, 0755); if (r >= 0) { if (mkdir(fs, 0755) >= 0) diff --git a/src/shared/install.c b/src/shared/install.c index 7e4f666952..40b137e437 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1151,7 +1151,7 @@ static int create_symlink( assert(old_path); assert(new_path); - mkdir_parents(new_path, 0755); + mkdir_parents_label(new_path, 0755); if (symlink(old_path, new_path) >= 0) { add_file_change(changes, n_changes, UNIT_FILE_SYMLINK, new_path, old_path); diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c index b102af779d..0eb70f268e 100644 --- a/src/shared/mkdir.c +++ b/src/shared/mkdir.c @@ -31,7 +31,11 @@ #include "util.h" #include "log.h" -int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) { +int mkdir_label(const char *path, mode_t mode) { + return label_mkdir(path, mode); +} + +int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) { struct stat st; if (label_mkdir(path, mode) >= 0) @@ -52,7 +56,7 @@ int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) { return 0; } -int mkdir_parents(const char *path, mode_t mode) { +int mkdir_parents_label(const char *path, mode_t mode) { struct stat st; const char *p, *e; @@ -96,12 +100,12 @@ int mkdir_parents(const char *path, mode_t mode) { } } -int mkdir_p(const char *path, mode_t mode) { +int mkdir_p_label(const char *path, mode_t mode) { int r; /* Like mkdir -p */ - if ((r = mkdir_parents(path, mode)) < 0) + if ((r = mkdir_parents_label(path, mode)) < 0) return r; if (label_mkdir(path, mode) < 0 && errno != EEXIST) diff --git a/src/shared/mkdir.h b/src/shared/mkdir.h index b1477c5f63..1a332bbcf8 100644 --- a/src/shared/mkdir.h +++ b/src/shared/mkdir.h @@ -22,7 +22,8 @@ along with systemd; If not, see . ***/ -int safe_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); -int mkdir_parents(const char *path, mode_t mode); -int mkdir_p(const char *path, mode_t mode); +int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid); +int mkdir_label(const char *path, mode_t mode); +int mkdir_parents_label(const char *path, mode_t mode); +int mkdir_p_label(const char *path, mode_t mode); #endif diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index 32ddb38865..a9c3e21d51 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -122,7 +122,7 @@ static char** user_dirs( * then filter out this link, if it is actually is * one. */ - mkdir_parents(data_home, 0777); + mkdir_parents_label(data_home, 0777); (void) symlink("../../../.config/systemd/user", data_home); } diff --git a/src/shared/socket-label.c b/src/shared/socket-label.c index 5158beeda8..ff212de825 100644 --- a/src/shared/socket-label.c +++ b/src/shared/socket-label.c @@ -106,7 +106,7 @@ int socket_address_listen( mode_t old_mask; /* Create parents */ - mkdir_parents(a->sockaddr.un.sun_path, directory_mode); + mkdir_parents_label(a->sockaddr.un.sun_path, directory_mode); /* Enforce the right access mode for the socket*/ old_mask = umask(~ socket_mode); diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c index 0497cd41a0..6eb8ed9bf8 100644 --- a/src/shutdownd/shutdownd.c +++ b/src/shutdownd/shutdownd.c @@ -205,7 +205,7 @@ static int update_schedule_file(struct sd_shutdown_command *c) { assert(c); - r = safe_mkdir("/run/systemd/shutdown", 0755, 0, 0); + r = mkdir_safe_label("/run/systemd/shutdown", 0755, 0, 0); if (r < 0) { log_error("Failed to create shutdown subdirectory: %s", strerror(-r)); return r; diff --git a/src/test/test-udev.c b/src/test/test-udev.c index 551f7564f1..bd9c059037 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) mode |= S_IFCHR; if (strcmp(action, "remove") != 0) { - mkdir_parents(udev_device_get_devnode(dev), 0755); + mkdir_parents_label(udev_device_get_devnode(dev), 0755); mknod(udev_device_get_devnode(dev), mode, udev_device_get_devnum(dev)); } else { unlink(udev_device_get_devnode(dev)); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 2ee0601e64..aebc4bb088 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -652,7 +652,7 @@ static int create_item(Item *i) { case CREATE_DIRECTORY: u = umask(0); - mkdir_parents(i->path, 0755); + mkdir_parents_label(i->path, 0755); r = mkdir(i->path, i->mode); umask(u); diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index de843b437e..7f537c2740 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -446,7 +446,7 @@ static int wall_tty_block(void) { if (asprintf(&p, "/run/systemd/ask-password-block/%u:%u", major(devnr), minor(devnr)) < 0) return -ENOMEM; - mkdir_parents(p, 0700); + mkdir_parents_label(p, 0700); mkfifo(p, 0600); fd = open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); @@ -570,7 +570,7 @@ static int watch_passwords(void) { tty_block_fd = wall_tty_block(); - mkdir_p("/run/systemd/ask-password", 0755); + mkdir_p_label("/run/systemd/ask-password", 0755); if ((notify = inotify_init1(IN_CLOEXEC)) < 0) { r = -errno; diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c index 56dc8fcaa9..69e1db980a 100644 --- a/src/udev/udev-builtin-firmware.c +++ b/src/udev/udev-builtin-firmware.c @@ -121,7 +121,7 @@ static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], boo /* This link indicates the missing firmware file and the associated device */ log_debug("did not find firmware file '%s'\n", firmware); do { - err = mkdir_parents(misspath, 0755); + err = mkdir_parents_label(misspath, 0755); if (err != 0 && err != -ENOENT) break; err = symlink(udev_device_get_devpath(dev), misspath); diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 3c9846f158..2ef6341a2f 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -100,7 +100,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) } else { log_debug("creating symlink '%s' to '%s'\n", slink, target); do { - err = mkdir_parents(slink, 0755); + err = mkdir_parents_label(slink, 0755); if (err != 0 && err != -ENOENT) break; label_context_set(slink, S_IFLNK); @@ -117,7 +117,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL); unlink(slink_tmp); do { - err = mkdir_parents(slink_tmp, 0755); + err = mkdir_parents_label(slink_tmp, 0755); if (err != 0 && err != -ENOENT) break; label_context_set(slink_tmp, S_IFLNK); @@ -226,7 +226,7 @@ static void link_update(struct udev_device *dev, const char *slink, bool add) do { int fd; - err = mkdir_parents(filename, 0755); + err = mkdir_parents_label(filename, 0755); if (err != 0 && err != -ENOENT) break; fd = open(filename, O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444); diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 1091ec8d69..04609a776f 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -111,7 +111,7 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev) } snprintf(filename, sizeof(filename), "/run/udev/watch/%d", wd); - mkdir_parents(filename, 0755); + mkdir_parents_label(filename, 0755); unlink(filename); symlink(udev_device_get_id_filename(dev), filename); diff --git a/src/udev/udevd.c b/src/udev/udevd.c index f6707a5ccb..131d12d1b1 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -850,7 +850,7 @@ static void static_dev_create_from_modules(struct udev *udev) continue; util_strscpyl(filename, sizeof(filename), "/dev/", devname, NULL); - mkdir_parents(filename, 0755); + mkdir_parents_label(filename, 0755); label_context_set(filename, mode); log_debug("mknod '%s' %c%u:%u\n", filename, type, maj, min); if (mknod(filename, mode, makedev(maj, min)) < 0 && errno == EEXIST) @@ -896,7 +896,7 @@ static int convert_db(struct udev *udev) return 0; /* make sure we do not get here again */ - mkdir_parents("/run/udev/data", 0755); + mkdir_parents_label("/run/udev/data", 0755); mkdir(filename, 0755); /* old database */ -- cgit v1.2.3-54-g00ecf From 66a78c2b95ba6cc0be15dab68c5af816fb5b7a33 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Jun 2012 10:11:06 +0200 Subject: cryptsetup: allow configuration of LUKS disks via the kernel cmdline This generalizes a bit of the functionality already available in dracut. --- man/kernel-command-line.xml | 33 +++++++- src/core/main.c | 3 +- src/cryptsetup/cryptsetup-generator.c | 151 +++++++++++++++++++++++++++++++++- src/fsck/fsck.c | 7 +- src/journal/journald.c | 3 +- src/quotacheck/quotacheck.c | 4 +- 6 files changed, 189 insertions(+), 12 deletions(-) (limited to 'src/cryptsetup') diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml index 7247be00fc..e49f67fdb3 100644 --- a/man/kernel-command-line.xml +++ b/man/kernel-command-line.xml @@ -203,10 +203,10 @@ udev.log-priority= - udev.children-max= - udev.udev.exec-delay= rd.udev.log-priority= + udev.children-max= rd.udev.children-max= + udev.udev.exec-delay= rd.udev.udev.exec-delay= @@ -216,8 +216,35 @@ systemd-udevd8. - + + plymouth.enable= + + + May be used to disable + the Plymouth boot splash. For + details see + plymouth8. + + + + + luks= + rd.luks= + luks.crypttab= + rd.luks.crypttab= + luks.uuid= + rd.luks.uuid= + + + Configures the LUKS + full-disk encryption logic at + boot. For details see + cryptsetup@.service8. + + + + diff --git a/src/core/main.c b/src/core/main.c index e6a90e0133..546582cff0 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -374,7 +374,8 @@ static int parse_proc_cmdline_word(const char *word) { arg_sysv_console = r; #endif - } else if (startswith(word, "systemd.")) { + } else if (startswith(word, "systemd.") || + (in_initrd() && startswith(word, "rd.systemd."))) { log_warning("Unknown kernel switch %s. Ignoring.", word); diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 3961d5d965..05808df380 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -27,8 +27,13 @@ #include "util.h" #include "unit-name.h" #include "mkdir.h" +#include "virt.h" +#include "strv.h" -const char *arg_dest = "/tmp"; +static const char *arg_dest = "/tmp"; +static bool arg_enabled = true; +static bool arg_read_crypttab = true; +static char **arg_proc_cmdline_disks = NULL; static bool has_option(const char *haystack, const char *needle) { const char *f = haystack; @@ -235,10 +240,111 @@ fail: return r; } +static int parse_proc_cmdline(void) { + char *line, *w, *state; + int r; + size_t l; + + if (detect_container(NULL) > 0) + return 0; + + r = read_one_line_file("/proc/cmdline", &line); + if (r < 0) { + log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r)); + return 0; + } + + FOREACH_WORD_QUOTED(w, l, line, state) { + char *word; + + word = strndup(w, l); + if (!word) { + r = -ENOMEM; + goto finish; + } + + if (startswith(word, "luks=")) { + r = parse_boolean(word + 5); + if (r < 0) + log_warning("Failed to parse luks switch %s. Ignoring.", word + 5); + else + arg_enabled = r; + + } else if (startswith(word, "rd.luks=")) { + + if (in_initrd()) { + r = parse_boolean(word + 8); + if (r < 0) + log_warning("Failed to parse luks switch %s. Ignoring.", word + 8); + else + arg_enabled = r; + } + + } else if (startswith(word, "luks.crypttab=")) { + r = parse_boolean(word + 14); + if (r < 0) + log_warning("Failed to parse luks crypttab switch %s. Ignoring.", word + 14); + else + arg_read_crypttab = r; + + } else if (startswith(word, "rd.luks.crypttab=")) { + + if (in_initrd()) { + r = parse_boolean(word + 17); + if (r < 0) + log_warning("Failed to parse luks crypttab switch %s. Ignoring.", word + 17); + else + arg_read_crypttab = r; + } + + } else if (startswith(word, "luks.uuid=")) { + char **t; + + t = strv_append(arg_proc_cmdline_disks, word + 10); + if (!t) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + strv_free(arg_proc_cmdline_disks); + arg_proc_cmdline_disks = t; + + } else if (startswith(word, "rd.luks.uuid=")) { + + if (in_initrd()) { + char **t; + + t = strv_append(arg_proc_cmdline_disks, word + 13); + if (!t) { + log_error("Out of memory"); + r = -ENOMEM; + goto finish; + } + strv_free(arg_proc_cmdline_disks); + arg_proc_cmdline_disks = t; + } + + } else if (startswith(word, "luks.") || + (in_initrd() && startswith(word, "rd.luks."))) { + + log_warning("Unknown kernel switch %s. Ignoring.", word); + } + + free(word); + } + + r = 0; + +finish: + free(line); + return r; +} + int main(int argc, char *argv[]) { - FILE *f; + FILE *f = NULL; int r = EXIT_SUCCESS; unsigned n = 0; + char **i; if (argc > 1 && argc != 4) { log_error("This program takes three or no arguments."); @@ -254,6 +360,42 @@ int main(int argc, char *argv[]) { umask(0022); + if (parse_proc_cmdline() < 0) + return EXIT_FAILURE; + + if (!arg_enabled) { + r = EXIT_SUCCESS; + goto finish; + } + + STRV_FOREACH(i, arg_proc_cmdline_disks) { + char *name, *device; + const char *p = *i; + + if (startswith(p, "luks-")) + p += 5; + + name = strappend("luks-", *i); + device = strappend("UUID=", *i); + + if (!name || !device) { + log_error("Out of memory"); + r = EXIT_FAILURE; + free(name); + free(device); + goto finish; + } + + if (create_disk(name, device, NULL, NULL) < 0) + r = EXIT_FAILURE; + + free(name); + free(device); + } + + if (!arg_read_crypttab) + return r; + f = fopen("/etc/crypttab", "re"); if (!f) { @@ -299,5 +441,10 @@ int main(int argc, char *argv[]) { } finish: + if (f) + fclose(f); + + strv_free(arg_proc_cmdline_disks); + return r; } diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c index f25ec49442..833f3f74a6 100644 --- a/src/fsck/fsck.c +++ b/src/fsck/fsck.c @@ -112,7 +112,8 @@ static int parse_proc_cmdline(void) { if (detect_container(NULL) > 0) return 0; - if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) { + r = read_one_line_file("/proc/cmdline", &line); + if (r < 0) { log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r)); return 0; } @@ -125,8 +126,8 @@ static int parse_proc_cmdline(void) { arg_force = true; else if (strneq(w, "fsck.mode=skip", l)) arg_skip = true; - else if (startswith(w, "fsck.mode")) - log_warning("Invalid fsck.mode= parameter. Ignoring."); + else if (startswith(w, "fsck")) + log_warning("Invalid fsck parameter. Ignoring."); #if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) else if (strneq(w, "fastboot", l)) arg_skip = true; diff --git a/src/journal/journald.c b/src/journal/journald.c index 98a155bdef..7ea68aab3c 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -2648,7 +2648,8 @@ static int server_parse_proc_cmdline(Server *s) { log_warning("Failed to parse forward to console switch %s. Ignoring.", word + 36); else s->forward_to_console = r; - } + } else if (startswith(word, "systemd.journald")) + log_warning("Invalid systemd.journald parameter. Ignoring."); free(word); } diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c index e4420eeb1b..05e4971487 100644 --- a/src/quotacheck/quotacheck.c +++ b/src/quotacheck/quotacheck.c @@ -52,8 +52,8 @@ static int parse_proc_cmdline(void) { arg_force = true; else if (strneq(w, "quotacheck.mode=skip", l)) arg_skip = true; - else if (startswith(w, "quotacheck.mode")) - log_warning("Invalid quotacheck.mode= parameter. Ignoring."); + else if (startswith(w, "quotacheck")) + log_warning("Invalid quotacheck parameter. Ignoring."); #if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) else if (strneq(w, "forcequotacheck", l)) arg_force = true; -- cgit v1.2.3-54-g00ecf From 6d37ea8a8ed417da8b536a836605f5f6c03bea2d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 25 Jun 2012 14:27:58 +0200 Subject: units: rename cryptsetup@.service to systemd-cryptsetup@.service It's also our own code, hence should have the prefix. --- src/cryptsetup/cryptsetup-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 05808df380..4166f365ea 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -81,7 +81,7 @@ static int create_disk( noauto = has_option(options, "noauto"); nofail = has_option(options, "nofail"); - n = unit_name_build_escape("cryptsetup", name, ".service"); + n = unit_name_build_escape("systemd-cryptsetup", name, ".service"); if (!n) { r = -ENOMEM; log_error("Failed to allocate unit name."); -- cgit v1.2.3-54-g00ecf From 35eb6b124ebdf82bd77aad6e44962a9a039c4d33 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 25 Jun 2012 20:16:15 +0200 Subject: cryptsetup: fix escaping when generating cryptsetup units --- TODO | 4 + src/core/unit.c | 3 +- src/cryptsetup/cryptsetup-generator.c | 2 +- src/shared/unit-name.c | 168 ++++++++++++---------------------- src/shared/unit-name.h | 3 +- src/test/test-unit-name.c | 51 +++++++++++ 6 files changed, 119 insertions(+), 112 deletions(-) (limited to 'src/cryptsetup') diff --git a/TODO b/TODO index 8778707169..25b9be4b4b 100644 --- a/TODO +++ b/TODO @@ -25,6 +25,10 @@ Bugfixes: Features: +* add switch to journalctl to only show data from current boot + +* change REquires=basic.target to RequisiteOverride=basic.target + * turn $NOTIFY_SOCKET back into an abstract namespace socket for compatibility with services which chroot() diff --git a/src/core/unit.c b/src/core/unit.c index 4cffc57793..64e26b7a94 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2509,7 +2509,8 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) { if (!is_device_path(what)) return 0; - if (!(e = unit_name_build_escape(what+1, NULL, ".device"))) + e = unit_name_from_path(what, ".device"); + if (!e) return -ENOMEM; r = manager_load_unit(u->manager, e, NULL, NULL, &device); diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 4166f365ea..b86521a712 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -81,7 +81,7 @@ static int create_disk( noauto = has_option(options, "noauto"); nofail = has_option(options, "nofail"); - n = unit_name_build_escape("systemd-cryptsetup", name, ".service"); + n = unit_name_from_path_instance("systemd-cryptsetup", name, ".service"); if (!n) { r = -ENOMEM; log_error("Failed to allocate unit name."); diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 8c8e592ab0..4b52f7bc53 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -112,7 +112,8 @@ int unit_name_to_instance(const char *n, char **instance) { assert(instance); /* Everything past the first @ and before the last . is the instance */ - if (!(p = strchr(n, '@'))) { + p = strchr(n, '@'); + if (!p) { *instance = NULL; return 0; } @@ -120,7 +121,8 @@ int unit_name_to_instance(const char *n, char **instance) { assert_se(d = strrchr(n, '.')); assert(p < d); - if (!(i = strndup(p+1, d-p-1))) + i = strndup(p+1, d-p-1); + if (!i) return -ENOMEM; *instance = i; @@ -211,50 +213,6 @@ static char *do_escape(const char *f, char *t) { return t; } -char *unit_name_build_escape(const char *prefix, const char *instance, const char *suffix) { - char *r, *t; - size_t a, b, c; - - assert(prefix); - assert(suffix); - - /* Takes a arbitrary string for prefix and instance plus a - * suffix and makes a nice string suitable as unit name of it, - * escaping all weird chars on the way. - * - * / becomes -, and all chars not allowed in a unit name get - * escaped as \xFF, including \ and -, of course. This - * escaping is hence reversible. - * - * This is primarily useful to make nice unit names from - * strings, but is actually useful for any kind of string. - */ - - a = strlen(prefix); - c = strlen(suffix); - - if (instance) { - b = strlen(instance); - - r = new(char, a*4 + 1 + b*4 + c + 1); - if (!r) - return NULL; - - t = do_escape(prefix, r); - *(t++) = '@'; - t = do_escape(instance, t); - } else { - - if (!(r = new(char, a*4 + c + 1))) - return NULL; - - t = do_escape(prefix, r); - } - - strcpy(t, suffix); - return r; -} - char *unit_name_escape(const char *f) { char *r, *t; @@ -301,6 +259,49 @@ char *unit_name_unescape(const char *f) { return r; } +char *unit_name_path_escape(const char *f) { + char *p, *e; + + assert(f); + + p = strdup(f); + if (!p) + return NULL; + + path_kill_slashes(p); + + if (streq(p, "/")) { + free(p); + return strdup("-"); + } + + e = unit_name_escape(p[0] == '/' ? p + 1 : p); + free(p); + + return e; +} + +char *unit_name_path_unescape(const char *f) { + char *e; + + assert(f); + + e = unit_name_unescape(f); + if (!e) + return NULL; + + if (e[0] != '/') { + char *w; + + w = strappend("/", e); + free(e); + + return w; + } + + return e; +} + bool unit_name_is_template(const char *n) { const char *p; @@ -329,14 +330,16 @@ char *unit_name_replace_instance(const char *f, const char *i) { b = strlen(i); - if (!(r = new(char, a + 1 + b + strlen(e) + 1))) + r = new(char, a + 1 + b + strlen(e) + 1); + if (!r) return NULL; k = mempcpy(r, f, a + 1); k = mempcpy(k, i, b); } else { - if (!(r = new(char, a + strlen(e) + 1))) + r = new(char, a + strlen(e) + 1); + if (!r) return NULL; k = mempcpy(r, f, a); @@ -373,20 +376,11 @@ char *unit_name_from_path(const char *path, const char *suffix) { assert(path); assert(suffix); - p = strdup(path); + p = unit_name_path_escape(path); if (!p) return NULL; - path_kill_slashes(p); - - path = p[0] == '/' ? p + 1 : p; - - if (path[0] == 0) { - free(p); - return strappend("-", suffix); - } - - r = unit_name_build_escape(path, NULL, suffix); + r = strappend(p, suffix); free(p); return r; @@ -395,22 +389,15 @@ char *unit_name_from_path(const char *path, const char *suffix) { char *unit_name_from_path_instance(const char *prefix, const char *path, const char *suffix) { char *p, *r; + assert(prefix); assert(path); assert(suffix); - if (!(p = strdup(path))) + p = unit_name_path_escape(path); + if (!p) return NULL; - path_kill_slashes(p); - - path = p[0] == '/' ? p + 1 : p; - - if (path[0] == 0) { - free(p); - return unit_name_build_escape(prefix, "-", suffix); - } - - r = unit_name_build_escape(prefix, path, suffix); + r = join(prefix, "@", p, suffix, NULL); free(p); return r; @@ -425,52 +412,17 @@ char *unit_name_to_path(const char *name) { if (!w) return NULL; - e = unit_name_unescape(w); + e = unit_name_path_unescape(w); free(w); - if (!e) - return NULL; - - if (e[0] != '/') { - w = strappend("/", e); - free(e); - - if (!w) - return NULL; - - return w; - } - - return e; -} - -char *unit_name_path_unescape(const char *f) { - char *e; - - assert(f); - - e = unit_name_unescape(f); - if (!e) - return NULL; - - if (e[0] != '/') { - char *w; - - w = strappend("/", e); - free(e); - - if (!w) - return NULL; - - return w; - } - return e; } char *unit_dbus_path_from_name(const char *name) { char *e, *p; + assert(name); + e = bus_path_escape(name); if (!e) return NULL; diff --git a/src/shared/unit-name.h b/src/shared/unit-name.h index 64bb248907..13665c5980 100644 --- a/src/shared/unit-name.h +++ b/src/shared/unit-name.h @@ -37,11 +37,10 @@ bool unit_instance_is_valid(const char *i); char *unit_name_change_suffix(const char *n, const char *suffix); char *unit_name_build(const char *prefix, const char *instance, const char *suffix); -char *unit_name_build_escape(const char *prefix, const char *instance, const char *suffix); char *unit_name_escape(const char *f); char *unit_name_unescape(const char *f); - +char *unit_name_path_escape(const char *f); char *unit_name_path_unescape(const char *f); bool unit_name_is_template(const char *n); diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 9d636afe15..392e358ac2 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -29,6 +29,57 @@ int main(int argc, char* argv[]) { char *t, *k; + t = unit_name_from_path("/waldo", ".mount"); + puts(t); + k = unit_name_to_path(t); + puts(k); + free(k); + free(t); + + t = unit_name_from_path("/waldo/quuix", ".mount"); + puts(t); + k = unit_name_to_path(t); + puts(k); + free(k); + free(t); + + t = unit_name_from_path("/waldo/quuix/", ".mount"); + puts(t); + k = unit_name_to_path(t); + puts(k); + free(k); + free(t); + + t = unit_name_from_path("/", ".mount"); + puts(t); + k = unit_name_to_path(t); + puts(k); + free(k); + free(t); + + t = unit_name_from_path("///", ".mount"); + puts(t); + k = unit_name_to_path(t); + puts(k); + free(k); + free(t); + + t = unit_name_from_path_instance("waldo", "/waldo", ".mount"); + puts(t); + free(t); + + t = unit_name_from_path_instance("waldo", "/waldo////quuix////", ".mount"); + puts(t); + free(t); + + t = unit_name_from_path_instance("waldo", "/", ".mount"); + puts(t); + free(t); + + t = unit_name_from_path_instance("wa--ldo", "/--", ".mount"); + puts(t); + free(t); + assert_se(t = unit_name_mangle("/home")); assert_se(k = unit_name_mangle(t)); puts(t); -- cgit v1.2.3-54-g00ecf From d0d6944cdc17295b17875054ac05e667fe496fed Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Jun 2012 12:19:35 +0200 Subject: man: document systemd-cryptsetup --- Makefile.am | 9 ++++ man/systemd-cryptsetup@.service.xml | 79 +++++++++++++++++++++++++++++++++++ man/systemd-fsck@.service.xml | 2 +- src/cryptsetup/cryptsetup-generator.c | 1 + 4 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 man/systemd-cryptsetup@.service.xml (limited to 'src/cryptsetup') diff --git a/Makefile.am b/Makefile.am index eb36efdae6..3718fa871e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2608,6 +2608,15 @@ cryptsetup-install-data-hook: INSTALL_DATA_HOOKS += \ cryptsetup-install-data-hook + +MANPAGES += \ + man/systemd-cryptsetup@.service.8 + +MANPAGES_ALIAS += \ + man/systemd-cryptsetup.8 + +man/systemd-cryptsetup.8: man/systemd-cryptsetup@.service.8 + endif # ------------------------------------------------------------------------------ diff --git a/man/systemd-cryptsetup@.service.xml b/man/systemd-cryptsetup@.service.xml new file mode 100644 index 0000000000..6e021d85da --- /dev/null +++ b/man/systemd-cryptsetup@.service.xml @@ -0,0 +1,79 @@ + + + + + + + + systemd-cryptsetup@.service + systemd + + + + Developer + Lennart + Poettering + lennart@poettering.net + + + + + + systemd-cryptsetup@.service + 8 + + + + systemd-cryptsetup@.service + systemd-cryptsetup + Full disk decryption logic + + + + systemd-cryptsetup@.service + /usr/lib/systemd/systemd-cryptsetup + + + + Description + + systemd-cryptsetup@.service + is a service responsible for setting up encrypted + block devices. It is instantiated for each device that + requires decryption for access. + + systemd-cryptsetup@.service + will ask for hard disk passwords via the + password agent logic, in order to query the + user for the password using the right mechanism at + boot and during runtime. + + + + See Also + + systemd1, + cryptsetup8, + crypttab5 + + + + diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml index ad980a79a3..62f63110e1 100644 --- a/man/systemd-fsck@.service.xml +++ b/man/systemd-fsck@.service.xml @@ -60,7 +60,7 @@ service responsible for file system checks. It is instantiated for each device that requires a file system - check. systemd-fsck@.service is + check. systemd-fsck-root.service is responsible for file system checks on the root file system. diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index b86521a712..4056d1ddd2 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -120,6 +120,7 @@ static int create_disk( "# Automatically generated by systemd-cryptsetup-generator\n\n" "[Unit]\n" "Description=Cryptography Setup for %%I\n" + "Documentation=man:systemd-cryptsetup@.service(8)\n" "SourcePath=/etc/crypttab\n" "Conflicts=umount.target\n" "DefaultDependencies=no\n" -- cgit v1.2.3-54-g00ecf From 1c7327004ab6f0b91bdceb06877a3094c5fe2a4b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Jun 2012 13:24:13 +0200 Subject: man: add reference to crypttab(5) from cryptsetup units --- src/cryptsetup/cryptsetup-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 4056d1ddd2..f714c8c241 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -120,7 +120,7 @@ static int create_disk( "# Automatically generated by systemd-cryptsetup-generator\n\n" "[Unit]\n" "Description=Cryptography Setup for %%I\n" - "Documentation=man:systemd-cryptsetup@.service(8)\n" + "Documentation=man:systemd-cryptsetup@.service(8) man:crypttab(5)\n" "SourcePath=/etc/crypttab\n" "Conflicts=umount.target\n" "DefaultDependencies=no\n" -- cgit v1.2.3-54-g00ecf From 880a599e262b9193219e612d827b35bb0c292dae Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 29 Jun 2012 14:36:37 +0200 Subject: cryptsetup: add keyfile-offset= support This is useful if your keyfile is a block device, and you want to use a specific part of it, such as an area between the MBR and the first partition. This feature is documented in the Arch wiki[0], and has been supported by the Arch initscripts, so would be nice to get this into systemd. This requires libcryptsetup >= 1.4.2 (released 12.4.2012). Acked-by: Paul Menzel [0]: --- configure.ac | 2 +- man/crypttab.xml | 12 ++++++++++++ src/cryptsetup/cryptsetup.c | 11 ++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) (limited to 'src/cryptsetup') diff --git a/configure.ac b/configure.ac index bb60ecc166..c5fbec5738 100644 --- a/configure.ac +++ b/configure.ac @@ -333,7 +333,7 @@ AC_SUBST(AUDIT_LIBS) have_libcryptsetup=no AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools])) if test "x$enable_libcryptsetup" != "xno"; then - PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup ], + PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ], [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no) if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found]) diff --git a/man/crypttab.xml b/man/crypttab.xml index f3bde71b4f..2fa8e8940f 100644 --- a/man/crypttab.xml +++ b/man/crypttab.xml @@ -130,6 +130,18 @@ + + keyfile-offset= + + Specifies the number + of bytes to skip at the start of + the keyfile; see + cryptsetup8 + for possible values and the default + value of this option. + + + hash= diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index b26fcca836..f570724b9d 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -37,6 +37,7 @@ static const char *opt_type = NULL; /* LUKS1 or PLAIN */ static char *opt_cipher = NULL; static unsigned opt_key_size = 0; +static unsigned opt_keyfile_offset = 0; static char *opt_hash = NULL; static unsigned opt_tries = 0; static bool opt_readonly = false; @@ -79,6 +80,13 @@ static int parse_one_option(const char *option) { return 0; } + } else if (startswith(option, "keyfile-offset=")) { + + if (safe_atou(option+15, &opt_keyfile_offset) < 0) { + log_error("keyfile-offset= parse failure, ignoring."); + return 0; + } + } else if (startswith(option, "hash=")) { char *t; @@ -462,7 +470,8 @@ int main(int argc, char *argv[]) { argv[3]); if (key_file) - k = crypt_activate_by_keyfile(cd, argv[2], CRYPT_ANY_SLOT, key_file, keyfile_size, flags); + k = crypt_activate_by_keyfile_offset(cd, argv[2], CRYPT_ANY_SLOT, key_file, keyfile_size, + opt_keyfile_offset, flags); else { char **p; -- cgit v1.2.3-54-g00ecf From b7def684941808600c344f0be7a2b9fcdda97e0f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Jul 2012 13:41:01 +0200 Subject: util: rename join() to strjoin() This is to match strappend() and the other string related functions. --- TODO | 4 ++++ src/cgtop/cgtop.c | 2 +- src/core/cgroup.c | 4 ++-- src/core/dbus-manager.c | 2 +- src/core/load-dropin.c | 6 +++--- src/core/manager.c | 4 ++-- src/core/mount.c | 2 +- src/core/service.c | 14 +++++++------- src/core/unit.c | 4 ++-- src/cryptsetup/cryptsetup-generator.c | 10 +++++----- src/delta/delta.c | 4 ++-- src/fstab-generator/fstab-generator.c | 16 ++++++++-------- src/getty-generator/getty-generator.c | 2 +- src/journal/coredump.c | 4 ++-- src/journal/journald.c | 4 ++-- src/journal/sd-journal.c | 10 +++++----- src/shared/cgroup-util.c | 10 +++++----- src/shared/conf-parser.c | 2 +- src/shared/hwclock.c | 2 +- src/shared/path-util.c | 2 +- src/shared/unit-name.c | 4 ++-- src/shared/util.c | 4 ++-- src/shared/util.h | 2 +- src/tmpfiles/tmpfiles.c | 2 +- 24 files changed, 62 insertions(+), 58 deletions(-) (limited to 'src/cryptsetup') diff --git a/TODO b/TODO index 25266b2845..c0a553bf82 100644 --- a/TODO +++ b/TODO @@ -34,6 +34,10 @@ Bugfixes: Features: +* logind: wakelock/opportunistic suspend support + +* seccomp filters for services + * replace BindTo= by BindsTo=, but keep old name for compat * switch-root: sockets need relabelling diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index f988adb363..5557094a4f 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -310,7 +310,7 @@ static int refresh_one( if (r <= 0) goto finish; - p = join(path, "/", fn, NULL); + p = strjoin(path, "/", fn, NULL); free(fn); if (!p) { diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 5513f6560c..aaea96b820 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -120,7 +120,7 @@ int cgroup_bonding_install(CGroupBonding *b, pid_t pid, const char *cgroup_suffi assert(pid >= 0); if (cgroup_suffix) { - p = join(b->path, "/", cgroup_suffix, NULL); + p = strjoin(b->path, "/", cgroup_suffix, NULL); if (!p) return -ENOMEM; @@ -208,7 +208,7 @@ int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, bool rem, Set * return 0; if (cgroup_suffix) { - p = join(b->path, "/", cgroup_suffix, NULL); + p = strjoin(b->path, "/", cgroup_suffix, NULL); if (!p) return -ENOMEM; diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index f8a5400055..67b7b13eac 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1179,7 +1179,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, else { char *p; - p = join(switch_root, "/", switch_root_init, NULL); + p = strjoin(switch_root, "/", switch_root_init, NULL); if (!p) goto oom; diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c index 4323147a01..86f81c7484 100644 --- a/src/core/load-dropin.c +++ b/src/core/load-dropin.c @@ -51,7 +51,7 @@ static int iterate_dir(Unit *u, const char *path, UnitDependency dependency) { if (ignore_file(de->d_name)) continue; - f = join(path, "/", de->d_name, NULL); + f = strjoin(path, "/", de->d_name, NULL); if (!f) { r = -ENOMEM; goto finish; @@ -80,7 +80,7 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c assert(name); assert(suffix); - path = join(unit_path, "/", name, suffix, NULL); + path = strjoin(unit_path, "/", name, suffix, NULL); if (!path) return -ENOMEM; @@ -102,7 +102,7 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c if (!template) return -ENOMEM; - path = join(unit_path, "/", template, suffix, NULL); + path = strjoin(unit_path, "/", template, suffix, NULL); free(template); if (!path) diff --git a/src/core/manager.c b/src/core/manager.c index 7bd484be6c..8f2635051e 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -590,7 +590,7 @@ static void manager_build_unit_path_cache(Manager *m) { if (ignore_file(de->d_name)) continue; - p = join(streq(*i, "/") ? "" : *i, "/", de->d_name, NULL); + p = strjoin(streq(*i, "/") ? "" : *i, "/", de->d_name, NULL); if (!p) { r = -ENOMEM; goto fail; @@ -2085,7 +2085,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name) return r; } } else { - p = join("/tmp/systemd-", name, ".XXXXXX", NULL); + p = strjoin("/tmp/systemd-", name, ".XXXXXX", NULL); if (!p) { log_error("Out of memory"); return -ENOMEM; diff --git a/src/core/mount.c b/src/core/mount.c index fab922ea9e..15d5f21530 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1534,7 +1534,7 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { goto clean_up; } - o = join(options, ",", options2, NULL); + o = strjoin(options, ",", options2, NULL); if (!o) { r = -ENOMEM; goto finish; diff --git a/src/core/service.c b/src/core/service.c index e57b0e970c..2be6ee5d99 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -722,7 +722,7 @@ static int service_load_sysv_path(Service *s, const char *path) { char *d = NULL; if (chkconfig_description) - d = join(chkconfig_description, " ", j, NULL); + d = strjoin(chkconfig_description, " ", j, NULL); else d = strdup(j); @@ -879,7 +879,7 @@ static int service_load_sysv_path(Service *s, const char *path) { char *d = NULL; if (long_description) - d = join(long_description, " ", t, NULL); + d = strjoin(long_description, " ", t, NULL); else d = strdup(j); @@ -1001,7 +1001,7 @@ static int service_load_sysv_name(Service *s, const char *name) { char *path; int r; - path = join(*p, "/", name, NULL); + path = strjoin(*p, "/", name, NULL); if (!path) return -ENOMEM; @@ -1023,7 +1023,7 @@ static int service_load_sysv_name(Service *s, const char *name) { if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) { /* Try SUSE style boot.* init scripts */ - path = join(*p, "/boot.", name, NULL); + path = strjoin(*p, "/boot.", name, NULL); if (!path) return -ENOMEM; @@ -1038,7 +1038,7 @@ static int service_load_sysv_name(Service *s, const char *name) { if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) { /* Try Frugalware style rc.* init scripts */ - path = join(*p, "/rc.", name, NULL); + path = strjoin(*p, "/rc.", name, NULL); if (!path) return -ENOMEM; @@ -3407,7 +3407,7 @@ static int service_enumerate(Manager *m) { struct dirent *de; free(path); - path = join(*p, "/", rcnd_table[i].path, NULL); + path = strjoin(*p, "/", rcnd_table[i].path, NULL); if (!path) { r = -ENOMEM; goto finish; @@ -3442,7 +3442,7 @@ static int service_enumerate(Manager *m) { continue; free(fpath); - fpath = join(path, "/", de->d_name, NULL); + fpath = strjoin(path, "/", de->d_name, NULL); if (!fpath) { r = -ENOMEM; goto finish; diff --git a/src/core/unit.c b/src/core/unit.c index 37711afeaf..516f4fad8b 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1891,10 +1891,10 @@ static char *default_cgroup_path(Unit *u) { if (!t) return NULL; - p = join(u->manager->cgroup_hierarchy, "/", t, "/", u->instance, NULL); + p = strjoin(u->manager->cgroup_hierarchy, "/", t, "/", u->instance, NULL); free(t); } else - p = join(u->manager->cgroup_hierarchy, "/", u->id, NULL); + p = strjoin(u->manager->cgroup_hierarchy, "/", u->id, NULL); return p; } diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index f714c8c241..7801de64b5 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -88,7 +88,7 @@ static int create_disk( goto fail; } - p = join(arg_dest, "/", n, NULL); + p = strjoin(arg_dest, "/", n, NULL); if (!p) { r = -ENOMEM; log_error("Failed to allocate unit file name."); @@ -175,7 +175,7 @@ static int create_disk( if (!noauto) { - to = join(arg_dest, "/", d, ".wants/", n, NULL); + to = strjoin(arg_dest, "/", d, ".wants/", n, NULL); if (!to) { r = -ENOMEM; goto fail; @@ -191,9 +191,9 @@ static int create_disk( free(to); if (!nofail) - to = join(arg_dest, "/cryptsetup.target.requires/", n, NULL); + to = strjoin(arg_dest, "/cryptsetup.target.requires/", n, NULL); else - to = join(arg_dest, "/cryptsetup.target.wants/", n, NULL); + to = strjoin(arg_dest, "/cryptsetup.target.wants/", n, NULL); if (!to) { r = -ENOMEM; goto fail; @@ -211,7 +211,7 @@ static int create_disk( } e = unit_name_escape(name); - to = join(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL); + to = strjoin(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL); if (!to) { r = -ENOMEM; goto fail; diff --git a/src/delta/delta.c b/src/delta/delta.c index 01c6335315..eef6536b01 100644 --- a/src/delta/delta.c +++ b/src/delta/delta.c @@ -192,7 +192,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) { if (!dirent_is_file(de)) continue; - p = join(path, "/", de->d_name, NULL); + p = strjoin(path, "/", de->d_name, NULL); if (!p) { r = -ENOMEM; goto finish; @@ -254,7 +254,7 @@ static int process_suffix(const char *prefixes, const char *suffix) { NULSTR_FOREACH(p, prefixes) { char *t; - t = join(p, "/", suffix, NULL); + t = strjoin(p, "/", suffix, NULL); if (!t) { r = -ENOMEM; goto finish; diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index f832730b40..3a59b85d66 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -103,7 +103,7 @@ static int add_swap(const char *what, struct mntent *me) { goto finish; } - unit = join(arg_dest, "/", name, NULL); + unit = strjoin(arg_dest, "/", name, NULL); if (!unit) { log_error("Out of memory"); r = -ENOMEM; @@ -146,7 +146,7 @@ static int add_swap(const char *what, struct mntent *me) { } if (!noauto) { - lnk = join(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL); + lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL); if (!lnk) { log_error("Out of memory"); r = -ENOMEM; @@ -169,7 +169,7 @@ static int add_swap(const char *what, struct mntent *me) { if (r > 0) { free(lnk); - lnk = join(arg_dest, "/", device, ".wants/", name, NULL); + lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL); if (!lnk) { log_error("Out of memory"); r = -ENOMEM; @@ -261,7 +261,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { goto finish; } - unit = join(arg_dest, "/", name, NULL); + unit = strjoin(arg_dest, "/", name, NULL); if (!unit) { log_error("Out of memory"); r = -ENOMEM; @@ -321,7 +321,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { } if (!noauto) { - lnk = join(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); + lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); if (!lnk) { log_error("Out of memory"); r = -ENOMEM; @@ -347,7 +347,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { if (r > 0) { free(lnk); - lnk = join(arg_dest, "/", device, ".wants/", name, NULL); + lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL); if (!lnk) { log_error("Out of memory"); r = -ENOMEM; @@ -372,7 +372,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { goto finish; } - automount_unit = join(arg_dest, "/", automount_name, NULL); + automount_unit = strjoin(arg_dest, "/", automount_name, NULL); if (!automount_unit) { log_error("Out of memory"); r = -ENOMEM; @@ -408,7 +408,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { } free(lnk); - lnk = join(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL); + lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL); if (!lnk) { log_error("Out of memory"); r = -ENOMEM; diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index bb7c225e02..b2e3eb6393 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -39,7 +39,7 @@ static int add_symlink(const char *fservice, const char *tservice) { assert(tservice); from = strappend(SYSTEM_DATA_UNIT_PATH "/", fservice); - to = join(arg_dest,"/getty.target.wants/", tservice, NULL); + to = strjoin(arg_dest,"/getty.target.wants/", tservice, NULL); if (!from || !to) { log_error("Out of memory"); diff --git a/src/journal/coredump.c b/src/journal/coredump.c index 300677bb92..fcd0d1e625 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -213,14 +213,14 @@ int main(int argc, char* argv[]) { IOVEC_SET_STRING(iovec[j++], core_cmdline); } - core_timestamp = join("COREDUMP_TIMESTAMP=", argv[ARG_TIMESTAMP], "000000", NULL); + core_timestamp = strjoin("COREDUMP_TIMESTAMP=", argv[ARG_TIMESTAMP], "000000", NULL); if (core_timestamp) IOVEC_SET_STRING(iovec[j++], core_timestamp); IOVEC_SET_STRING(iovec[j++], "MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1"); IOVEC_SET_STRING(iovec[j++], "PRIORITY=2"); - core_message = join("MESSAGE=Process ", argv[ARG_PID], " (", argv[ARG_COMM], ") dumped core.", NULL); + core_message = strjoin("MESSAGE=Process ", argv[ARG_PID], " (", argv[ARG_COMM], ") dumped core.", NULL); if (core_message) IOVEC_SET_STRING(iovec[j++], core_message); diff --git a/src/journal/journald.c b/src/journal/journald.c index 2402f7f6d0..fd292f019e 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -1976,7 +1976,7 @@ static int system_journal_open(Server *s) { (void) mkdir(fn, 0755); free(fn); - fn = join("/var/log/journal/", ids, "/system.journal", NULL); + fn = strjoin("/var/log/journal/", ids, "/system.journal", NULL); if (!fn) return -ENOMEM; @@ -2002,7 +2002,7 @@ static int system_journal_open(Server *s) { if (!s->runtime_journal && (s->storage != STORAGE_NONE)) { - fn = join("/run/log/journal/", ids, "/system.journal", NULL); + fn = strjoin("/run/log/journal/", ids, "/system.journal", NULL); if (!fn) return -ENOMEM; diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 4bcc65c5c7..57572d4f01 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -313,7 +313,7 @@ static char *match_make_string(Match *m) { } if (p) { - k = join(p, m->type == MATCH_OR_TERM ? " OR " : " AND ", t, NULL); + k = strjoin(p, m->type == MATCH_OR_TERM ? " OR " : " AND ", t, NULL); free(p); free(t); @@ -330,7 +330,7 @@ static char *match_make_string(Match *m) { } if (enclose) { - r = join("(", p, ")", NULL); + r = strjoin("(", p, ")", NULL); free(p); return r; } @@ -1101,7 +1101,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) { (startswith(filename, "system@") && endswith(filename, ".journal")))) return 0; - path = join(prefix, "/", filename, NULL); + path = strjoin(prefix, "/", filename, NULL); if (!path) return -ENOMEM; @@ -1149,7 +1149,7 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename) assert(prefix); assert(filename); - path = join(prefix, "/", filename, NULL); + path = strjoin(prefix, "/", filename, NULL); if (!path) return -ENOMEM; @@ -1184,7 +1184,7 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname) !sd_id128_equal(id, mid))) return 0; - path = join(prefix, "/", dirname, NULL); + path = strjoin(prefix, "/", dirname, NULL); if (!path) return -ENOMEM; diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 6740d3b885..b0d378de5a 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -522,16 +522,16 @@ static int join_path(const char *controller, const char *path, const char *suffi if (controller) { if (path && suffix) - t = join("/sys/fs/cgroup/", controller, "/", path, "/", suffix, NULL); + t = strjoin("/sys/fs/cgroup/", controller, "/", path, "/", suffix, NULL); else if (path) - t = join("/sys/fs/cgroup/", controller, "/", path, NULL); + t = strjoin("/sys/fs/cgroup/", controller, "/", path, NULL); else if (suffix) - t = join("/sys/fs/cgroup/", controller, "/", suffix, NULL); + t = strjoin("/sys/fs/cgroup/", controller, "/", suffix, NULL); else - t = join("/sys/fs/cgroup/", controller, NULL); + t = strjoin("/sys/fs/cgroup/", controller, NULL); } else { if (path && suffix) - t = join(path, "/", suffix, NULL); + t = strjoin(path, "/", suffix, NULL); else if (path) t = strdup(path); } diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 8c62fb959b..1eccec5989 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -90,7 +90,7 @@ int config_item_perf_lookup( else { char *key; - key = join(section, ".", lvalue, NULL); + key = strjoin(section, ".", lvalue, NULL); if (!key) return -ENOMEM; diff --git a/src/shared/hwclock.c b/src/shared/hwclock.c index d40bb2653f..9f8ab08e2b 100644 --- a/src/shared/hwclock.c +++ b/src/shared/hwclock.c @@ -74,7 +74,7 @@ static int rtc_open(int flags) { if (ignore_file(de->d_name)) continue; - p = join("/sys/class/rtc/", de->d_name, "/hctosys", NULL); + p = strjoin("/sys/class/rtc/", de->d_name, "/hctosys", NULL); if (!p) { closedir(d); return -ENOMEM; diff --git a/src/shared/path-util.c b/src/shared/path-util.c index ccd7667608..8bc7955020 100644 --- a/src/shared/path-util.c +++ b/src/shared/path-util.c @@ -120,7 +120,7 @@ char *path_make_absolute(const char *p, const char *prefix) { if (path_is_absolute(p) || !prefix) return strdup(p); - return join(prefix, "/", p, NULL); + return strjoin(prefix, "/", p, NULL); } char *path_make_absolute_cwd(const char *p) { diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 3e437b77a1..fcf5902c78 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -208,7 +208,7 @@ char *unit_name_build(const char *prefix, const char *instance, const char *suff if (!instance) return strappend(prefix, suffix); - return join(prefix, "@", instance, suffix, NULL); + return strjoin(prefix, "@", instance, suffix, NULL); } static char *do_escape_char(char c, char *t) { @@ -425,7 +425,7 @@ char *unit_name_from_path_instance(const char *prefix, const char *path, const c if (!p) return NULL; - r = join(prefix, "@", p, suffix, NULL); + r = strjoin(prefix, "@", p, suffix, NULL); free(p); return r; diff --git a/src/shared/util.c b/src/shared/util.c index 63471899fd..2aabd8d634 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -1083,7 +1083,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char * if (h < 0) return h; - r = join("[", t, "]", NULL); + r = strjoin("[", t, "]", NULL); free(t); if (!r) @@ -5145,7 +5145,7 @@ finish: return r; } -char *join(const char *x, ...) { +char *strjoin(const char *x, ...) { va_list ap; size_t l; char *r, *p; diff --git a/src/shared/util.h b/src/shared/util.h index c8d048f9b2..d9b656d2ca 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -451,7 +451,7 @@ int dirent_ensure_type(DIR *d, struct dirent *de); int in_search_path(const char *path, char **search); int get_files_in_directory(const char *path, char ***list); -char *join(const char *x, ...) _sentinel_; +char *strjoin(const char *x, ...) _sentinel_; bool is_main_thread(void); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 2d5d90d265..3b52b9889c 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -1297,7 +1297,7 @@ static char *resolve_fragment(const char *fragment, const char **search_paths) { return strdup(fragment); STRV_FOREACH(p, search_paths) { - resolved_path = join(*p, "/", fragment, NULL); + resolved_path = strjoin(*p, "/", fragment, NULL); if (resolved_path == NULL) { log_error("Out of memory"); return NULL; -- cgit v1.2.3-54-g00ecf From 7f2cddae09fd2579ae24434df577bb5e5a157d86 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Jul 2012 23:34:40 +0200 Subject: unit: rename BindTo= to BindsTo= all other dependencies are in 3rd person. Change BindTo= accordingly to BindsTo=. Of course, the dependency is widely used, hence we parse the old name too for compatibility. --- TODO | 4 ---- man/systemd.unit.xml | 6 +++--- src/core/dbus-unit.c | 6 +++--- src/core/dbus-unit.h | 6 +++--- src/core/load-fragment-gperf.gperf.m4 | 9 ++++++--- src/core/service.c | 2 +- src/core/target.c | 2 +- src/core/transaction.c | 4 ++-- src/core/unit.c | 20 ++++++++++---------- src/core/unit.h | 8 ++++---- src/cryptsetup/cryptsetup-generator.c | 2 +- units/hibernate.target | 2 +- units/serial-getty@.service.m4 | 2 +- units/suspend.target | 2 +- units/systemd-fsck@.service.in | 2 +- 15 files changed, 38 insertions(+), 39 deletions(-) (limited to 'src/cryptsetup') diff --git a/TODO b/TODO index 3bf6ef8dff..61c0b57126 100644 --- a/TODO +++ b/TODO @@ -40,12 +40,8 @@ Features: * seccomp filters for services -* replace BindTo= by BindsTo=, but keep old name for compat - * switch-root: sockets need relabelling -* switch-root: handle journald restart - * segfault in journalctl during /var migration * systemd-analyze post-boot is broken for initrd diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 93fb37b72b..3fd76f3020 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -410,7 +410,7 @@ - BindTo= + BindsTo= Configures requirement dependencies, very similar in style to @@ -527,8 +527,8 @@ - PropagateReloadTo= - PropagateReloadFrom= + PropagatesReloadTo= + ReloadPropagatedFrom= Lists one or more units where reload requests on the diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index f85f3f898a..21145873ea 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -793,7 +793,7 @@ const BusProperty bus_unit_properties[] = { { "Requisite", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUISITE]), true }, { "RequisiteOverridable", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUISITE_OVERRIDABLE]), true }, { "Wants", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_WANTS]), true }, - { "BindTo", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_BIND_TO]), true }, + { "BindsTo", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_BINDS_TO]), true }, { "RequiredBy", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUIRED_BY]), true }, { "RequiredByOverridable",bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUIRED_BY_OVERRIDABLE]), true }, { "WantedBy", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_WANTED_BY]), true }, @@ -805,8 +805,8 @@ const BusProperty bus_unit_properties[] = { { "OnFailure", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_ON_FAILURE]), true }, { "Triggers", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_TRIGGERS]), true }, { "TriggeredBy", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_TRIGGERED_BY]), true }, - { "PropagateReloadTo", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_PROPAGATE_RELOAD_TO]), true }, - { "PropagateReloadFrom", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_PROPAGATE_RELOAD_FROM]), true }, + { "PropagatesReloadTo", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_PROPAGATES_RELOAD_TO]), true }, + { "ReloadPropagatedFrom", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_RELOAD_PROPAGATED_FROM]), true }, { "RequiresMountsFor", bus_property_append_strv, "as", offsetof(Unit, requires_mounts_for), true }, { "Documentation", bus_property_append_strv, "as", offsetof(Unit, documentation), true }, { "Description", bus_unit_append_description, "s", 0 }, diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h index ae94ca2c2b..d5902ee22a 100644 --- a/src/core/dbus-unit.h +++ b/src/core/dbus-unit.h @@ -71,7 +71,7 @@ " \n" \ " \n" \ " \n" \ - " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ @@ -83,8 +83,8 @@ " \n" \ " \n" \ " \n" \ - " \n" \ - " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index f5e9b70672..192c2b2780 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -98,13 +98,16 @@ Unit.RequiresOverridable, config_parse_unit_deps, UNIT_REQUIR Unit.Requisite, config_parse_unit_deps, UNIT_REQUISITE, 0 Unit.RequisiteOverridable, config_parse_unit_deps, UNIT_REQUISITE_OVERRIDABLE, 0 Unit.Wants, config_parse_unit_deps, UNIT_WANTS, 0 -Unit.BindTo, config_parse_unit_deps, UNIT_BIND_TO, 0 +Unit.BindsTo, config_parse_unit_deps, UNIT_BINDS_TO, 0 +Unit.BindTo, config_parse_unit_deps, UNIT_BINDS_TO, 0 Unit.Conflicts, config_parse_unit_deps, UNIT_CONFLICTS, 0 Unit.Before, config_parse_unit_deps, UNIT_BEFORE, 0 Unit.After, config_parse_unit_deps, UNIT_AFTER, 0 Unit.OnFailure, config_parse_unit_deps, UNIT_ON_FAILURE, 0 -Unit.PropagateReloadTo, config_parse_unit_deps, UNIT_PROPAGATE_RELOAD_TO, 0 -Unit.PropagateReloadFrom, config_parse_unit_deps, UNIT_PROPAGATE_RELOAD_FROM, 0 +Unit.PropagatesReloadTo, config_parse_unit_deps, UNIT_PROPAGATES_RELOAD_TO, 0 +Unit.PropagateReloadTo, config_parse_unit_deps, UNIT_PROPAGATES_RELOAD_TO, 0 +Unit.ReloadPropagatedFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 +Unit.PropagateReloadFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 Unit.RequiresMountsFor, config_parse_unit_requires_mounts_for, 0, offsetof(Unit, requires_mounts_for) Unit.StopWhenUnneeded, config_parse_bool, 0, offsetof(Unit, stop_when_unneeded) Unit.RefuseManualStart, config_parse_bool, 0, offsetof(Unit, refuse_manual_start) diff --git a/src/core/service.c b/src/core/service.c index 2be6ee5d99..0a6658809e 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2464,7 +2464,7 @@ static int service_start(Unit *u) { return 0; /* A service that will be restarted must be stopped first to - * trigger BindTo and/or OnFailure dependencies. If a user + * trigger BindsTo and/or OnFailure dependencies. If a user * does not want to wait for the holdoff time to elapse, the * service should be manually restarted, not started. */ if (s->state == SERVICE_AUTO_RESTART) { diff --git a/src/core/target.c b/src/core/target.c index 092b2065f2..55f9fc6fc4 100644 --- a/src/core/target.c +++ b/src/core/target.c @@ -59,7 +59,7 @@ static int target_add_default_dependencies(Target *t) { UNIT_REQUISITE, UNIT_REQUISITE_OVERRIDABLE, UNIT_WANTS, - UNIT_BIND_TO + UNIT_BINDS_TO }; Iterator i; diff --git a/src/core/transaction.c b/src/core/transaction.c index 44fdc06580..a1cf706934 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -893,7 +893,7 @@ int transaction_add_job_and_dependencies( } } - SET_FOREACH(dep, ret->unit->dependencies[UNIT_BIND_TO], i) { + SET_FOREACH(dep, ret->unit->dependencies[UNIT_BINDS_TO], i) { r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, override, false, false, ignore_order, e); if (r < 0) { if (r != -EBADR) @@ -998,7 +998,7 @@ int transaction_add_job_and_dependencies( if (type == JOB_RELOAD) { - SET_FOREACH(dep, ret->unit->dependencies[UNIT_PROPAGATE_RELOAD_TO], i) { + SET_FOREACH(dep, ret->unit->dependencies[UNIT_PROPAGATES_RELOAD_TO], i) { r = transaction_add_job_and_dependencies(tr, JOB_RELOAD, dep, ret, false, override, false, false, ignore_order, e); if (r < 0) { log_warning("Cannot add dependency reload job for unit %s, ignoring: %s", dep->id, bus_error(e, r)); diff --git a/src/core/unit.c b/src/core/unit.c index 516f4fad8b..6914ccdb99 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1144,7 +1144,7 @@ static void retroactively_start_dependencies(Unit *u) { !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other))) manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL); - SET_FOREACH(other, u->dependencies[UNIT_BIND_TO], i) + SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i) if (!set_get(u->dependencies[UNIT_AFTER], other) && !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other))) manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL); @@ -1209,7 +1209,7 @@ static void check_unneeded_dependencies(Unit *u) { SET_FOREACH(other, u->dependencies[UNIT_REQUISITE_OVERRIDABLE], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) unit_check_unneeded(other); - SET_FOREACH(other, u->dependencies[UNIT_BIND_TO], i) + SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) unit_check_unneeded(other); } @@ -1595,11 +1595,11 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen [UNIT_WANTS] = UNIT_WANTED_BY, [UNIT_REQUISITE] = UNIT_REQUIRED_BY, [UNIT_REQUISITE_OVERRIDABLE] = UNIT_REQUIRED_BY_OVERRIDABLE, - [UNIT_BIND_TO] = UNIT_BOUND_BY, + [UNIT_BINDS_TO] = UNIT_BOUND_BY, [UNIT_REQUIRED_BY] = _UNIT_DEPENDENCY_INVALID, [UNIT_REQUIRED_BY_OVERRIDABLE] = _UNIT_DEPENDENCY_INVALID, [UNIT_WANTED_BY] = _UNIT_DEPENDENCY_INVALID, - [UNIT_BOUND_BY] = UNIT_BIND_TO, + [UNIT_BOUND_BY] = UNIT_BINDS_TO, [UNIT_CONFLICTS] = UNIT_CONFLICTED_BY, [UNIT_CONFLICTED_BY] = UNIT_CONFLICTS, [UNIT_BEFORE] = UNIT_AFTER, @@ -1609,8 +1609,8 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen [UNIT_REFERENCED_BY] = UNIT_REFERENCES, [UNIT_TRIGGERS] = UNIT_TRIGGERED_BY, [UNIT_TRIGGERED_BY] = UNIT_TRIGGERS, - [UNIT_PROPAGATE_RELOAD_TO] = UNIT_PROPAGATE_RELOAD_FROM, - [UNIT_PROPAGATE_RELOAD_FROM] = UNIT_PROPAGATE_RELOAD_TO + [UNIT_PROPAGATES_RELOAD_TO] = UNIT_RELOAD_PROPAGATED_FROM, + [UNIT_RELOAD_PROPAGATED_FROM] = UNIT_PROPAGATES_RELOAD_TO }; int r, q = 0, v = 0, w = 0; @@ -2519,7 +2519,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) { if (r < 0) return r; - if ((r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BIND_TO, device, true)) < 0) + if ((r = unit_add_two_dependencies(u, UNIT_AFTER, UNIT_BINDS_TO, device, true)) < 0) return r; if (wants) @@ -2765,7 +2765,7 @@ static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = { [UNIT_REQUISITE_OVERRIDABLE] = "RequisiteOverridable", [UNIT_REQUIRED_BY] = "RequiredBy", [UNIT_REQUIRED_BY_OVERRIDABLE] = "RequiredByOverridable", - [UNIT_BIND_TO] = "BindTo", + [UNIT_BINDS_TO] = "BindsTo", [UNIT_WANTED_BY] = "WantedBy", [UNIT_CONFLICTS] = "Conflicts", [UNIT_CONFLICTED_BY] = "ConflictedBy", @@ -2777,8 +2777,8 @@ static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = { [UNIT_ON_FAILURE] = "OnFailure", [UNIT_TRIGGERS] = "Triggers", [UNIT_TRIGGERED_BY] = "TriggeredBy", - [UNIT_PROPAGATE_RELOAD_TO] = "PropagateReloadTo", - [UNIT_PROPAGATE_RELOAD_FROM] = "PropagateReloadFrom" + [UNIT_PROPAGATES_RELOAD_TO] = "PropagatesReloadTo", + [UNIT_RELOAD_PROPAGATED_FROM] = "ReloadPropagatedFrom" }; DEFINE_STRING_TABLE_LOOKUP(unit_dependency, UnitDependency); diff --git a/src/core/unit.h b/src/core/unit.h index 0e1e72ebf0..9d75e02532 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -76,13 +76,13 @@ enum UnitDependency { UNIT_REQUISITE, UNIT_REQUISITE_OVERRIDABLE, UNIT_WANTS, - UNIT_BIND_TO, + UNIT_BINDS_TO, /* Inverse of the above */ UNIT_REQUIRED_BY, /* inverse of 'requires' and 'requisite' is 'required_by' */ UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable' and 'requisite_overridable' is 'soft_required_by' */ UNIT_WANTED_BY, /* inverse of 'wants' */ - UNIT_BOUND_BY, /* inverse of 'bind_to' */ + UNIT_BOUND_BY, /* inverse of 'binds_to' */ /* Negative dependencies */ UNIT_CONFLICTS, /* inverse of 'conflicts' is 'conflicted_by' */ @@ -100,8 +100,8 @@ enum UnitDependency { UNIT_TRIGGERED_BY, /* Propagate reloads */ - UNIT_PROPAGATE_RELOAD_TO, - UNIT_PROPAGATE_RELOAD_FROM, + UNIT_PROPAGATES_RELOAD_TO, + UNIT_RELOAD_PROPAGATED_FROM, /* Reference information for GC logic */ UNIT_REFERENCES, /* Inverse of 'references' is 'referenced_by' */ diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 7801de64b5..d0984242c8 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -124,7 +124,7 @@ static int create_disk( "SourcePath=/etc/crypttab\n" "Conflicts=umount.target\n" "DefaultDependencies=no\n" - "BindTo=%s dev-mapper-%%i.device\n" + "BindsTo=%s dev-mapper-%%i.device\n" "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n" "Before=umount.target\n", d, d); diff --git a/units/hibernate.target b/units/hibernate.target index c56460237d..143eb59230 100644 --- a/units/hibernate.target +++ b/units/hibernate.target @@ -9,5 +9,5 @@ Description=Hibernate Documentation=man:systemd.special(7) DefaultDependencies=no -BindTo=systemd-hibernate.service +BindsTo=systemd-hibernate.service After=systemd-hibernate.service diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 index fa386ea0d4..d6a7669045 100644 --- a/units/serial-getty@.service.m4 +++ b/units/serial-getty@.service.m4 @@ -8,7 +8,7 @@ [Unit] Description=Serial Getty on %I Documentation=man:agetty(8) man:systemd-getty-generator(8) -BindTo=dev-%i.device +BindsTo=dev-%i.device After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service m4_ifdef(`TARGET_FEDORA', After=rc-local.service diff --git a/units/suspend.target b/units/suspend.target index 83f69f1b54..f50cb2264f 100644 --- a/units/suspend.target +++ b/units/suspend.target @@ -9,5 +9,5 @@ Description=Suspend Documentation=man:systemd.special(7) DefaultDependencies=no -BindTo=systemd-suspend.service +BindsTo=systemd-suspend.service After=systemd-suspend.service diff --git a/units/systemd-fsck@.service.in b/units/systemd-fsck@.service.in index 1cade4e602..b3c71eb250 100644 --- a/units/systemd-fsck@.service.in +++ b/units/systemd-fsck@.service.in @@ -9,7 +9,7 @@ Description=File System Check on %f Documentation=man:systemd-fsck@.service(8) DefaultDependencies=no -BindTo=%i.device +BindsTo=%i.device After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device Before=shutdown.target -- cgit v1.2.3-54-g00ecf From 669241a076108e0483d7d8475beaa506106d077e Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Tue, 24 Jul 2012 21:12:43 -0700 Subject: use "Out of memory." consistantly (or with "\n") glibc/glib both use "out of memory" consistantly so maybe we should consider that instead of this. Eliminates one string out of a number of binaries. Also fixes extra newline in udev/scsi_id --- src/cgtop/cgtop.c | 2 +- src/core/cgroup.c | 2 +- src/core/dbus.c | 16 ++++++------ src/core/manager.c | 6 ++--- src/cryptsetup/cryptsetup-generator.c | 6 ++--- src/cryptsetup/cryptsetup.c | 6 ++--- src/fsck/fsck.c | 2 +- src/fstab-generator/fstab-generator.c | 30 +++++++++++----------- src/getty-generator/getty-generator.c | 6 ++--- src/hostname/hostnamed.c | 2 +- src/journal/coredump.c | 2 +- src/journal/journalctl.c | 2 +- src/journal/journald.c | 10 ++++---- src/locale/localed.c | 6 ++--- src/login/logind-button.c | 2 +- src/login/logind-session.c | 8 +++--- src/login/logind-user.c | 4 +-- src/login/logind.c | 4 +-- src/login/multi-seat-x.c | 2 +- src/modules-load/modules-load.c | 4 +-- src/nspawn/nspawn.c | 22 ++++++++-------- src/rc-local-generator/rc-local-generator.c | 2 +- src/readahead/readahead-collect.c | 6 ++--- src/readahead/readahead-replay.c | 2 +- src/shared/ask-password-api.c | 2 +- src/shared/dbus-common.c | 2 +- src/shared/logs-show.c | 2 +- src/shared/util.c | 6 ++--- src/shutdownd/shutdownd.c | 2 +- src/sysctl/sysctl.c | 4 +-- src/systemctl/systemctl.c | 20 +++++++-------- src/timedate/timedated.c | 10 ++++---- src/tmpfiles/tmpfiles.c | 10 ++++---- .../tty-ask-password-agent.c | 4 +-- src/udev/collect/collect.c | 2 +- src/udev/scsi_id/scsi_id.c | 4 +-- 36 files changed, 111 insertions(+), 111 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index 5557094a4f..c3824c7979 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -608,7 +608,7 @@ int main(int argc, char *argv[]) { a = hashmap_new(string_hash_func, string_compare_func); b = hashmap_new(string_hash_func, string_compare_func); if (!a || !b) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/core/cgroup.c b/src/core/cgroup.c index aaea96b820..1322f63eee 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -330,7 +330,7 @@ int manager_setup_cgroup(Manager *m) { /* We need a new root cgroup */ m->cgroup_hierarchy = NULL; if (asprintf(&m->cgroup_hierarchy, "%s%s", streq(current, "/") ? "" : current, suffix) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/core/dbus.c b/src/core/dbus.c index 1bc83a2c2a..0c13517143 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -724,12 +724,12 @@ static int bus_setup_loop(Manager *m, DBusConnection *bus) { if (!dbus_connection_set_watch_functions(bus, bus_add_watch, bus_remove_watch, bus_toggle_watch, m, NULL) || !dbus_connection_set_timeout_functions(bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); return -ENOMEM; } if (set_put(m->bus_connections_for_dispatch, bus) < 0) { - log_error("Not enough memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -764,7 +764,7 @@ static void bus_new_connection( !dbus_connection_register_fallback(new_connection, "/org/freedesktop/systemd1/unit", &bus_unit_vtable, m) || !dbus_connection_register_fallback(new_connection, "/org/freedesktop/systemd1/job", &bus_job_vtable, m) || !dbus_connection_add_filter(new_connection, private_bus_message_filter, m, NULL)) { - log_error("Not enough memory."); + log_error("Out of memory."); return; } @@ -777,7 +777,7 @@ static int init_registered_system_bus(Manager *m) { char *id; if (!dbus_connection_add_filter(m->system_bus, system_bus_message_filter, m, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -815,7 +815,7 @@ static int init_registered_api_bus(Manager *m) { !dbus_connection_register_fallback(m->api_bus, "/org/freedesktop/systemd1/unit", &bus_unit_vtable, m) || !dbus_connection_register_fallback(m->api_bus, "/org/freedesktop/systemd1/job", &bus_job_vtable, m) || !dbus_connection_add_filter(m->api_bus, api_bus_message_filter, m, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -1090,7 +1090,7 @@ static int bus_init_private(Manager *m) { return 0; if (asprintf(&p, "unix:path=%s/systemd/private", e) < 0) { - log_error("Not enough memory"); + log_error("Out of memory."); r = -ENOMEM; goto fail; } @@ -1110,7 +1110,7 @@ static int bus_init_private(Manager *m) { if (!dbus_server_set_auth_mechanisms(m->private_bus, (const char**) external_only) || !dbus_server_set_watch_functions(m->private_bus, bus_add_watch, bus_remove_watch, bus_toggle_watch, m, NULL) || !dbus_server_set_timeout_functions(m->private_bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); r = -ENOMEM; goto fail; } @@ -1158,7 +1158,7 @@ int bus_init(Manager *m, bool try_bus_connect) { return 0; oom: - log_error("Not enough memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/core/manager.c b/src/core/manager.c index 48305e373a..42a9490242 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1625,7 +1625,7 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) { } if (asprintf(&message, "U\002%c%s%n", (int) (strlen(u->id) + 1), u->id, &n) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } @@ -2074,7 +2074,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name) p = strappend("/run/systemd/", name); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -2087,7 +2087,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name) } else { p = strjoin("/tmp/systemd-", name, ".XXXXXX", NULL); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index d0984242c8..fb6b4d25c0 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -303,7 +303,7 @@ static int parse_proc_cmdline(void) { t = strv_append(arg_proc_cmdline_disks, word + 10); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -317,7 +317,7 @@ static int parse_proc_cmdline(void) { t = strv_append(arg_proc_cmdline_disks, word + 13); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -380,7 +380,7 @@ int main(int argc, char *argv[]) { device = strappend("UUID=", *i); if (!name || !device) { - log_error("Out of memory"); + log_error("Out of memory."); r = EXIT_FAILURE; free(name); free(device); diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index f570724b9d..9d4e77364d 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -343,7 +343,7 @@ int main(int argc, char *argv[]) { l = strcspn(opt_cipher, "-"); if (!(truncated_cipher = strndup(opt_cipher, l))) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } @@ -365,7 +365,7 @@ int main(int argc, char *argv[]) { char **p; if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } @@ -383,7 +383,7 @@ int main(int argc, char *argv[]) { assert(strv_length(passwords) == 1); if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c index 833f3f74a6..036d3c5b41 100644 --- a/src/fsck/fsck.c +++ b/src/fsck/fsck.c @@ -297,7 +297,7 @@ int main(int argc, char *argv[]) { } if (!(udev = udev_new())) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 3a59b85d66..89a4d13504 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -98,14 +98,14 @@ static int add_swap(const char *what, struct mntent *me) { name = unit_name_from_path(what, ".swap"); if (!name) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } unit = strjoin(arg_dest, "/", name, NULL); if (!unit) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -148,7 +148,7 @@ static int add_swap(const char *what, struct mntent *me) { if (!noauto) { lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL); if (!lnk) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -162,7 +162,7 @@ static int add_swap(const char *what, struct mntent *me) { r = device_name(what, &device); if (r < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -171,7 +171,7 @@ static int add_swap(const char *what, struct mntent *me) { free(lnk); lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL); if (!lnk) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -256,14 +256,14 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { name = unit_name_from_path(where, ".mount"); if (!name) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } unit = strjoin(arg_dest, "/", name, NULL); if (!unit) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -323,7 +323,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { if (!noauto) { lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); if (!lnk) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -340,7 +340,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { r = device_name(what, &device); if (r < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -349,7 +349,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { free(lnk); lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL); if (!lnk) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -367,14 +367,14 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { if (automount && !path_equal(where, "/")) { automount_name = unit_name_from_path(where, ".automount"); if (!name) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } automount_unit = strjoin(arg_dest, "/", automount_name, NULL); if (!automount_unit) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -410,7 +410,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { free(lnk); lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL); if (!lnk) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -459,14 +459,14 @@ static int parse_fstab(void) { what = fstab_node_to_udev_node(me->mnt_fsname); if (!what) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } where = strdup(me->mnt_dir); if (!where) { - log_error("Out of memory"); + log_error("Out of memory."); free(what); r = -ENOMEM; goto finish; diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index b2e3eb6393..9e46a47a9a 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -42,7 +42,7 @@ static int add_symlink(const char *fservice, const char *tservice) { to = strjoin(arg_dest,"/getty.target.wants/", tservice, NULL); if (!from || !to) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -78,7 +78,7 @@ static int add_serial_getty(const char *tty) { n = unit_name_replace_instance("serial-getty@.service", tty); if (!n) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -160,7 +160,7 @@ int main(int argc, char *argv[]) { int k; if (asprintf(&p, "/sys/class/tty/%s", j) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = EXIT_FAILURE; goto finish; } diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 67c56f3313..7dab5f40df 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -532,7 +532,7 @@ static int connect_bus(DBusConnection **_bus) { if (!dbus_connection_register_object_path(bus, "/org/freedesktop/hostname1", &hostname_vtable, NULL) || !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); r = -ENOMEM; goto fail; } diff --git a/src/journal/coredump.c b/src/journal/coredump.c index fcd0d1e625..cfd3a910d9 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -239,7 +239,7 @@ int main(int argc, char* argv[]) { p = malloc(9 + COREDUMP_MAX); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index e633dd34d7..a9cf9cd957 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -256,7 +256,7 @@ static int add_matches(sd_journal *j, char **args) { t = strappend("_EXE=", path); if (!t) { free(p); - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/journal/journald.c b/src/journal/journald.c index 36f9abe47e..ae1fbc4bd4 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -1270,7 +1270,7 @@ static void process_native_message( u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U); c = realloc(iovec, u * sizeof(struct iovec)); if (!c) { - log_error("Out of memory"); + log_error("Out of memory."); break; } @@ -1357,7 +1357,7 @@ static void process_native_message( k = malloc((e - p) + 1 + l); if (!k) { - log_error("Out of memory"); + log_error("Out of memory."); break; } @@ -1450,7 +1450,7 @@ static void process_native_file( p = malloc(st.st_size); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return; } @@ -1543,7 +1543,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) { else { s->identifier = strdup(p); if (!s->identifier) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } @@ -1558,7 +1558,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) { else { s->unit_id = strdup(p); if (!s->unit_id) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } diff --git a/src/locale/localed.c b/src/locale/localed.c index 56fb339e19..b8007d72fd 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -425,7 +425,7 @@ static void push_data(DBusConnection *bus) { l_set = new0(char*, _PROP_MAX); l_unset = new0(char*, _PROP_MAX); if (!l_set || !l_unset) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } @@ -438,7 +438,7 @@ static void push_data(DBusConnection *bus) { char *s; if (asprintf(&s, "%s=%s", names[p], data[p]) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); goto finish; } @@ -1344,7 +1344,7 @@ static int connect_bus(DBusConnection **_bus) { if (!dbus_connection_register_object_path(bus, "/org/freedesktop/locale1", &locale_vtable, NULL) || !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); r = -ENOMEM; goto fail; } diff --git a/src/login/logind-button.c b/src/login/logind-button.c index 8b59c2b0c3..62e0c3dbba 100644 --- a/src/login/logind-button.c +++ b/src/login/logind-button.c @@ -108,7 +108,7 @@ int button_open(Button *b) { p = strappend("/dev/input/", b->name); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 819596ddbe..a43ecad2b1 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -375,7 +375,7 @@ static int session_link_x11_socket(Session *s) { k = strspn(s->display+1, "0123456789"); f = new(char, sizeof("/tmp/.X11-unix/X") + k); if (!f) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -395,7 +395,7 @@ static int session_link_x11_socket(Session *s) { t = strappend(s->user->runtime_path, "/X11-display"); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); free(f); return -ENOMEM; } @@ -469,7 +469,7 @@ static int session_create_cgroup(Session *s) { if (!s->cgroup_path) { if (asprintf(&p, "%s/%s", s->user->cgroup_path, s->id) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } else @@ -670,7 +670,7 @@ static int session_unlink_x11_socket(Session *s) { t = strappend(s->user->runtime_path, "/X11-display"); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 0a3f22ce99..fca68159a7 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -260,7 +260,7 @@ static int user_mkdir_runtime_path(User *u) { if (!u->runtime_path) { if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } else @@ -287,7 +287,7 @@ static int user_create_cgroup(User *u) { if (!u->cgroup_path) { if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } else diff --git a/src/login/logind.c b/src/login/logind.c index 0775583147..1cfb7fa9ac 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -1176,7 +1176,7 @@ static int manager_connect_bus(Manager *m) { !dbus_connection_register_fallback(m->bus, "/org/freedesktop/login1/session", &bus_session_vtable, m) || !dbus_connection_register_fallback(m->bus, "/org/freedesktop/login1/user", &bus_user_vtable, m) || !dbus_connection_add_filter(m->bus, bus_message_filter, m, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); r = -ENOMEM; goto fail; } @@ -1611,7 +1611,7 @@ int main(int argc, char *argv[]) { m = manager_new(); if (!m) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c index 92014f5316..a1fab86f6a 100644 --- a/src/login/multi-seat-x.c +++ b/src/login/multi-seat-x.c @@ -121,7 +121,7 @@ int main(int argc, char *argv[]) { path = strappend("/run/systemd/multi-session-x/", seat); if (!path) { - log_error("Out of memory"); + log_error("Out of memory."); goto fail; } diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c index d6bc16d340..e73ba7f241 100644 --- a/src/modules-load/modules-load.c +++ b/src/modules-load/modules-load.c @@ -50,14 +50,14 @@ static int add_modules(const char *p) { k = strv_split(p, ","); if (!k) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } t = strv_merge(arg_proc_cmdline_modules, k); strv_free(k); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 1d7511e2ab..355a103edf 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -289,7 +289,7 @@ static int mount_all(const char *dest) { int t; if (asprintf(&where, "%s/%s", dest, mount_table[k].where) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); if (r == 0) r = -ENOMEM; @@ -336,7 +336,7 @@ static int setup_timezone(const char *dest) { /* Fix the timezone, if possible */ if (asprintf(&where, "%s/etc/localtime", dest) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -346,7 +346,7 @@ static int setup_timezone(const char *dest) { free(where); if (asprintf(&where, "%s/etc/timezone", dest) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -368,7 +368,7 @@ static int setup_resolv_conf(const char *dest) { /* Fix resolv.conf, if possible */ if (asprintf(&where, "%s/etc/resolv.conf", dest) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -480,7 +480,7 @@ static int setup_dev_console(const char *dest, const char *console) { } if (asprintf(&to, "%s/dev/console", dest) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -535,13 +535,13 @@ static int setup_kmsg(const char *dest, int kmsg_socket) { * avoid any problems with containers deadlocking due to this * we simply make /dev/kmsg unavailable to the container. */ if (asprintf(&from, "%s/dev/kmsg", dest) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } if (asprintf(&to, "%s/proc/kmsg", dest) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -639,7 +639,7 @@ static int setup_journal(const char *directory) { p = strappend(directory, "/etc/machine-id"); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -670,7 +670,7 @@ static int setup_journal(const char *directory) { p = strappend("/var/log/journal/", l); q = strjoin(directory, "/var/log/journal/", l, NULL); if (!p || !q) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -1296,13 +1296,13 @@ int main(int argc, char *argv[]) { if ((asprintf((char**)(envp + 3), "HOME=%s", home ? home: "/root") < 0) || (asprintf((char**)(envp + 4), "USER=%s", arg_user ? arg_user : "root") < 0) || (asprintf((char**)(envp + 5), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) { - log_error("Out of memory"); + log_error("Out of memory."); goto child_fail; } if (arg_uuid) { if (asprintf((char**)(envp + 6), "container_uuid=%s", arg_uuid) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); goto child_fail; } } diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index f41a6bf265..9fafa29f22 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -48,7 +48,7 @@ static int add_symlink(const char *service, const char *where) { asprintf(&to, "%s/%s.wants/%s", arg_dest, where, service); if (!from || !to) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c index 8dacf6af5c..45d489a60e 100644 --- a/src/readahead/readahead-collect.c +++ b/src/readahead/readahead-collect.c @@ -242,7 +242,7 @@ static int collect(const char *root) { assert(root); if (asprintf(&pack_fn, "%s/.readahead", root) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -477,7 +477,7 @@ done: log_debug("On btrfs: %s", yes_no(on_btrfs)); if (asprintf(&pack_fn_new, "%s/.readahead.new", root) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -510,7 +510,7 @@ done: n = hashmap_size(files); if (!(ordered = new(struct item, n))) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c index 7bd079aae5..f90821e831 100644 --- a/src/readahead/readahead-replay.c +++ b/src/readahead/readahead-replay.c @@ -150,7 +150,7 @@ static int replay(const char *root) { block_bump_request_nr(root); if (asprintf(&pack_fn, "%s/.readahead", root) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 4333bfb564..005f40fef7 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -282,7 +282,7 @@ static int create_socket(char **name) { if (!(c = strdup(sa.un.sun_path))) { r = -ENOMEM; - log_error("Out of memory"); + log_error("Out of memory."); goto fail; } diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c index 7d57680cfc..ab1dc4d7e4 100644 --- a/src/shared/dbus-common.c +++ b/src/shared/dbus-common.c @@ -1161,7 +1161,7 @@ void bus_async_unregister_and_exit(DBusConnection *bus, const char *name) { return; oom: - log_error("Out of memory"); + log_error("Out of memory."); if (pending) { dbus_pending_call_cancel(pending); diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index a68cd3de57..f90f5a1f0d 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -53,7 +53,7 @@ static int parse_field(const void *data, size_t length, const char *field, char memcpy(buf, (const char*) data + fl, nl); ((char*)buf)[nl] = 0; if (!buf) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/shared/util.c b/src/shared/util.c index 43ec62eac6..2e7ae63db2 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -909,7 +909,7 @@ int load_env_file( continue; if (!(u = normalize_env_assignment(p))) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -918,7 +918,7 @@ int load_env_file( free(u); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4278,7 +4278,7 @@ void execute_directory(const char *directory, DIR *d, char *argv[]) { continue; if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); continue; } diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c index 6eb8ed9bf8..9dd1336133 100644 --- a/src/shutdownd/shutdownd.c +++ b/src/shutdownd/shutdownd.c @@ -213,7 +213,7 @@ static int update_schedule_file(struct sd_shutdown_command *c) { t = cescape(c->wall_message); if (!t) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 72a74f9e44..b463c7fac7 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -46,7 +46,7 @@ static int apply_sysctl(const char *property, const char *value) { p = new(char, sizeof(PROC_SYS_PREFIX) + strlen(property)); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -192,7 +192,7 @@ static int parse_argv(int argc, char *argv[]) { l = strv_append(arg_prefixes, optarg); if (!l) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index a13fc1a8f0..d493733761 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -658,7 +658,7 @@ static int list_unit_files(DBusConnection *bus, char **args) { h = hashmap_new(string_hash_func, string_compare_func); if (!h) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -673,7 +673,7 @@ static int list_unit_files(DBusConnection *bus, char **args) { units = new(UnitFileList, n_units); if (!units) { unit_file_list_free(h); - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -2637,7 +2637,7 @@ static void show_unit_help(UnitStatusInfo *i) { section = strndup(e + 1, *p + k - e - 2); if (!section) { free(page); - log_error("Out of memory"); + log_error("Out of memory."); return; } @@ -3283,7 +3283,7 @@ static int show(DBusConnection *bus, char **args) { p = unit_dbus_path_from_name(n ? n : *name); free(n); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -3299,7 +3299,7 @@ static int show(DBusConnection *bus, char **args) { char *p; if (asprintf(&p, "/org/freedesktop/systemd1/job/%u", id) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -3974,7 +3974,7 @@ static int enable_sysv_units(char **args) { asprintf(&p, "%s/%s", *k, name); if (!p) { - log_error("No memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -3995,7 +3995,7 @@ static int enable_sysv_units(char **args) { else asprintf(&p, SYSTEM_SYSVINIT_PATH "/%s", name); if (!p) { - log_error("No memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4024,7 +4024,7 @@ static int enable_sysv_units(char **args) { l = strv_join((char**)argv, " "); if (!l) { - log_error("No memory."); + log_error("Out of memory."); free(q); free(p); r = -ENOMEM; @@ -4184,7 +4184,7 @@ static int enable_unit(DBusConnection *bus, char **args) { "org.freedesktop.systemd1.Manager", method); if (!m) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4339,7 +4339,7 @@ static int unit_is_enabled(DBusConnection *bus, char **args) { "org.freedesktop.systemd1.Manager", "GetUnitFileState"); if (!m) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 237eb24894..3fef9e8844 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -153,7 +153,7 @@ static void verify_timezone(void) { p = strappend("/usr/share/zoneinfo/", tz.zone); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return; } @@ -220,7 +220,7 @@ static int write_data_timezone(void) { p = strappend("/usr/share/zoneinfo/", tz.zone); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -341,7 +341,7 @@ static char** get_ntp_services(void) { q = strv_append(r, l); if (!q) { - log_error("Out of memory"); + log_error("Out of memory."); break; } @@ -379,7 +379,7 @@ static int read_ntp(DBusConnection *bus) { "org.freedesktop.systemd1.Manager", "GetUnitFileState"); if (!m) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -943,7 +943,7 @@ static int connect_bus(DBusConnection **_bus) { if (!dbus_connection_register_object_path(bus, "/org/freedesktop/timedate1", &timedate_vtable, NULL) || !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) { - log_error("Not enough memory"); + log_error("Out of memory."); r = -ENOMEM; goto fail; } diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 45125b7b94..f8d89218c9 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -260,7 +260,7 @@ static int dir_cleanup( sub_path = NULL; if (asprintf(&sub_path, "%s/%s", p, dent->d_name) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -970,7 +970,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { i = new0(Item, 1); if (!i) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -999,7 +999,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { if (buffer[n] != 0 && (buffer[n] != '-' || buffer[n+1] != 0)) { i->argument = unquote(buffer+n, "\""); if (!i->argument) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } @@ -1302,7 +1302,7 @@ static char *resolve_fragment(const char *fragment, const char **search_paths) { STRV_FOREACH(p, search_paths) { resolved_path = strjoin(*p, "/", fragment, NULL); if (resolved_path == NULL) { - log_error("Out of memory"); + log_error("Out of memory."); return NULL; } @@ -1337,7 +1337,7 @@ int main(int argc, char *argv[]) { globs = hashmap_new(string_hash_func, string_compare_func); if (!items || !globs) { - log_error("Out of memory"); + log_error("Out of memory."); r = EXIT_FAILURE; goto finish; } diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 2ab3401e6f..403e8cd3c6 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -315,7 +315,7 @@ static int parse_password(const char *filename, char **wall) { *wall ? "\r\n\r\n" : "", message, pid) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -533,7 +533,7 @@ static int show_passwords(void) { continue; if (!(p = strappend("/run/systemd/ask-password/", de->d_name))) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c index 80f464aff0..4162c436b0 100644 --- a/src/udev/collect/collect.c +++ b/src/udev/collect/collect.c @@ -141,7 +141,7 @@ static int checkout(int fd) len = bufsize >> 1; buf = calloc(1,bufsize + 1); if (!buf) { - fprintf(stderr, "Out of memory\n"); + fprintf(stderr, "Out of memory.\n"); return -1; } memset(buf, ' ', bufsize); diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c index 6fc41e94fb..0bb1bc495a 100644 --- a/src/udev/scsi_id/scsi_id.c +++ b/src/udev/scsi_id/scsi_id.c @@ -198,7 +198,7 @@ static int get_file_options(struct udev *udev, buffer = malloc(MAX_BUFFER_LEN); if (!buffer) { fclose(fd); - log_error("can't allocate memory\n"); + log_error("Out of memory."); return -1; } @@ -294,7 +294,7 @@ static int get_file_options(struct udev *udev, c = argc_count(buffer) + 2; *newargv = calloc(c, sizeof(**newargv)); if (!*newargv) { - log_error("can't allocate memory\n"); + log_error("Out of memory."); retval = -1; } else { *argc = c; -- cgit v1.2.3-54-g00ecf From 0d0f0c50d3a1d90f03972a6abb82e6413daaa583 Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Wed, 25 Jul 2012 14:55:59 -0700 Subject: log.h: new log_oom() -> int -ENOMEM, use it also a number of minor fixups and bug fixes: spelling, oom errors that didn't print errors, not properly forwarding error codes, few more consistency issues, et cetera --- src/cgtop/cgtop.c | 3 +- src/core/cgroup.c | 3 +- src/core/dbus.c | 41 ++++++---------- src/core/manager.c | 14 ++---- src/cryptsetup/cryptsetup-generator.c | 8 ++- src/cryptsetup/cryptsetup.c | 8 +-- src/fsck/fsck.c | 2 +- src/fstab-generator/fstab-generator.c | 57 ++++++++-------------- src/getty-generator/getty-generator.c | 11 ++--- src/hostname/hostnamed.c | 3 +- src/journal/cat.c | 6 +-- src/journal/coredump.c | 3 +- src/journal/journalctl.c | 3 +- src/journal/journald.c | 31 +++++------- src/locale/localed.c | 17 +++---- src/login/logind-button.c | 6 +-- src/login/logind-session.c | 21 +++----- src/login/logind-user.c | 12 ++--- src/login/logind.c | 18 +++---- src/login/multi-seat-x.c | 4 +- src/modules-load/modules-load.c | 12 ++--- src/nspawn/nspawn.c | 42 ++++++---------- src/rc-local-generator/rc-local-generator.c | 3 +- src/readahead/readahead-collect.c | 9 ++-- src/readahead/readahead-replay.c | 3 +- src/remount-fs/remount-fs.c | 2 +- src/shared/ask-password-api.c | 3 +- src/shared/dbus-common.c | 2 +- src/shared/log.h | 6 +++ src/shared/logs-show.c | 6 +-- src/shared/util.c | 8 ++- src/shutdownd/shutdownd.c | 6 +-- src/sysctl/sysctl.c | 12 ++--- .../system-update-generator.c | 6 +-- src/systemctl/systemctl.c | 40 ++++++--------- src/timedate/timedated.c | 19 +++----- src/tmpfiles/tmpfiles.c | 19 +++----- .../tty-ask-password-agent.c | 6 +-- src/udev/scsi_id/scsi_id.c | 12 ++--- src/vconsole/vconsole-setup.c | 6 +-- 40 files changed, 183 insertions(+), 310 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index c3824c7979..f0ca83fd45 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -608,8 +608,7 @@ int main(int argc, char *argv[]) { a = hashmap_new(string_hash_func, string_compare_func); b = hashmap_new(string_hash_func, string_compare_func); if (!a || !b) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 1322f63eee..8ddb1118ed 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -330,8 +330,7 @@ int manager_setup_cgroup(Manager *m) { /* We need a new root cgroup */ m->cgroup_hierarchy = NULL; if (asprintf(&m->cgroup_hierarchy, "%s%s", streq(current, "/") ? "" : current, suffix) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } } diff --git a/src/core/dbus.c b/src/core/dbus.c index 0c13517143..9db172b6e6 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -723,15 +723,11 @@ static int bus_setup_loop(Manager *m, DBusConnection *bus) { dbus_connection_set_exit_on_disconnect(bus, FALSE); if (!dbus_connection_set_watch_functions(bus, bus_add_watch, bus_remove_watch, bus_toggle_watch, m, NULL) || - !dbus_connection_set_timeout_functions(bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) { - log_error("Out of memory."); - return -ENOMEM; - } + !dbus_connection_set_timeout_functions(bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) + return log_oom(); - if (set_put(m->bus_connections_for_dispatch, bus) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (set_put(m->bus_connections_for_dispatch, bus) < 0) + return log_oom(); dbus_connection_set_dispatch_status_function(bus, bus_dispatch_status, m, NULL); return 0; @@ -764,7 +760,7 @@ static void bus_new_connection( !dbus_connection_register_fallback(new_connection, "/org/freedesktop/systemd1/unit", &bus_unit_vtable, m) || !dbus_connection_register_fallback(new_connection, "/org/freedesktop/systemd1/job", &bus_job_vtable, m) || !dbus_connection_add_filter(new_connection, private_bus_message_filter, m, NULL)) { - log_error("Out of memory."); + log_oom(); return; } @@ -776,10 +772,8 @@ static void bus_new_connection( static int init_registered_system_bus(Manager *m) { char *id; - if (!dbus_connection_add_filter(m->system_bus, system_bus_message_filter, m, NULL)) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!dbus_connection_add_filter(m->system_bus, system_bus_message_filter, m, NULL)) + return log_oom(); if (m->running_as != MANAGER_SYSTEM) { DBusError error; @@ -814,10 +808,8 @@ static int init_registered_api_bus(Manager *m) { if (!dbus_connection_register_object_path(m->api_bus, "/org/freedesktop/systemd1", &bus_manager_vtable, m) || !dbus_connection_register_fallback(m->api_bus, "/org/freedesktop/systemd1/unit", &bus_unit_vtable, m) || !dbus_connection_register_fallback(m->api_bus, "/org/freedesktop/systemd1/job", &bus_job_vtable, m) || - !dbus_connection_add_filter(m->api_bus, api_bus_message_filter, m, NULL)) { - log_error("Out of memory."); - return -ENOMEM; - } + !dbus_connection_add_filter(m->api_bus, api_bus_message_filter, m, NULL)) + return log_oom(); /* Get NameOwnerChange messages */ dbus_bus_add_match(m->api_bus, @@ -1090,8 +1082,7 @@ static int bus_init_private(Manager *m) { return 0; if (asprintf(&p, "unix:path=%s/systemd/private", e) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto fail; } @@ -1110,8 +1101,7 @@ static int bus_init_private(Manager *m) { if (!dbus_server_set_auth_mechanisms(m->private_bus, (const char**) external_only) || !dbus_server_set_watch_functions(m->private_bus, bus_add_watch, bus_remove_watch, bus_toggle_watch, m, NULL) || !dbus_server_set_timeout_functions(m->private_bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto fail; } @@ -1158,8 +1148,7 @@ int bus_init(Manager *m, bool try_bus_connect) { return 0; oom: - log_error("Out of memory."); - return -ENOMEM; + return log_oom(); } static void shutdown_connection(Manager *m, DBusConnection *c) { @@ -1458,7 +1447,7 @@ void bus_broadcast_finished( message = dbus_message_new_signal("/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartupFinished"); if (!message) { - log_error("Out of memory."); + log_oom(); return; } @@ -1469,13 +1458,13 @@ void bus_broadcast_finished( DBUS_TYPE_UINT64, &userspace_usec, DBUS_TYPE_UINT64, &total_usec, DBUS_TYPE_INVALID)) { - log_error("Out of memory."); + log_oom(); goto finish; } if (bus_broadcast(m, message) < 0) { - log_error("Out of memory."); + log_oom(); goto finish; } diff --git a/src/core/manager.c b/src/core/manager.c index 42a9490242..bcaf913b5a 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1625,7 +1625,7 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) { } if (asprintf(&message, "U\002%c%s%n", (int) (strlen(u->id) + 1), u->id, &n) < 0) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -2073,10 +2073,8 @@ static int create_generator_dir(Manager *m, char **generator, const char *name) if (m->running_as == MANAGER_SYSTEM && getpid() == 1) { p = strappend("/run/systemd/", name); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); r = mkdir_p_label(p, 0755); if (r < 0) { @@ -2086,10 +2084,8 @@ static int create_generator_dir(Manager *m, char **generator, const char *name) } } else { p = strjoin("/tmp/systemd-", name, ".XXXXXX", NULL); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); if (!mkdtemp(p)) { free(p); diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index fb6b4d25c0..c6bc65aecf 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -303,8 +303,7 @@ static int parse_proc_cmdline(void) { t = strv_append(arg_proc_cmdline_disks, word + 10); if (!t) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } strv_free(arg_proc_cmdline_disks); @@ -317,8 +316,7 @@ static int parse_proc_cmdline(void) { t = strv_append(arg_proc_cmdline_disks, word + 13); if (!t) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } strv_free(arg_proc_cmdline_disks); @@ -380,7 +378,7 @@ int main(int argc, char *argv[]) { device = strappend("UUID=", *i); if (!name || !device) { - log_error("Out of memory."); + log_oom(); r = EXIT_FAILURE; free(name); free(device); diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 9d4e77364d..cc30e50003 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -343,7 +343,7 @@ int main(int argc, char *argv[]) { l = strcspn(opt_cipher, "-"); if (!(truncated_cipher = strndup(opt_cipher, l))) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -365,7 +365,7 @@ int main(int argc, char *argv[]) { char **p; if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -383,7 +383,7 @@ int main(int argc, char *argv[]) { assert(strv_length(passwords) == 1); if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -416,7 +416,7 @@ int main(int argc, char *argv[]) { /* Pad password if necessary */ if (!(c = new(char, opt_key_size))) { - log_error("Out of memory."); + log_oom(); goto finish; } diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c index 036d3c5b41..058f34d64f 100644 --- a/src/fsck/fsck.c +++ b/src/fsck/fsck.c @@ -297,7 +297,7 @@ int main(int argc, char *argv[]) { } if (!(udev = udev_new())) { - log_error("Out of memory."); + log_oom(); goto finish; } diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 89a4d13504..251a346c4d 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -47,7 +47,7 @@ static int device_name(const char *path, char **unit) { p = unit_name_from_path(path, ".device"); if (!p) - return -ENOMEM; + return log_oom(); *unit = p; return 1; @@ -98,15 +98,13 @@ static int add_swap(const char *what, struct mntent *me) { name = unit_name_from_path(what, ".swap"); if (!name) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } unit = strjoin(arg_dest, "/", name, NULL); if (!unit) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -148,8 +146,7 @@ static int add_swap(const char *what, struct mntent *me) { if (!noauto) { lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL); if (!lnk) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -161,18 +158,14 @@ static int add_swap(const char *what, struct mntent *me) { } r = device_name(what, &device); - if (r < 0) { - log_error("Out of memory."); - r = -ENOMEM; + if (r < 0) goto finish; - } if (r > 0) { free(lnk); lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL); if (!lnk) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -255,16 +248,14 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { } name = unit_name_from_path(where, ".mount"); - if (!name) { - log_error("Out of memory."); - r = -ENOMEM; + if (!name) { + r = log_oom(); goto finish; } unit = strjoin(arg_dest, "/", name, NULL); if (!unit) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -323,8 +314,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { if (!noauto) { lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); if (!lnk) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -339,24 +329,20 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { !path_equal(where, "/")) { r = device_name(what, &device); - if (r < 0) { - log_error("Out of memory."); - r = -ENOMEM; + if (r < 0) goto finish; - } if (r > 0) { free(lnk); lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL); if (!lnk) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } mkdir_parents_label(lnk, 0755); if (symlink(unit, lnk) < 0) { - log_error("Failed to creat symlink: %m"); + log_error("Failed to create symlink: %m"); r = -errno; goto finish; } @@ -367,15 +353,13 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { if (automount && !path_equal(where, "/")) { automount_name = unit_name_from_path(where, ".automount"); if (!name) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } automount_unit = strjoin(arg_dest, "/", automount_name, NULL); if (!automount_unit) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -410,8 +394,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { free(lnk); lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL); if (!lnk) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -459,16 +442,14 @@ static int parse_fstab(void) { what = fstab_node_to_udev_node(me->mnt_fsname); if (!what) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } where = strdup(me->mnt_dir); if (!where) { - log_error("Out of memory."); + r = log_oom(); free(what); - r = -ENOMEM; goto finish; } @@ -513,7 +494,7 @@ static int parse_proc_cmdline(void) { word = strndup(w, l); if (!word) { - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 9e46a47a9a..1cef6aeae9 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -42,8 +42,7 @@ static int add_symlink(const char *fservice, const char *tservice) { to = strjoin(arg_dest,"/getty.target.wants/", tservice, NULL); if (!from || !to) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -77,10 +76,8 @@ static int add_serial_getty(const char *tty) { log_debug("Automatically adding serial getty for /dev/%s.", tty); n = unit_name_replace_instance("serial-getty@.service", tty); - if (!n) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!n) + return log_oom(); r = add_symlink("serial-getty@.service", n); free(n); @@ -160,7 +157,7 @@ int main(int argc, char *argv[]) { int k; if (asprintf(&p, "/sys/class/tty/%s", j) < 0) { - log_error("Out of memory."); + log_oom(); r = EXIT_FAILURE; goto finish; } diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 7dab5f40df..8f9d5a04f5 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -532,8 +532,7 @@ static int connect_bus(DBusConnection **_bus) { if (!dbus_connection_register_object_path(bus, "/org/freedesktop/hostname1", &hostname_vtable, NULL) || !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto fail; } diff --git a/src/journal/cat.c b/src/journal/cat.c index cdd46bcf5b..523a7a2eda 100644 --- a/src/journal/cat.c +++ b/src/journal/cat.c @@ -91,10 +91,8 @@ static int parse_argv(int argc, char *argv[]) { arg_identifier = NULL; else { arg_identifier = strdup(optarg); - if (!arg_identifier) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!arg_identifier) + return log_oom(); } break; diff --git a/src/journal/coredump.c b/src/journal/coredump.c index cfd3a910d9..a507fc65f8 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -239,8 +239,7 @@ int main(int argc, char* argv[]) { p = malloc(9 + COREDUMP_MAX); if (!p) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index a9cf9cd957..c924afbccc 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -256,8 +256,7 @@ static int add_matches(sd_journal *j, char **args) { t = strappend("_EXE=", path); if (!t) { free(p); - log_error("Out of memory."); - return -ENOMEM; + return log_oom(); } r = sd_journal_add_match(j, t, 0); diff --git a/src/journal/journald.c b/src/journal/journald.c index ae1fbc4bd4..5602e362df 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -393,7 +393,7 @@ static void server_vacuum(Server *s) { if (s->system_journal) { if (asprintf(&p, "/var/log/journal/%s", ids) < 0) { - log_error("Out of memory."); + log_oom(); return; } @@ -405,7 +405,7 @@ static void server_vacuum(Server *s) { if (s->runtime_journal) { if (asprintf(&p, "/run/log/journal/%s", ids) < 0) { - log_error("Out of memory."); + log_oom(); return; } @@ -1270,7 +1270,7 @@ static void process_native_message( u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U); c = realloc(iovec, u * sizeof(struct iovec)); if (!c) { - log_error("Out of memory."); + log_oom(); break; } @@ -1357,7 +1357,7 @@ static void process_native_message( k = malloc((e - p) + 1 + l); if (!k) { - log_error("Out of memory."); + log_oom(); break; } @@ -1450,7 +1450,7 @@ static void process_native_file( p = malloc(st.st_size); if (!p) { - log_error("Out of memory."); + log_oom(); return; } @@ -1542,10 +1542,8 @@ static int stdout_stream_line(StdoutStream *s, char *p) { s->identifier = NULL; else { s->identifier = strdup(p); - if (!s->identifier) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!s->identifier) + return log_oom(); } s->state = STDOUT_STREAM_UNIT_ID; @@ -1557,10 +1555,8 @@ static int stdout_stream_line(StdoutStream *s, char *p) { s->unit_id = NULL; else { s->unit_id = strdup(p); - if (!s->unit_id) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!s->unit_id) + return log_oom(); } } @@ -1761,9 +1757,8 @@ static int stdout_stream_new(Server *s) { stream = new0(StdoutStream, 1); if (!stream) { - log_error("Out of memory."); close_nointr_nofail(fd); - return -ENOMEM; + return log_oom(); } stream->fd = fd; @@ -2753,10 +2748,8 @@ static int server_init(Server *s) { server_parse_proc_cmdline(s); s->user_journals = hashmap_new(trivial_hash_func, trivial_compare_func); - if (!s->user_journals) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!s->user_journals) + return log_oom(); s->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (s->epoll_fd < 0) { diff --git a/src/locale/localed.c b/src/locale/localed.c index b8007d72fd..22950a60a9 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -425,7 +425,7 @@ static void push_data(DBusConnection *bus) { l_set = new0(char*, _PROP_MAX); l_unset = new0(char*, _PROP_MAX); if (!l_set || !l_unset) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -438,7 +438,7 @@ static void push_data(DBusConnection *bus) { char *s; if (asprintf(&s, "%s=%s", names[p], data[p]) < 0) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -456,30 +456,30 @@ static void push_data(DBusConnection *bus) { dbus_message_iter_init_append(m, &iter); if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "s", &sub)) { - log_error("Out of memory."); + log_oom(); goto finish; } STRV_FOREACH(t, l_unset) if (!dbus_message_iter_append_basic(&sub, DBUS_TYPE_STRING, t)) { - log_error("Out of memory."); + log_oom(); goto finish; } if (!dbus_message_iter_close_container(&iter, &sub) || !dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "s", &sub)) { - log_error("Out of memory."); + log_oom(); goto finish; } STRV_FOREACH(t, l_set) if (!dbus_message_iter_append_basic(&sub, DBUS_TYPE_STRING, t)) { - log_error("Out of memory."); + log_oom(); goto finish; } if (!dbus_message_iter_close_container(&iter, &sub)) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -1344,8 +1344,7 @@ static int connect_bus(DBusConnection **_bus) { if (!dbus_connection_register_object_path(bus, "/org/freedesktop/locale1", &locale_vtable, NULL) || !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto fail; } diff --git a/src/login/logind-button.c b/src/login/logind-button.c index 62e0c3dbba..d023294a59 100644 --- a/src/login/logind-button.c +++ b/src/login/logind-button.c @@ -107,10 +107,8 @@ int button_open(Button *b) { } p = strappend("/dev/input/", b->name); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); b->fd = open(p, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK); free(p); diff --git a/src/login/logind-session.c b/src/login/logind-session.c index a43ecad2b1..16d4955d5d 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -374,10 +374,8 @@ static int session_link_x11_socket(Session *s) { k = strspn(s->display+1, "0123456789"); f = new(char, sizeof("/tmp/.X11-unix/X") + k); - if (!f) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!f) + return log_oom(); c = stpcpy(f, "/tmp/.X11-unix/X"); memcpy(c, s->display+1, k); @@ -395,9 +393,8 @@ static int session_link_x11_socket(Session *s) { t = strappend(s->user->runtime_path, "/X11-display"); if (!t) { - log_error("Out of memory."); free(f); - return -ENOMEM; + return log_oom(); } if (link(f, t) < 0) { @@ -468,10 +465,8 @@ static int session_create_cgroup(Session *s) { assert(s->user->cgroup_path); if (!s->cgroup_path) { - if (asprintf(&p, "%s/%s", s->user->cgroup_path, s->id) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (asprintf(&p, "%s/%s", s->user->cgroup_path, s->id) < 0) + return log_oom(); } else p = s->cgroup_path; @@ -669,10 +664,8 @@ static int session_unlink_x11_socket(Session *s) { s->user->display = NULL; t = strappend(s->user->runtime_path, "/X11-display"); - if (!t) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!t) + return log_oom(); r = unlink(t); free(t); diff --git a/src/login/logind-user.c b/src/login/logind-user.c index fca68159a7..aa9c3f1a31 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -259,10 +259,8 @@ static int user_mkdir_runtime_path(User *u) { } if (!u->runtime_path) { - if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0) + return log_oom(); } else p = u->runtime_path; @@ -286,10 +284,8 @@ static int user_create_cgroup(User *u) { assert(u); if (!u->cgroup_path) { - if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0) + return log_oom(); } else p = u->cgroup_path; diff --git a/src/login/logind.c b/src/login/logind.c index 1cfb7fa9ac..bae9a95f38 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -1020,10 +1020,8 @@ int manager_get_session_by_cgroup(Manager *m, const char *cgroup, Session **sess } p = strdup(cgroup); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); for (;;) { char *e; @@ -1061,10 +1059,8 @@ int manager_get_user_by_cgroup(Manager *m, const char *cgroup, User **user) { } p = strdup(cgroup); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); for (;;) { char *e; @@ -1176,8 +1172,7 @@ static int manager_connect_bus(Manager *m) { !dbus_connection_register_fallback(m->bus, "/org/freedesktop/login1/session", &bus_session_vtable, m) || !dbus_connection_register_fallback(m->bus, "/org/freedesktop/login1/user", &bus_user_vtable, m) || !dbus_connection_add_filter(m->bus, bus_message_filter, m, NULL)) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto fail; } @@ -1611,8 +1606,7 @@ int main(int argc, char *argv[]) { m = manager_new(); if (!m) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c index a1fab86f6a..59f70882d4 100644 --- a/src/login/multi-seat-x.c +++ b/src/login/multi-seat-x.c @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) { device_node = strdup(dn); if (!device_node) { udev_device_unref(d); - log_error("Out of memory."); + log_oom(); goto fail; } } @@ -121,7 +121,7 @@ int main(int argc, char *argv[]) { path = strappend("/run/systemd/multi-session-x/", seat); if (!path) { - log_error("Out of memory."); + log_oom(); goto fail; } diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c index e73ba7f241..6aeaf459af 100644 --- a/src/modules-load/modules-load.c +++ b/src/modules-load/modules-load.c @@ -49,17 +49,13 @@ static int add_modules(const char *p) { char **t, **k; k = strv_split(p, ","); - if (!k) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!k) + return log_oom(); t = strv_merge(arg_proc_cmdline_modules, k); strv_free(k); - if (!t) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!t) + return log_oom(); strv_free(arg_proc_cmdline_modules); arg_proc_cmdline_modules = t; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 355a103edf..b9fa02dc76 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -205,10 +205,8 @@ static int parse_argv(int argc, char *argv[]) { char *t; t = strndup(word, length); - if (!t) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!t) + return log_oom(); if (cap_from_name(t, &cap) < 0) { log_error("Failed to parse capability %s.", t); @@ -289,7 +287,7 @@ static int mount_all(const char *dest) { int t; if (asprintf(&where, "%s/%s", dest, mount_table[k].where) < 0) { - log_error("Out of memory."); + log_oom(); if (r == 0) r = -ENOMEM; @@ -335,20 +333,16 @@ static int setup_timezone(const char *dest) { assert(dest); /* Fix the timezone, if possible */ - if (asprintf(&where, "%s/etc/localtime", dest) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (asprintf(&where, "%s/etc/localtime", dest) < 0) + return log_oom(); if (mount("/etc/localtime", where, "bind", MS_BIND, NULL) >= 0) mount("/etc/localtime", where, "bind", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL); free(where); - if (asprintf(&where, "%s/etc/timezone", dest) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (asprintf(&where, "%s/etc/timezone", dest) < 0) + return log_oom(); if (mount("/etc/timezone", where, "bind", MS_BIND, NULL) >= 0) mount("/etc/timezone", where, "bind", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL); @@ -368,8 +362,7 @@ static int setup_resolv_conf(const char *dest) { /* Fix resolv.conf, if possible */ if (asprintf(&where, "%s/etc/resolv.conf", dest) < 0) { - log_error("Out of memory."); - return -ENOMEM; + return log_oom(); } if (mount("/etc/resolv.conf", where, "bind", MS_BIND, NULL) >= 0) @@ -480,8 +473,7 @@ static int setup_dev_console(const char *dest, const char *console) { } if (asprintf(&to, "%s/dev/console", dest) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -535,14 +527,12 @@ static int setup_kmsg(const char *dest, int kmsg_socket) { * avoid any problems with containers deadlocking due to this * we simply make /dev/kmsg unavailable to the container. */ if (asprintf(&from, "%s/dev/kmsg", dest) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } if (asprintf(&to, "%s/proc/kmsg", dest) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -639,8 +629,7 @@ static int setup_journal(const char *directory) { p = strappend(directory, "/etc/machine-id"); if (!p) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -670,8 +659,7 @@ static int setup_journal(const char *directory) { p = strappend("/var/log/journal/", l); q = strjoin(directory, "/var/log/journal/", l, NULL); if (!p || !q) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -1296,13 +1284,13 @@ int main(int argc, char *argv[]) { if ((asprintf((char**)(envp + 3), "HOME=%s", home ? home: "/root") < 0) || (asprintf((char**)(envp + 4), "USER=%s", arg_user ? arg_user : "root") < 0) || (asprintf((char**)(envp + 5), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) { - log_error("Out of memory."); + log_oom(); goto child_fail; } if (arg_uuid) { if (asprintf((char**)(envp + 6), "container_uuid=%s", arg_uuid) < 0) { - log_error("Out of memory."); + log_oom(); goto child_fail; } } diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index 9fafa29f22..c219e77047 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -48,8 +48,7 @@ static int add_symlink(const char *service, const char *where) { asprintf(&to, "%s/%s.wants/%s", arg_dest, where, service); if (!from || !to) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c index 45d489a60e..4fcf64c24d 100644 --- a/src/readahead/readahead-collect.c +++ b/src/readahead/readahead-collect.c @@ -242,8 +242,7 @@ static int collect(const char *root) { assert(root); if (asprintf(&pack_fn, "%s/.readahead", root) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -477,8 +476,7 @@ done: log_debug("On btrfs: %s", yes_no(on_btrfs)); if (asprintf(&pack_fn_new, "%s/.readahead.new", root) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -510,8 +508,7 @@ done: n = hashmap_size(files); if (!(ordered = new(struct item, n))) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c index f90821e831..a1ac6b0c91 100644 --- a/src/readahead/readahead-replay.c +++ b/src/readahead/readahead-replay.c @@ -150,8 +150,7 @@ static int replay(const char *root) { block_bump_request_nr(root); if (asprintf(&pack_fn, "%s/.readahead", root) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c index 8b3aaeb32c..636c46f0f3 100644 --- a/src/remount-fs/remount-fs.c +++ b/src/remount-fs/remount-fs.c @@ -114,7 +114,7 @@ int main(int argc, char *argv[]) { s = strdup(me->mnt_dir); if (!s) { - log_error("Out of memory."); + log_oom(); ret = EXIT_FAILURE; continue; } diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 005f40fef7..8a0fb89a84 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -281,8 +281,7 @@ static int create_socket(char **name) { } if (!(c = strdup(sa.un.sun_path))) { - r = -ENOMEM; - log_error("Out of memory."); + r = log_oom(); goto fail; } diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c index ab1dc4d7e4..5d64568c34 100644 --- a/src/shared/dbus-common.c +++ b/src/shared/dbus-common.c @@ -1161,7 +1161,7 @@ void bus_async_unregister_and_exit(DBusConnection *bus, const char *name) { return; oom: - log_error("Out of memory."); + log_oom(); if (pending) { dbus_pending_call_cancel(pending); diff --git a/src/shared/log.h b/src/shared/log.h index c986b2579d..7bdb3e0865 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "macro.h" @@ -102,6 +103,11 @@ int log_dump_internal( #define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__) #define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__, __VA_ARGS__) +static inline int log_oom(void) { + log_error("Out of memory."); + return -ENOMEM; +} + /* This modifies the buffer passed! */ #define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__, __func__, buffer) diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index f90f5a1f0d..edb5a9cafb 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -52,10 +52,8 @@ static int parse_field(const void *data, size_t length, const char *field, char buf = malloc(nl+1); memcpy(buf, (const char*) data + fl, nl); ((char*)buf)[nl] = 0; - if (!buf) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!buf) + return log_oom(); free(*target); *target = buf; diff --git a/src/shared/util.c b/src/shared/util.c index 2e7ae63db2..5f360085a2 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -909,8 +909,7 @@ int load_env_file( continue; if (!(u = normalize_env_assignment(p))) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -918,8 +917,7 @@ int load_env_file( free(u); if (!t) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -4278,7 +4276,7 @@ void execute_directory(const char *directory, DIR *d, char *argv[]) { continue; if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) { - log_error("Out of memory."); + log_oom(); continue; } diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c index 9dd1336133..d426d9833d 100644 --- a/src/shutdownd/shutdownd.c +++ b/src/shutdownd/shutdownd.c @@ -212,10 +212,8 @@ static int update_schedule_file(struct sd_shutdown_command *c) { } t = cescape(c->wall_message); - if (!t) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!t) + return log_oom(); r = fopen_temporary("/run/systemd/shutdown/scheduled", &f, &temp_path); if (r < 0) { diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index b463c7fac7..3bfc454c04 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -45,10 +45,8 @@ static int apply_sysctl(const char *property, const char *value) { log_debug("Setting '%s' to '%s'", property, value); p = new(char, sizeof(PROC_SYS_PREFIX) + strlen(property)); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); n = stpcpy(p, PROC_SYS_PREFIX); strcpy(n, property); @@ -191,10 +189,8 @@ static int parse_argv(int argc, char *argv[]) { *p = '/'; l = strv_append(arg_prefixes, optarg); - if (!l) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!l) + return log_oom(); strv_free(arg_prefixes); arg_prefixes = l; diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c index abda5a0190..6660192f5e 100644 --- a/src/system-update-generator/system-update-generator.c +++ b/src/system-update-generator/system-update-generator.c @@ -47,10 +47,8 @@ static int generate_symlink(void) { } p = strappend(arg_dest, "/default.target"); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); if (symlink(SYSTEM_DATA_UNIT_PATH "/system-update.target", p) < 0) { free(p); diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d493733761..ef8ab2dc14 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -657,10 +657,8 @@ static int list_unit_files(DBusConnection *bus, char **args) { Iterator i; h = hashmap_new(string_hash_func, string_compare_func); - if (!h) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!h) + return log_oom(); r = unit_file_get_list(arg_scope, arg_root, h); if (r < 0) { @@ -673,8 +671,7 @@ static int list_unit_files(DBusConnection *bus, char **args) { units = new(UnitFileList, n_units); if (!units) { unit_file_list_free(h); - log_error("Out of memory."); - return -ENOMEM; + return log_oom(); } HASHMAP_FOREACH(u, h, i) { @@ -2630,14 +2627,14 @@ static void show_unit_help(UnitStatusInfo *i) { if (e) { page = strndup((*p) + 4, e - *p - 4); if (!page) { - log_error("Out of memory."); + log_oom(); return; } section = strndup(e + 1, *p + k - e - 2); if (!section) { free(page); - log_error("Out of memory."); + log_oom(); return; } @@ -3282,10 +3279,8 @@ static int show(DBusConnection *bus, char **args) { n = unit_name_mangle(*name); p = unit_dbus_path_from_name(n ? n : *name); free(n); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); r = show_one(args[0], bus, p, show_properties, &new_line); free(p); @@ -3298,10 +3293,8 @@ static int show(DBusConnection *bus, char **args) { /* Interpret as job id */ char *p; - if (asprintf(&p, "/org/freedesktop/systemd1/job/%u", id) < 0) { - log_error("Out of memory."); - return -ENOMEM; - } + if (asprintf(&p, "/org/freedesktop/systemd1/job/%u", id) < 0) + return log_oom(); r = show_one(args[0], bus, p, show_properties, &new_line); free(p); @@ -3974,8 +3967,7 @@ static int enable_sysv_units(char **args) { asprintf(&p, "%s/%s", *k, name); if (!p) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -3995,8 +3987,7 @@ static int enable_sysv_units(char **args) { else asprintf(&p, SYSTEM_SYSVINIT_PATH "/%s", name); if (!p) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -4024,10 +4015,9 @@ static int enable_sysv_units(char **args) { l = strv_join((char**)argv, " "); if (!l) { - log_error("Out of memory."); free(q); free(p); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -4184,8 +4174,7 @@ static int enable_unit(DBusConnection *bus, char **args) { "org.freedesktop.systemd1.Manager", method); if (!m) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -4339,8 +4328,7 @@ static int unit_is_enabled(DBusConnection *bus, char **args) { "org.freedesktop.systemd1.Manager", "GetUnitFileState"); if (!m) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 3fef9e8844..09fd808332 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -153,7 +153,7 @@ static void verify_timezone(void) { p = strappend("/usr/share/zoneinfo/", tz.zone); if (!p) { - log_error("Out of memory."); + log_oom(); return; } @@ -219,10 +219,8 @@ static int write_data_timezone(void) { } p = strappend("/usr/share/zoneinfo/", tz.zone); - if (!p) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!p) + return log_oom(); r = symlink_or_copy_atomic(p, "/etc/localtime"); free(p); @@ -341,7 +339,7 @@ static char** get_ntp_services(void) { q = strv_append(r, l); if (!q) { - log_error("Out of memory."); + log_oom(); break; } @@ -379,16 +377,14 @@ static int read_ntp(DBusConnection *bus) { "org.freedesktop.systemd1.Manager", "GetUnitFileState"); if (!m) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } if (!dbus_message_append_args(m, DBUS_TYPE_STRING, i, DBUS_TYPE_INVALID)) { - log_error("Could not append arguments to message."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -943,8 +939,7 @@ static int connect_bus(DBusConnection **_bus) { if (!dbus_connection_register_object_path(bus, "/org/freedesktop/timedate1", &timedate_vtable, NULL) || !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto fail; } diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index f8d89218c9..e70332ca06 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -260,8 +260,7 @@ static int dir_cleanup( sub_path = NULL; if (asprintf(&sub_path, "%s/%s", p, dent->d_name) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -969,10 +968,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { assert(buffer); i = new0(Item, 1); - if (!i) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!i) + return log_oom(); if (sscanf(buffer, "%c " @@ -998,10 +995,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { n += strspn(buffer+n, WHITESPACE); if (buffer[n] != 0 && (buffer[n] != '-' || buffer[n+1] != 0)) { i->argument = unquote(buffer+n, "\""); - if (!i->argument) { - log_error("Out of memory."); - return -ENOMEM; - } + if (!i->argument) + return log_oom(); } } @@ -1302,7 +1297,7 @@ static char *resolve_fragment(const char *fragment, const char **search_paths) { STRV_FOREACH(p, search_paths) { resolved_path = strjoin(*p, "/", fragment, NULL); if (resolved_path == NULL) { - log_error("Out of memory."); + log_oom(); return NULL; } @@ -1337,7 +1332,7 @@ int main(int argc, char *argv[]) { globs = hashmap_new(string_hash_func, string_compare_func); if (!items || !globs) { - log_error("Out of memory."); + log_oom(); r = EXIT_FAILURE; goto finish; } diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 403e8cd3c6..052c10e7d5 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -315,8 +315,7 @@ static int parse_password(const char *filename, char **wall) { *wall ? "\r\n\r\n" : "", message, pid) < 0) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -533,8 +532,7 @@ static int show_passwords(void) { continue; if (!(p = strappend("/run/systemd/ask-password/", de->d_name))) { - log_error("Out of memory."); - r = -ENOMEM; + r = log_oom(); goto finish; } diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c index 0bb1bc495a..b1e089cb7c 100644 --- a/src/udev/scsi_id/scsi_id.c +++ b/src/udev/scsi_id/scsi_id.c @@ -198,8 +198,7 @@ static int get_file_options(struct udev *udev, buffer = malloc(MAX_BUFFER_LEN); if (!buffer) { fclose(fd); - log_error("Out of memory."); - return -1; + return log_oom(); } *newargv = NULL; @@ -231,7 +230,7 @@ static int get_file_options(struct udev *udev, if (str1 && strcasecmp(str1, "VENDOR") == 0) { str1 = get_value(&buf); if (!str1) { - retval = -1; + retval = log_oom(); break; } vendor_in = str1; @@ -240,7 +239,7 @@ static int get_file_options(struct udev *udev, if (str1 && strcasecmp(str1, "MODEL") == 0) { str1 = get_value(&buf); if (!str1) { - retval = -1; + retval = log_oom(); break; } model_in = str1; @@ -251,7 +250,7 @@ static int get_file_options(struct udev *udev, if (str1 && strcasecmp(str1, "OPTIONS") == 0) { str1 = get_value(&buf); if (!str1) { - retval = -1; + retval = log_oom(); break; } options_in = str1; @@ -294,8 +293,7 @@ static int get_file_options(struct udev *udev, c = argc_count(buffer) + 2; *newargv = calloc(c, sizeof(**newargv)); if (!*newargv) { - log_error("Out of memory."); - retval = -1; + retval = log_oom(); } else { *argc = c; c = 0; diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 7679d446e3..62d9c8d7b5 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -274,7 +274,7 @@ int main(int argc, char **argv) { t = strdup("/etc/sysconfig/console/default.kmap"); if (!t) { - log_error("Out of memory."); + log_oom(); goto finish; } @@ -415,7 +415,7 @@ int main(int argc, char **argv) { free(vc_keytable); if (!vc_keymap) { - log_error("Out of memory."); + log_oom(); goto finish; } } @@ -425,7 +425,7 @@ int main(int argc, char **argv) { t = strdup("/etc/sysconfig/console/default.kmap"); if (!t) { - log_error("Out of memory."); + log_oom(); goto finish; } -- cgit v1.2.3-54-g00ecf From 4271d8235f1186ddad54f432eaca10f8e3bd255f Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 3 Aug 2012 12:47:24 +0200 Subject: cryptsetup: add keyfile-size= support This is useful e.g. if the keyfile is a raw device, where only parts of it should be read. It is typically used whenever the keyfile-offset= option is specified. Tested-by: Erik Westrup --- man/crypttab.xml | 12 ++++++++++++ src/cryptsetup/cryptsetup.c | 22 +++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) (limited to 'src/cryptsetup') diff --git a/man/crypttab.xml b/man/crypttab.xml index 2fa8e8940f..8711272a87 100644 --- a/man/crypttab.xml +++ b/man/crypttab.xml @@ -130,6 +130,18 @@ + + keyfile-size= + + Specifies the maximum number + of bytes to read from the keyfile; see + cryptsetup8 + for possible values and the default + value of this option. This option is ignored + in plain encryption mode, as the keyfile-size is then given by the key size. + + + keyfile-offset= diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index cc30e50003..916509ab93 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -37,6 +37,7 @@ static const char *opt_type = NULL; /* LUKS1 or PLAIN */ static char *opt_cipher = NULL; static unsigned opt_key_size = 0; +static unsigned opt_keyfile_size = 0; static unsigned opt_keyfile_offset = 0; static char *opt_hash = NULL; static unsigned opt_tries = 0; @@ -80,6 +81,13 @@ static int parse_one_option(const char *option) { return 0; } + } else if (startswith(option, "keyfile-size=")) { + + if (safe_atou(option+13, &opt_keyfile_size) < 0) { + log_error("keyfile-size= parse failure, ignoring."); + return 0; + } + } else if (startswith(option, "keyfile-offset=")) { if (safe_atou(option+15, &opt_keyfile_offset) < 0) { @@ -238,7 +246,6 @@ int main(int argc, char *argv[]) { char **passwords = NULL, *truncated_cipher = NULL; const char *cipher = NULL, *cipher_mode = NULL, *hash = NULL, *name = NULL; char *description = NULL, *name_buffer = NULL, *mount_point = NULL; - unsigned keyfile_size = 0; if (argc <= 1) { help(); @@ -437,6 +444,11 @@ int main(int argc, char *argv[]) { zero(params); params.hash = hash; + /* for CRYPT_PLAIN limit reads + * from keyfile to key length, and + * ignore keyfile-size */ + opt_keyfile_size = opt_key_size / 8; + /* In contrast to what the name * crypt_setup() might suggest this * doesn't actually format anything, @@ -448,14 +460,10 @@ int main(int argc, char *argv[]) { cipher_mode, NULL, NULL, - opt_key_size / 8, + opt_keyfile_size, ¶ms); pass_volume_key = streq(hash, "plain"); - - /* for CRYPT_PLAIN limit reads - * from keyfile to key length */ - keyfile_size = opt_key_size / 8; } if (k < 0) { @@ -470,7 +478,7 @@ int main(int argc, char *argv[]) { argv[3]); if (key_file) - k = crypt_activate_by_keyfile_offset(cd, argv[2], CRYPT_ANY_SLOT, key_file, keyfile_size, + k = crypt_activate_by_keyfile_offset(cd, argv[2], CRYPT_ANY_SLOT, key_file, opt_keyfile_size, opt_keyfile_offset, flags); else { char **p; -- cgit v1.2.3-54-g00ecf From 64825d3c589cd8742887f30acde8c57eceac2001 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 8 Aug 2012 23:54:21 +0200 Subject: fix a couple of issues found with llvm-analyze --- src/core/namespace.c | 2 ++ src/cryptsetup/cryptsetup-generator.c | 4 ++-- src/journal/journal-file.c | 8 +++++--- src/libudev/libudev-list.c | 1 + src/readahead/readahead-analyze.c | 4 ++-- src/shared/logs-show.c | 1 + src/shared/utf8.c | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/core/namespace.c b/src/core/namespace.c index 4bef15fdf5..ce10c79074 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -312,6 +312,8 @@ int setup_namespace( goto undo_mounts; } + free(paths); + t = old_root_dir + sizeof(root_dir) - 1; if (umount2(t, MNT_DETACH) < 0) /* At this point it's too late to turn anything back, diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index c6bc65aecf..386714b4fd 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -374,8 +374,8 @@ int main(int argc, char *argv[]) { if (startswith(p, "luks-")) p += 5; - name = strappend("luks-", *i); - device = strappend("UUID=", *i); + name = strappend("luks-", p); + device = strappend("UUID=", p); if (!name || !device) { log_oom(); diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index b840124c9f..718dc5d6ea 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -788,7 +788,7 @@ static int journal_file_append_data( } #endif - if (!compressed) + if (!compressed && size > 0) memcpy(o->data.payload, data, size); r = journal_file_link_data(f, o, p, hash); @@ -1057,7 +1057,8 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st ts->monotonic < le64toh(f->header->tail_entry_monotonic)) return -EINVAL; - items = alloca(sizeof(EntryItem) * n_iovec); + /* alloca() can't take 0, hence let's allocate at least one */ + items = alloca(sizeof(EntryItem) * MAX(1, n_iovec)); for (i = 0; i < n_iovec; i++) { uint64_t p; @@ -2336,7 +2337,8 @@ int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t m n_list ++; } - qsort(list, n_list, sizeof(struct vacuum_info), vacuum_compare); + if (n_list > 0) + qsort(list, n_list, sizeof(struct vacuum_info), vacuum_compare); for(i = 0; i < n_list; i++) { struct statvfs ss; diff --git a/src/libudev/libudev-list.c b/src/libudev/libudev-list.c index aec334bcfc..5d09b5d2d9 100644 --- a/src/libudev/libudev-list.c +++ b/src/libudev/libudev-list.c @@ -186,6 +186,7 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char * if (list->entries == NULL) { free(entry->name); free(entry->value); + free(entry); return NULL; } list->entries_max += add; diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c index 53892b0cf8..11b2b2dc11 100644 --- a/src/readahead/readahead-analyze.c +++ b/src/readahead/readahead-analyze.c @@ -135,11 +135,11 @@ int main_analyze(const char *pack_path) { printf("\nHOST: %s" "TYPE: %c\n" "MISSING: %d\n" - "TOTAL: %ld\n", + "TOTAL: %llu\n", line, a, missing, - tsize); + (unsigned long long) tsize); return EXIT_SUCCESS; diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index b6e6a85819..60eb896ade 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -273,6 +273,7 @@ finish: free(message); free(monotonic); free(realtime); + free(priority); return r; } diff --git a/src/shared/utf8.c b/src/shared/utf8.c index a6f5b3f9e5..ea7483f50f 100644 --- a/src/shared/utf8.c +++ b/src/shared/utf8.c @@ -275,7 +275,7 @@ char *ascii_filter(const char *str) { if (!r) return NULL; - for (s = r, d = r; *s; s++) + for (s = str, d = r; *s; s++) if ((unsigned char) *s < 128) *(d++) = *s; -- cgit v1.2.3-54-g00ecf From 65343c749441322d1e65e8bb5d433b6fee8c28bf Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 6 Nov 2012 09:49:27 -0500 Subject: cryptsetup: hash=plain means don't use a hash "plain" is a semantic value that cryptsetup(8) uses to describe a plain dm-crypt volume that does not use a hash. Catch this value earlier and ensure that a NULL params.hash is passed to crypt_format to avoid passing an invalid hash type to the libcryptsetup backend. FDO bug #56593. --- src/cryptsetup/cryptsetup.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 916509ab93..e8ba3f02a3 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -342,7 +342,12 @@ int main(int argc, char *argv[]) { opt_tries = opt_tries > 0 ? opt_tries : 3; opt_key_size = (opt_key_size > 0 ? opt_key_size : 256); - hash = opt_hash ? opt_hash : "ripemd160"; + if (opt_hash) { + /* plain isn't a real hash type. it just means "use no hash" */ + if (!streq(opt_hash, "plain")) + hash = opt_hash; + } else + hash = "ripemd160"; if (opt_cipher) { size_t l; @@ -463,7 +468,7 @@ int main(int argc, char *argv[]) { opt_keyfile_size, ¶ms); - pass_volume_key = streq(hash, "plain"); + pass_volume_key = !!hash; } if (k < 0) { -- cgit v1.2.3-54-g00ecf From 8db9d8c2a4ef9806c286e258f9932a0972dc2375 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 6 Nov 2012 10:17:18 -0500 Subject: cryptsetup: fix inverted comparison in pass_volume_key --- src/cryptsetup/cryptsetup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index e8ba3f02a3..56a3b50974 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -468,7 +468,8 @@ int main(int argc, char *argv[]) { opt_keyfile_size, ¶ms); - pass_volume_key = !!hash; + /* hash == NULL implies the user passed "plain" */ + pass_volume_key = (hash == NULL); } if (k < 0) { -- cgit v1.2.3-54-g00ecf