1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
Commit Graph

9592 Commits

Author SHA1 Message Date
Lennart Poettering
f8a2ebbc50 man: document that Documentation= follows an order 2012-10-31 00:13:55 +01:00
Lennart Poettering
c55b1b59b8 update TODO 2012-10-31 00:13:55 +01:00
Lennart Poettering
e65d8c3760 update TODO: insserv belongs on the chopping block 2012-10-30 23:58:10 +01:00
Lennart Poettering
1fd8d04e38 strv: cleanup error path loops
https://bugzilla.redhat.com/show_bug.cgi?id=858799
2012-10-30 18:30:45 +01:00
Lennart Poettering
822e5dd1d6 update TODO 2012-10-30 18:30:44 +01:00
Michal Schmidt
8511dd1871 shared: "max" in the string->number conversion is meant to be inclusive 2012-10-30 15:46:49 +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
Zbigniew Jędrzejewski-Szmek
26acfdae44 bash-completion: add completion for coredumpctl 2012-10-30 11:28:48 +01:00
Zbigniew Jędrzejewski-Szmek
4f76ae1b4b coredumpctl: add --field/-F option
Useful for completion generation.
2012-10-30 11:26:49 +01:00
Zbigniew Jędrzejewski-Szmek
9a34088094 coredumpctl: add --no-legend option
Useful for completion generation.
2012-10-30 11:26:49 +01:00
Zbigniew Jędrzejewski-Szmek
2fb7a5ce67 coredumpctl: fix program return code 2012-10-30 11:24:00 +01:00
Zbigniew Jędrzejewski-Szmek
57ce4bd4ea coredumpctl: add guard to options table
It is not nice to segfault on unknown options :(
2012-10-30 11:23:59 +01:00
Michal Schmidt
50425d1614 libsystemd-daemon: fix style 2012-10-30 10:30:44 +01:00
Michal Schmidt
f3910003bc shared, libsystemd-daemon: check for empty strings in strto*l conversions
strtol() and friends may set EINVAL if no conversion was performed, but
they are not required to do so. In practice they don't. We need to check
for it.

https://bugzilla.redhat.com/show_bug.cgi?id=870577
2012-10-30 10:30:04 +01:00
Auke Kok
0eb59ccfe6 SMACK: Add configuration options. (v3)
This adds SMACK label configuration options to socket units.

SMACK labels should be applied to most objects on disk well before
execution time, but two items remain that are generated dynamically
at run time that require SMACK labels to be set in order to enforce
MAC on all objects.

Files on disk can be labelled using package management.

For device nodes, simple udev rules are sufficient to add SMACK labels
at boot/insertion time.

Sockets can be created at run time and systemd does just that for
several services. In order to protect FIFO's and UNIX domain sockets,
we must instruct systemd to apply SMACK labels at runtime.

This patch adds the following options:

Smack - applicable to FIFO's.
SmackIpIn/SmackIpOut - applicable to sockets.

No external dependencies are required to support SMACK, as setting
the labels is done using fsetxattr(). The labels can be set on a
kernel that does not have SMACK enabled either, so there is no need
to #ifdef any of this code out.

For more information about SMACK, please see Documentation/Smack.txt
in the kernel source code.

v3 of this patch changes the config options to be CamelCased.
2012-10-30 03:40:42 +01:00
Lennart Poettering
978cf3c75f logind: it's OK if a process on an pty requests a session for seat0
After all, if a sudo/su inside an X terminal should get added to the
same session as the X session itself.
2012-10-30 03:40:42 +01:00
Lennart Poettering
7ba6438631 logind: unify all session lock loop 2012-10-30 03:40:42 +01:00
Lennart Poettering
faf22b6559 update TODO 2012-10-30 03:40:42 +01:00
Lee, Chun-Yi
f271dd9762 systemd: mount the EFI variable filesystem
Add efivarfs to the mount_table in mount-setup.c, so the EFI variable
filesystem will be mounted when systemd executed.

The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel.

Cc: Kay Sievers <kay@vrfy.org>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Mantas Mikulėnas <grawity@gmail.com>
Cc: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
2012-10-30 03:40:42 +01:00
Michal Schmidt
2161de72c5 units: agetty overrides TERM
Environment=TERM=... has no effect on agetty who sets it by itself. To
really set TERM to a specified value, it has to be given on the command
line.

https://bugzilla.redhat.com/show_bug.cgi?id=870622
2012-10-29 22:58:40 +01:00
Michal Schmidt
fd09c93de9 util: improve overflow checks
commit 49371bb fixed the observed division by zero, but missed another
occurrence of the same bug. It was also not the optimal fix. We can
simply make the divisor a constant by swapping it with the compared
value.
2012-10-29 22:57:24 +01:00
Kay Sievers
f36d7992ef hostnamectl: do not choke on set-hostname with no argument
https://bugzilla.redhat.com/show_bug.cgi?id=871172
2012-10-29 20:56:02 +01:00
Kay Sievers
6c1703cc35 update TODO 2012-10-29 20:56:02 +01:00
Dave Reisner
49371bb50e util: avoid divide by zero FPE
In early userspace, if kernel initialization happens extremely quickly,
a call to systemd-timestamp can potentially result in division by zero.
Ensure that the check in timespec_load, which only makes sense if tv_sec
is greater than zero, is guarded by this condition.
2012-10-29 15:53:03 -04:00
Zbigniew Jędrzejewski-Szmek
6827101ab4 NEWS: fix typo 2012-10-29 09:52:31 +00:00
Olivier Brunel
b61e88162a swap: fix swap behaviour with symlinks
Starting a swap unit pointing to (What) a symlink (e.g. /dev/mapper/swap
or /dev/disk/by-uuid/...) would have said unit marked active, following
the one using the "actual" device (/dev/{dm-1,sda3}), but that new unit
would be seen as inactive.
Since all requests to stop swap units would follow/redirect to it,
and it is seen inactive, nothing would be done (swapoff never called).

This is because this unit would be treated twice in
swap_process_new_swap, the second call to swap_add_one causing it to
eventually be marked inactive.
2012-10-29 09:04:25 +00:00
Zbigniew Jędrzejewski-Szmek
646134dc0d swap: modernize style 2012-10-29 09:03:56 +00:00
Zbigniew Jędrzejewski-Szmek
170ca19e4d swap: use automatic cleanup 2012-10-29 09:01:20 +00:00
Zbigniew Jędrzejewski-Szmek
df326b8463 swap: introduce helper variable
Just for readability, no funcational change.
2012-10-29 09:00:56 +00:00
Zbigniew Jędrzejewski-Szmek
92b3623304 login: trivial grammar fix 2012-10-28 22:43:11 +01:00
Zbigniew Jędrzejewski-Szmek
ccd413871b systemctl: skip JOBS column if no jobs
Output is very constrained. This change saves 4 columns in the common
case.
2012-10-28 22:43:11 +01:00
Dave Reisner
35cdd0437d bash-completion: avoid usage of ls for listing devices 2012-10-28 12:27:27 -04:00
Kay Sievers
0caa6ba969 bash-completion: add minimal 'udevadm' support 2012-10-28 17:18:55 +01:00
Ben Boeckel
15f47220ab NEWS: fix a typo 2012-10-28 13:46:09 +01:00
Lennart Poettering
7654b2c259 logind: add 'lock' as possible choice for handling hw keys 2012-10-28 12:29:27 +01:00
Kay Sievers
9485d98d77 libudev: hwdb - cleanup list before getting new properties 2012-10-28 04:59:38 +01:00
Kay Sievers
23b7245397 udev: add "udevadm hwdb --test=<modalias>" 2012-10-28 04:41:15 +01:00
Kay Sievers
ff944daa01 udev: get rid of SYSCONFDIR 2012-10-28 04:04:22 +01:00
Ramkumar Ramachandra
a8f454e8a3 completion: fix typo in accessing array index
Remove spurious '}'. This error went unnoticed so far because Bash
doesn't complain.
2012-10-28 02:14:41 +02:00
Ramkumar Ramachandra
9c2cd81e0e units: teach m4 scripts in units/ about Debian's rc.local
This makes the behaviour wrt. to rc[-.]local consistent between
various distributions supporting it.
2012-10-28 02:14:41 +02:00
Zbigniew Jędrzejewski-Szmek
f2d433e178 Tweak TODO 2012-10-28 02:14:41 +02:00
Thomas Bächler
4e84ae7e76 man/logind.conf.xml: Add missing 'suspend' value for Handle*Key options. 2012-10-28 02:14:41 +02:00
Michal Sekletar
3dd8ee8fa6 util: fix possible integer overflows 2012-10-28 02:14:41 +02:00
Michal Sekletar
7ca7021a9e localectl: fix memleak, use _cleanup_strv_free_
l might contain zero strings, however there is still memory
allocated for NULL terminator, use _cleanup_strv_free_ instead to
prevent tiny leak in such case.
2012-10-28 02:14:41 +02:00
Michal Sekletar
2f7a4867ba localectl: fix memleak, jump to finish before returning 2012-10-28 02:14:40 +02:00
Michal Sekletar
4a207bb2a5 journal: fix memleak, call set_free before return 2012-10-28 02:14:40 +02:00
Zbigniew Jędrzejewski-Szmek
aa6eba407b units: reword rescue mode hints
Do not suggest to the user that commands can be issued before
logging in.

sulogin prints it own message, which mentions ^D, so there's no need
to repeat it here.
2012-10-28 02:14:00 +02:00
Lennart Poettering
9ec82de172 update TODO 2012-10-28 00:50:35 +02:00
Lennart Poettering
6524990fdc logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
Kay Sievers
2001208c2a libudev: import hwdb and export lookup interface 2012-10-27 23:39:41 +02:00