1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-04 22:21:55 +03:00
Commit Graph

17605 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
360af4cf6f sd-journal: do not reset sd_j_enumerate_unique position on error
systemctl would call sd_j_enumerate_unique() interleaved with
sd_j_next(). But the latter can remove a file if it detects an
error in it. In those circumstances sd_j_enumerate_unique would
restart with the first file in hashmap. With many corrupted files
sd_j_enumerate_unique might iterate over the list multiple times.

Avoid this by jumping to the next file in unique list if possible,
or setting a flag that tells sd_j_enumerate_unique that it is done
otherwise.
2014-10-09 22:44:29 -04:00
Lennart Poettering
f280bcfb21 man: document the new "rescue" kernel command line option 2014-10-09 18:27:36 +02:00
Michal Schmidt
6041a7ee2c service: enter SERVICE_STOP_SIGTERM state after getting "STOPPING=1"
SERVICE_STOP would mean we're running the ExecStop command. That's not
the case with "STOPPING=1".
Instead we should enter the same state as if we just told the service
to stop, i.e. SERVICE_STOP_SIGTERM.

This fixes a bug where voluntarily exiting services would hang around in
deactivating state until timeout.
2014-10-09 17:48:01 +02:00
Lennart Poettering
384a4be2b0 update TODO 2014-10-09 16:51:39 +02:00
Daniel Mack
7ff3bb4e47 bus-proxy: allow getpeersec() to fail
getpeersec() will fail for non-SELinux enabled machines, so don't make that
a hard error.
2014-10-09 15:41:44 +02:00
Susant Sahani
25dbe4f50f socket-proxyd: Unchecked return value from library
CID 1237543 (#1 of 1): Unchecked return value from library
(CHECKED_RETURN)
2014-10-09 15:34:07 +02:00
Patrik Flykt
ee3a5027f7 sd-dhcp6-lease: Name the structure containing IAADDR data
With this change the DHCP6_OPTION_IAADDR_LEN define can be removed in
favor of using sizeof(). Using the name of the struct and sizeof()
makes it clearer how much and what data is being copied from the
DHCPv6 message.
2014-10-09 14:57:53 +03:00
Daniel Mack
d46fbfb48d bus-policy: move name list iteration to policy users
We need to figure out which of the possible names satisfied the policy,
so we cannot do the iteration in check_policy_item() but have to leave it
to the users.

Test cases amended accordingly.
2014-10-09 13:31:01 +02:00
Lukasz Skalski
374738d55b logind: mount per-user tmpfs with 'smackfsroot=*' for smack enabled systems 2014-10-09 11:38:59 +02:00
Lennart Poettering
2134b5ef6b man: SyslogIdentifier= has an effect on journal logging too 2014-10-09 11:37:01 +02:00
Daniel Mack
b1543c4c93 sd-bus: check return value of asprintf()
Check for OOM conditions of asprintf() in bus_set_address_user().
2014-10-09 11:26:09 +02:00
Zbigniew Jędrzejewski-Szmek
b923047d73 systemctl: suggest -xe not -xn
https://bugzilla.redhat.com/show_bug.cgi?id=1150289
2014-10-08 20:23:09 -04:00
Lennart Poettering
706d97503d update TODO 2014-10-09 01:47:07 +02:00
Zbigniew Jędrzejewski-Szmek
f95387cda8 sd-event: also update signal mask when disconnecting sources 2014-10-08 19:30:22 -04:00
Zbigniew Jędrzejewski-Szmek
4807d2d068 sd-event: be more careful when enabling/disabling signals
When a child event is disabled (in order to be freed) and there is no
SIGCHLD signal event, sd_event_source_set_enabled will disable SIGCHLD
even if there are other child events.

Also remove some unneeded signalfd updates.

https://bugs.freedesktop.org/show_bug.cgi?id=84659

Based-on-a-patch-by: Hristo Venev <mustrumr97@gmail.com>
2014-10-08 19:30:22 -04:00
Jan Synacek
751ea8deaf man/systemctl: document enable on masked units 2014-10-08 19:29:13 -04:00
Thomas Hindoe Paaboel Andersen
6f53e671aa util: avoid double close of fd
We could end with a double close if we close the fd loop and flush_fd
fails. That would make us goto fail and there we close the fd once
again. This patch sets the fd to the return value for safe_close: -1
A fd with negative value will be ignored by the next call to
safe_close.

CID#996223
2014-10-09 00:19:57 +02:00
Lennart Poettering
5ab99e076c time: functions named "internal" really shouldn't be exported
Also, let's try to make function names descriptive, instead of using
bools for flags.
2014-10-08 22:37:45 +02:00
Mantas Mikulėnas
5329ab10ff core: map the 'rescue' argument to rescue.target
Even though the 'emergency' and 'single' aliases come from sysvinit, the
lack of 'rescue' is still quite confusing (caught me by surprise for the
9th time yet) and inconsistent with `systemctl rescue` as well.
2014-10-08 21:35:38 +02:00
Lennart Poettering
402696d787 Update TODO 2014-10-08 21:35:38 +02:00
Daniel Mack
40885bb29e sd-bus: sync kdbus.h (ABI break)
Sync kdbus.h once again. Two thing have changed:

 a) KDBUS_CMD_EP_* was renamed to KDBUS_CMD_ENDPOINT_*
 b) struct kdbus_cmd_hello and struct kdbus_cmd_make gained a
    'features' bitfield (which is currently unused)
2014-10-08 17:30:49 +02:00
Tom Gundersen
85614d663e nspawn: copy /dev/net/tun from host
This enables tuntap support in the container (assumning the necessary capabilities are in place).
2014-10-08 15:52:07 +02:00
Rahul Sundaram
5a94946cdf note on relative symlink in os-release 2014-10-08 08:30:22 -04:00
Lukas Nykryn
e94937df95 systemctl: add add-wants and add-requires verbs 2014-10-08 12:44:00 +02:00
Lukas Nykryn
cb87a73b45 unit: move UnitDependency to unit-name 2014-10-08 12:44:00 +02:00
Zbigniew Jędrzejewski-Szmek
b62a309a47 NEWS: update for 217 2014-10-07 22:01:37 -04:00
Zbigniew Jędrzejewski-Szmek
1e98337f26 man: mention docker as type of virtualization 2014-10-07 21:54:22 -04:00
Jan Synacek
f7101b7368 core: don't allow enabling if unit is masked 2014-10-07 17:08:18 -04:00
Daniel Mack
e91c8c2019 bus-proxyd: assorted cleanups and fixes
Just some cleanups around policy checks that came up during review.
The code is still not productive.
2014-10-07 18:02:38 +02:00
Zbigniew Jędrzejewski-Szmek
1b600437ba /proc/sys prefixes are not necessary for sysctl anymore 2014-10-07 09:19:51 -04:00
Zbigniew Jędrzejewski-Szmek
d19e85f0d4 Update TODO 2014-10-07 09:19:49 -04:00
Zbigniew Jędrzejewski-Szmek
5d9a2698e7 man: document stripping of quotes 2014-10-07 09:19:41 -04:00
Zbigniew Jędrzejewski-Szmek
30d88d54f6 man: move commandline parsing to a separate section
It is very long already, and obscures the description of
ExecStart, and it is about to get longer.
2014-10-07 09:19:24 -04:00
Daniel Mack
55534fb5e4 bus-proxyd: check return values of getpeercred() and getpeersec()
If we can't get the remote peer or security creds, bail out.

Spotted by coverity.
2014-10-07 12:36:09 +02:00
Daniel Mack
8bf13eb1e0 sd-bus: check return value of vasprintf
Check for OOM situations when vasprintf() returns < 0 in bus_error_setfv().

Spotted by coverity.
2014-10-07 12:10:06 +02:00
Daniel Mack
53e9dbcdfb sd-bus: fix KDBUS_CMD_FREE user
Fix a user of the KDBUS_CMD_FREE ioctl that was missed in the transition.
2014-10-07 12:02:04 +02:00
Daniel Mack
ca794c8e95 sd-bus: fix use-after-free in close_kdbus_msg()
Walk the items first, then free the memory of the message.

Also, while at it, make coverity happy with an explicit (void) prefix.
We intentionally ignore the return value here.
2014-10-07 11:38:31 +02:00
Martin Pitt
4e3deeedc1 keymap: Fix touchpad toggle key on Asus laptops
https://launchpad.net/bugs/1377352
2014-10-07 11:22:31 +02:00
Martin Pitt
a046659f85 keymap: Fix touchpad toggle on Toshiba Satellite P75-A7200
Just like everywhere else we use KEY_F21 instead of KEY_TOUCHPAD_TOGGLE for X
friendliness.
2014-10-07 11:20:04 +02:00
Thomas Hindoe Paaboel Andersen
13303f018d sd-bus: remove unused variable
It is no longer used after d663f1b1a9
2014-10-07 00:00:21 +02:00
Daniel Mack
d663f1b1a9 sd-bus: sync kdbus.h (ABI break)
The KDBUS_CMD_FREE ioctl now uses a struct rather than a direct pointer
to the offset to free.

The KDBUS_CMD_MSG_CANCEL ioctl has also changes, but there's no user of
it yet in systemd.
2014-10-06 18:36:16 +02:00
Zbigniew Jędrzejewski-Szmek
27c64db6df build-sys: use linux/memfd.h if available
linux/memfd.h was added linux 3.17, so it might not be widely
available for a while.

Also, check if memfd_create is defined, for the HAVE_LINUX_MEMFD_H
check to have a chance of succeeding.

Also, collapse all ifdefs for memfd-related stuff, because they
were all added together so there's no need to check separately.
2014-10-05 19:07:28 -04:00
Thomas Hindoe Paaboel Andersen
0077776275 terminal: remove an unused initialization 2014-10-05 22:43:07 +02:00
Zbigniew Jędrzejewski-Szmek
0536ce5d0c Update TODO 2014-10-05 15:29:41 -04:00
David Sommerseth
64845bdc82 ask-password: Add --echo to enable echoing the user input
Programs such as OpenVPN may use ask-password for not only retrieving
passwords, but also usernames.  Masking usernames with * seems just silly.

 v2 - Don't mess with termios flags, instead print the input
      instead of an asterix.  Resolves issues with backspace
      and TAB input.

 v3 - Renamed 'do_echo' variables and argument to 'echo'.  Also
      modified the ask_password_{tty,agent,auto} API instead of
      additional wrapper functions.

[zj: undo changes to ask_password_auto, since no callers were using
     the new argument.]
2014-10-05 15:29:41 -04:00
Zbigniew Jędrzejewski-Szmek
75a0da952f bus: add assert to check that we're not freeing a static structure
CID #996315.
2014-10-05 15:29:41 -04:00
David Herrmann
62d5068d63 terminal/idev: don't remove consumed-mods from kbd-matches
XKB consumed mods include modifiers that *didn't* affect the translation,
but might affect it if used. This is very misleading, given that we are
usually not interested in that information. Therefore, keep them in real
mods to behave like X11 does. Maybe at some point, XKB introduces proper
shortcut matching...

Also make evcat display consumed modifiers so we can better debug those
situations.
2014-10-05 18:02:28 +02:00
David Herrmann
34dbefceb1 terminal/screen: perform bold->light conversion only on foreground
Bold glyphs always use light colors. However, this color conversion is
limited to the foreground color, so skip it for backgrounds.
2014-10-05 15:49:26 +02:00
David Herrmann
378c4eed02 terminal/subterm: leave bold-light conversion to parent
We rely on the parent terminal to do color conversion, so also leave
bold->light conversion to the parent. Otherwise, it will be performed
twice and we might apply it on the wrong color.
2014-10-05 15:48:32 +02:00
Tom Gundersen
c7afe4f3d7 terminal/screen: add support for alternate screen buffers
Hook up SM/RM 47/1047-1049 and enable alternate screen buffers for term
applications.

(David: rebased on top of -git, renamed helpers and added docs)
2014-10-05 15:26:54 +02:00