1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +03:00
Commit Graph

2928 Commits

Author SHA1 Message Date
Thomas Jarosch
7670e5a2aa condition: Fix file descriptor leak in test_capability()
Detected by cppcheck.
2011-11-01 17:02:32 +01:00
Tom Gundersen
7c2ec00930 random-seed: convert poolsize from bits to bytes
The problem was first noted in a bug report against Arch's initscripts.

Reported-by: Taylan Ulrich Bayırlı <taylanbayirli@gmail.com>
Reported-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-01 14:45:52 +01:00
Lennart Poettering
bb53abeb8c plymouth: fix ply proto endianess issues
Plymouth enforces LE even for the local Ply proto, hence we should do
the conversion properly for BE arch compat.

Tracked down by Harald Hoyer.

https://bugzilla.redhat.com/show_bug.cgi?id=744415
2011-11-01 14:20:31 +01:00
Lennart Poettering
b7f44df59a README: explain dependency on cgroups 2011-11-01 13:52:46 +01:00
Lennart Poettering
a6eb9147a8 update TODO 2011-11-01 13:52:43 +01:00
Zbigniew Jędrzejewski-Szmek
1c0a113fd3 systemctl: make list-unit-files output more economical
The first column is given the width of the widest entry,
if possible, otherwise all entries are ellipsized to fit
in ($COLUMNS - (width of second column)).

[ Added a few fixes, calculate state_cols too, respect '--no-legend',
  better handling of '--full' -- michich ]
2011-10-24 19:40:05 +02:00
Dave Reisner
74eeab044e systemctl-completion: always invoke with --no-legend
In the case of completion for the 'restart' verb, passing the invalid
unit name (the colums header) causes completion to cease functioning
entirely, with the error:

  Failed to issue method call: Unit name UNIT is not valid.

This adds a small wrapper function for systemctl which can have common
options added to it.
2011-10-19 08:14:13 +02:00
Jonathan Nieder
5a8d081c58 audit: do not complain if kernel lacks audit
When running on a kernel without audit support, systemd currently
writes a mysterious-sounding error to its log:

	systemd[1]: Failed to connect to audit log: Protocol not supported

Better to suppress the audit_open() failure message when (and only
when) it is due to running on a kernel without audit support, since in
this case the admin probably does not mind systemd not writing to the
audit log.  This way, more serious errors like ENOMEM and EACCES will
stand out more.
2011-10-17 21:04:59 +02:00
Tollef Fog Heen
e51db373c2 service: Drop rcN.d runlevels from SysV services that also exist in rcS.d
Services which claim to start in both rcN.d and rcS.d generate
loops which for some reason seems to usually end up with dbus not
starting and the whole machine being quite unhappy. We now rather
assume that if a service can be started in rcS, it should not also
start in rcN.d.

Fixes Debian bug #637037
2011-10-17 21:02:42 +02:00
Michal Schmidt
563ba9ea6e manager: fix a crash in isolating
HASHMAP_FOREACH is safe against the removal of the current entry, but
not against the removal of other entries. job_finish_and_invalidate()
can recursively remove other entries.

It triggered an assertion failure:
  Assertion 'j->installed' failed at src/manager.c:1218, function
  transaction_apply(). Aborting.

Fix the crash by iterating from the beginning when there is a
possibility that the iterator could be invalid.

It is O(n^2) in the worst case, but that's better than a crash.

https://bugzilla.redhat.com/show_bug.cgi?id=717325
2011-10-17 11:29:27 +02:00
Lennart Poettering
64685e0cea util: properly detect what the last capability is 2011-10-11 22:30:31 +02:00
Lennart Poettering
d2134abdd5 build-sys: bump release for v37 2011-10-11 20:46:56 +02:00
Lennart Poettering
1835f23c2a service: don't try to guess PID for SysV services anymore
As it turns out there are quite a number of SysV services too broken to
make the guessing work: instead of returning in the parent only after
the child is fully initialized they return immediately. The effect is
that the guessing in systemd might happen too early, at a time where the
final main process doesn't exist yet.

By turning this off we won't try to detect the main pid anymore, with
the effect that all processes of the service in question are considered
equally likely to be the main process.
2011-10-11 20:21:06 +02:00
Lennart Poettering
c70ac211b4 localed: make sure s-s-k doesn't create any X11 config files anymore 2011-10-11 20:20:01 +02:00
Zbigniew Jędrzejewski-Szmek
30fa646835 localed: shorten generate-kbd-model-map
Output is identical.
2011-10-11 15:41:38 +02:00
Zbigniew Jędrzejewski-Szmek
adda7d8b97 pager: add _noreturn_ to pager_fallback()
src/pager.c: In function ‘pager_fallback’:
src/pager.c:35:13: warning: function might be possible candidate for attribute ‘noreturn’ [-Wmissing-noreturn]
2011-10-11 15:41:32 +02:00
Lennart Poettering
62590f23c1 unit: introduce ConditionCapability 2011-10-11 15:16:52 +02:00
Lennart Poettering
822b18599d units: forgot target units 2011-10-11 14:26:20 +02:00
Lennart Poettering
f84aea434f units: increase LimitNOFILE a bit
since we need one fd per session (for logind) and one fd per service
(for stdout-syslog-bridge) increase the default rlimit a bit.
2011-10-11 04:43:29 +02:00
Lennart Poettering
688c56ff7d logind: fail gracefully if too many sessions are created
https://bugzilla.redhat.com/show_bug.cgi?id=744726
2011-10-11 04:43:01 +02:00
Lennart Poettering
a724d2ed79 timedate: fall back to /etc/sysconfig/clock on Fedora, for compatibility with legacy 2011-10-11 04:23:35 +02:00
Lennart Poettering
8266f984df units: remount root and API FS before all mount units are applied
In order to ensure that bind mounts copy the final mount settings to the
new bind mount make the root and API FS mount options are applied before
the other file systems are mounted.

https://bugzilla.redhat.com/show_bug.cgi?id=718464
2011-10-11 03:41:04 +02:00
Lennart Poettering
21e557edcc units: introduce local-fs-pre.target and remote-fs-pre.target
This hook target enables services to order themselves between
network.target and remote mounts, which is needed for GFS2 and similar
systems.
2011-10-11 03:33:53 +02:00
Zbigniew Jędrzejewski-Szmek
80cc5aeeba l10n: Reword the polish translation a bit
s/siedzenie/stanowisko/: they both translate to seat in English, but 'stanowisko'
is a place where you work, while 'siedzenie' is like a chair.

s/podłączanie/podłączenie/: we are doing it now, now sometime in the future.
2011-10-11 03:13:40 +02:00
Ran Benita
7e13bea0e1 man: document list-unit-files
It's documented in the --help, but not in the manpage.
2011-10-11 02:58:14 +02:00
Dave Reisner
e8fbe35df8 sd-login.h: correct spelling mistakes in comments 2011-10-11 02:51:59 +02:00
Miklos Vajna
b5dc29c079 hostname-setup: Frugalware switched to /etc/hostname 2011-10-11 02:47:35 +02:00
Paolo Bonzini
53273a6aef readahead: lower max file size for readahead
https://bugs.freedesktop.org/show_bug.cgi?id=41336
2011-10-11 01:44:56 +02:00
Barry Scott
a70d9a77d9 man: .include directive does not include as textual include it includes by parsing the include file.
This means that section headers must be used inside of
a .include file otherwise all the lines are ignored.
2011-10-11 01:11:49 +02:00
Barry Scott
7734f77373 man: for ExecStart= provide more details on env var substitution and how that turns into arguments.
For EnvironmentFile= explain that double quotes can be used
to protect whitespace.
2011-10-11 01:11:26 +02:00
Lennart Poettering
effe639c6a update TODO 2011-10-11 01:00:08 +02:00
Thomas Jarosch
678abaf91e util: fix close() call on wrong variable
Detected by "cppcheck" (actually it detected a file descriptor leak)
2011-10-10 22:30:57 +02:00
Thomas Jarosch
10d975f54c tmpfiles: fix file descriptor leak
Detected by "cppcheck"
2011-10-10 22:28:04 +02:00
Lennart Poettering
65c0cf7108 update TODO 2011-10-10 22:25:34 +02:00
Kay Sievers
e5396fed3f test_virtualization: do not try to compare id in !virt context 2011-10-09 16:36:45 +02:00
Kay Sievers
b011116d18 update TODO 2011-10-09 15:54:20 +02:00
Lennart Poettering
9a36607584 update TODO 2011-10-07 22:00:23 +02:00
Lennart Poettering
7dfe96eebc hashmap: use different version of DJB's hash algorithm that uses shifting instead of multiplication 2011-10-07 21:00:48 +02:00
Lennart Poettering
340047e95d update TODO 2011-10-07 20:50:59 +02:00
Lennart Poettering
3887b5abcb logind: properly generate session creation response on dbus
This fixes the various reported issues with dbus message parsing when
running su.
2011-10-04 02:28:22 +02:00
Michal Schmidt
798e258d30 systemctl: fix corrupted output of units
On some systems the list of units in systemctl output came out wrong,
all on one line and with missing descriptions.

It turns out printf() really attempts to mmap 2G memory when INT_MAX is
passed as the field width. On machines with small virtual memory
without overcommit the mmap inside printf() failed.

Do not use INT_MAX for unlimited width.
2011-09-29 21:25:50 +02:00
Lennart Poettering
a0ccd2acab localed: handle multiple X11 kbd layouts
https://bugs.freedesktop.org/show_bug.cgi?id=41341
2011-09-29 19:44:34 +02:00
Lennart Poettering
f176b5c296 systemctl: fix error message when no connection to systemd is available 2011-09-29 16:00:29 +02:00
Lennart Poettering
8185a5090a systemctl: fix detection whether the dbus connection is available 2011-09-29 15:32:10 +02:00
Lennart Poettering
652eb44a7f build-sys: fix build 2011-09-29 15:09:18 +02:00
Lennart Poettering
e99fa3cba5 vconsole: don't parse Fedora's KEYMAP= kernel parameters anymore
KEYMAP are use to pass keymap configuration to initrd, but not to the
system itself. Since the initrd might get out of date we need to make
sure that changes made in userspace override the settings from the
cmdline, hence drpo any use of it all for these variables.
2011-09-28 04:34:17 +02:00
Lennart Poettering
fb9de93dd3 localed: add SetX11Keyboard() and SetVConsoleKeyboard() bus calls 2011-09-28 04:34:17 +02:00
Kay Sievers
958ae0d751 analyze: always draw top kernel, initramfs, userspace bars
Based on Koen Kooi's patch. Renamed initrd to initramfs.
2011-09-27 12:57:28 +02:00
Michal Schmidt
4deb3b9391 systemctl: better width and alignment of fields
Provide nicer output by taking advantage of the available columns.

Expand UNIT and DESCRIPTION if possible. Economize the space:
 - never give UNIT more width than it can use.
 - if there's a shortage of space, give 25 columns to UNIT, even
   if it would result in overflowing the total columns. The field would not
   be useful below width 25.
 - then if possible, assign up to 25 columns to DESCRIPTION.
 - then split any remaining space evenly between UNIT and DESCRIPTION.

Keep the columns aligned even with '--full'.
2011-09-27 12:10:33 +02:00
Michal Schmidt
ebed32bfe8 systemctl: print the legend regardless of stdout type, add --no-legend
Print the legend (the column headers and the footer with hints) by
default even to non-tty output. People seem to get confused by the
difference when they redirect the output.

Add a parameter to suppress the printing of the legend.

Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=713567
2011-09-27 12:10:27 +02:00