summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
AgeCommit message (Collapse)Author
2013-04-25conf-parser: restrict .include usageLennart Poettering
Disallow recursive .include, and make it unavailable in anything but unit files.
2013-04-24Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek
Freeing in error path is the common pattern with set_put().
2013-04-23unit: rework trigger dependency logicLennart Poettering
Instead of having explicit type-specific callbacks that inform the triggering unit when a triggered unit changes state, make this generic so that state changes are forwarded betwee any triggered and triggering unit. Also, get rid of UnitRef references from automount, timer, path units, to the units they trigger and rely exclsuively on UNIT_TRIGGER type dendencies.
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-18Move bus_error to dbus-common and remove bus_error_message_or_strerrorSimon Peeters
bus_error and bus_error_message_or_strerror dit almost exactly the same, so use only one of them and place it in dbus-common.
2013-04-17core/main: use _cleanup_Zbigniew Jędrzejewski-Szmek
2013-04-17Report about syntax errors with metadataZbigniew Jędrzejewski-Szmek
The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-04-03util: rename parse_usec() to parse_sec() sinds the default unit is secondsLennart Poettering
Internally we store all time values in usec_t, however parse_usec() actually was used mostly to parse values in seconds (unless explicit units were specified to define a different unit). Hence, be clear about this and name the function about what we pass into it, not what we get out of it.
2013-03-31execute: convert secure bits into mask properlyZbigniew Jędrzejewski-Szmek
C.f. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5975c725dfd6f7d36f493ab1453fbdbd35c1f0e3
2013-03-22exec: Assigning the empty string to CapabilityBoundSet= should drop all capsLennart Poettering
Previously, it would set all caps, but it should drop them all, anything else makes little sense. Also, document that this works as it does, and what to do in order to assign all caps to the bounding set. https://bugzilla.redhat.com/show_bug.cgi?id=914705
2013-03-01specifier: when resolving specifier strings when loading configuration, ↵Lennart Poettering
don't misunderstand parse failures as OOM http://lists.freedesktop.org/archives/systemd-devel/2013-February/009179.html
2013-02-27unit: rework resource management APILennart Poettering
This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.
2013-02-13use strneq instead of strncmpThomas Hindoe Paaboel Andersen
2013-02-11core: properly validate environment data from Environment= lines in unit filesLennart Poettering
2013-01-19execute: Fix seccomp support on x32Jonathan Callen
In the x32 ABI, syscall numbers start at 0x40000000. Mask that bit on x32 for lookups in the syscall_names array and syscall_filter and ensure that syscall.h is parsed correctly. [zj: added SYSCALL_TO_INDEX, INDEX_TO_SYSCALL macros.]
2013-01-17units: for all unit settings that take lists, allow the empty string for ↵Lennart Poettering
resetting the lists https://bugzilla.redhat.com/show_bug.cgi?id=756787
2013-01-15load-fragment: fix bad memory accessLennart Poettering
2013-01-15load-fragment: replace specifiers in path unit's Unit= settingLennart Poettering
2013-01-14core: add bus API and systemctl commands for altering cgroup parameters ↵Lennart Poettering
during runtime
2012-11-23timer: implement calendar time eventsLennart Poettering
2012-11-19core/load-fragment: fix (potential) bad memory accessZbigniew Jędrzejewski-Szmek
strncmp() could be used with size bigger then the size of the string, because MAX was used instead of MIN. If failing, print just the offending mount flag.
2012-11-19core/load-fragment: be more precise in error messagesZbigniew Jędrzejewski-Szmek
Whenever a message fails, mention the offending word, instead of just giving the whole line. If one bad word causes just this word to be rejected, print only the word. If one bad word causes the whole line to be rejected, print the whole line too. https://bugs.freedesktop.org/show_bug.cgi?id=56874
2012-11-15sched: Only setting CPUSchedulingPriority=rr doesn't workHolger Hans Peter Freyther
A service that only sets the scheduling policy to round-robin fails to be started. This is because the cpu_sched_priority is initialized to 0 and is not adjusted when the policy is changed. Clamp the cpu_sched_priority when the scheduler policy is set. Use the current policy to validate the new priority. Change the manual page to state that the given range only applies to the real-time scheduling policies. Add a testcase that verifies this change: $ make test-sched-prio; ./test-sched-prio [test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1 [test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0 [test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100
2012-11-15core: lift restriction on order of - and @ in ExecStartZbigniew Jędrzejewski-Szmek
2012-11-15core: interpret \; token in ExecStart as escaped ;Oleksii Shevchuk
Some commands (like 'find') take a semicolon as separate arg. With current parser implementation there is no way to pass one. Patch adds token \;
2012-10-30shared, core: do not always accept numbers in string lookupsMichal Schmidt
The behaviour of the common name##_from_string conversion is surprising. It accepts not only the strings from name##_table but also any number that falls within the range of the table. The order of items in most of our tables is an internal affair. It should not be visible to the user. I know of a case where the surprising numeric conversion leads to a crash. We will allow the direct numeric conversion only for the tables where the mapping of strings to numeric values has an external meaning. This holds for the following lookup tables: - netlink_family, ioprio_class, ip_tos, sched_policy - their numeric values are stable as they are defined by the Linux kernel interface. - log_level, log_facility_unshifted - the well-known syslog interface. We allow the user to use numeric values whose string names systemd does not know. For instance, the user may want to test a new kernel featuring a scheduling policy that did not exist when his systemd version was released. A slightly unpleasant effect of this is that the name##_to_string conversion cannot return pointers to constant strings anymore. The strings have to be allocated on demand and freed by the caller.
2012-10-03man: document behaviour of ListenStream= with only a port number in regards ↵Lennart Poettering
to IPv4/IPv6
2012-09-19path: support specifier resolvin in .path unitsLennart Poettering
2012-09-18unit: split unit_printf() and friends into its own .c fileLennart Poettering
2012-09-13macro: introduce _cleanup_free_ macro for automatic freeing of scoped vars ↵Lennart Poettering
and make use of it
2012-09-13load-fragment: Expand specifiers in conditions.Auke Kok
Add specifier expansion to Path and String conditions. Specifier expansion for conditions will help create instance and user session units by allowing us to template conditions based on the instance or user session parameters. An example would be a system-wide user session service file that conditionally runs based on whether a user has the service configured through a configuration file in ~/.config/.
2012-08-23load-fragment: initialize bool invert before useLukas Nykryn
2012-08-22unit: add new ConditionHost= condition typeLennart Poettering
2012-08-08systemd: introduced new timeout typesMichal Sekletar
Makes possible to specify separate timeout for start and stop of the service. [ Improved the manpage. Coding style fix. -- michich ]
2012-07-23sd-daemon: remove unnecessary memset callsJim Meyering
There is no point in clearing the bits of a "struct stat" when the very next statement just calls stat or fstat to fill in that same memory. [zj: two more places]
2012-07-17execute: support syscall filtering using seccomp filtersLennart Poettering
2012-07-16Spelling fixes.Ville Skyttä
2012-07-03load-fragment: a few modernizationsLennart Poettering
2012-06-22unit: drop the Names= optionLennart Poettering
Names= is a source of errors, simply because alias names specified like this only become relevant after a unit has been loaded but cannot be used to load a unit. Let's get rid of the confusion and drop this field. To establish alias names peope should use symlinks, which have the the benefit of being useful as key to load a unit, even though they are not taken into account if unit names are listed but they haven't been explicitly referenced before.
2012-06-15service: timeout for oneshot servicesLukas Nykryn
Add possibility to specify timeout for oneshot services. [ https://bugzilla.redhat.com/show_bug.cgi?id=761656 Added minor fixups. -- michich ]
2012-06-01journal: allow setting of a cutoff log level for disk storage, syslog, kmsg, ↵Lennart Poettering
console forwarding
2012-05-31util: introduce a proper nsec_t and make use of it where appropriateLennart Poettering
2012-05-24main: add configuration option to alter capability bounding set for PID 1Lennart Poettering
This also ensures that caps dropped from the bounding set are also dropped from the inheritable set, to be extra-secure. Usually that should change very little though as the inheritable set is empty for all our uses anyway.
2012-05-22units: remove service sysv_path variable and replace it by generic unit_pathLennart Poettering
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.
2012-05-21units: introduce new Documentation= field and make use of it everywhereLennart Poettering
This should help making the boot process a bit easier to explore and understand for the administrator. The simple idea is that "systemctl status" now shows a link to documentation alongside the other status and decriptionary information of a service. This patch adds the necessary fields to all our shipped units if we have proper documentation for them.
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-04-30unit: add new dependency type RequiresMountsFor=Lennart Poettering
RequiresMountsFor= is a shortcut for adding requires and after dependencies to all mount units neeed for the specified paths. This solves a couple of issues regarding dep loop cycles for encrypted swap.
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
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.
2012-04-11move libsystemd_core.la sources into core/Kay Sievers