Commit Graph

376 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 0f67f1efae core: lift restriction on order of - and @ in ExecStart 2012-11-15 16:01:22 +01:00
Oleksii Shevchuk 7e1a84f552 core: interpret \; token in ExecStart as escaped ;
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-11-15 16:01:10 +01:00
Michal Schmidt f8b69d1dfc shared, core: do not always accept numbers in string lookups
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-30 15:41:15 +01:00
Lennart Poettering 5198dabcce man: document behaviour of ListenStream= with only a port number in regards to IPv4/IPv6 2012-10-03 14:18:55 -04:00
Lennart Poettering 93e4c84bb3 path: support specifier resolvin in .path units 2012-09-19 20:09:59 +02:00
Lennart Poettering 41f9172f42 unit: split unit_printf() and friends into its own .c file 2012-09-18 11:27:56 +02:00
Lennart Poettering 2fbe635a83 macro: introduce _cleanup_free_ macro for automatic freeing of scoped vars and make use of it 2012-09-13 22:30:26 +02:00
Auke Kok 095b2d7ab9 load-fragment: Expand specifiers in conditions.
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-09-13 21:54:34 +02:00
Lukas Nykryn b5fb37899d load-fragment: initialize bool invert before use 2012-08-23 13:31:32 +02:00
Lennart Poettering c0d6e764d1 unit: add new ConditionHost= condition type 2012-08-22 01:51:53 +02:00
Michal Sekletar d568a3350e systemd: introduced new timeout types
Makes possible to specify separate timeout for start and stop of
the service.

[ Improved the manpage. Coding style fix. -- michich ]
2012-08-08 18:11:09 +02:00
Jim Meyering 956b78e8e3 sd-daemon: remove unnecessary memset calls
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-23 00:06:06 +02:00
Lennart Poettering 8351ceaea9 execute: support syscall filtering using seccomp filters 2012-07-17 04:17:53 +02:00
Ville Skyttä 49f43d5f91 Spelling fixes. 2012-07-16 12:16:29 +02:00
Lennart Poettering 9946996cda load-fragment: a few modernizations 2012-07-03 16:10:04 +02:00
Lennart Poettering 8ff290af3b unit: drop the Names= option
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-22 16:24:57 +02:00
Lukas Nykryn 98709151f3 service: timeout for oneshot services
Add possibility to specify timeout for oneshot services.

[ https://bugzilla.redhat.com/show_bug.cgi?id=761656
  Added minor fixups. -- michich ]
2012-06-15 16:04:06 +02:00
Lennart Poettering 213ba152fd journal: allow setting of a cutoff log level for disk storage, syslog, kmsg, console forwarding 2012-06-01 17:27:16 +02:00
Lennart Poettering d88a251b12 util: introduce a proper nsec_t and make use of it where appropriate 2012-05-31 04:27:03 +02:00
Lennart Poettering ec8927ca59 main: add configuration option to alter capability bounding set for PID 1
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-24 04:00:56 +02:00
Lennart Poettering 1b64d026af 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.
2012-05-22 23:08:24 +02:00
Lennart Poettering 49dbfa7b2b units: introduce new Documentation= field and make use of it everywhere
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-21 15:14:51 +02:00
Kay Sievers 9eb977db5b util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00
Lennart Poettering 7c8fa05c4d unit: add new dependency type RequiresMountsFor=
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-30 10:52:07 +02:00
Lennart Poettering 5430f7f2bc 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.
2012-04-12 00:24:39 +02:00
Kay Sievers b30e2f4c18 move libsystemd_core.la sources into core/ 2012-04-11 16:03:51 +02:00
Renamed from src/load-fragment.c (Browse further)