summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* tests: fix some tests to pass in kojiZbigniew Jędrzejewski-Szmek2014-10-12
| | | | | | | | | | | | | | | | | FAIL: test-engine ================= Cannot find cgroup mount point: No such file or directory Assertion 'r >= 0' failed at ../src/test/test-engine.c:46, function main(). Aborting. FAIL: test-sched-prio ===================== Cannot find cgroup mount point: No such file or directory Assertion 'r >= 0' failed at ../src/test/test-sched-prio.c:42, function main(). Aborting. FAIL: test-bus-cleanup ====================== Assertion 'sd_bus_open_system(&bus) >= 0' failed at ../src/libsystemd/sd-bus/test-bus-cleanup.c:40, function test_bus_open(). Aborting. after new: refcount 1
* Set $NOTIFY_SOCKET for control procs if NotifyAccess=allBrandon L Black2014-10-12
|
* ModernizationZbigniew Jędrzejewski-Szmek2014-10-12
|
* terminal/grdrm: force deep modeset on enterDavid Herrmann2014-10-11
| | | | | | | | | | | | | Usually, when our session is activated (or re-configurated) we should be able to try a page-flip to our buffer. The kernel driver should reject it if it is incompatible. As it turns out, drivers don't do this. Therefore, we now force a deep modeset if we're not sure what mode is set. This has the side-effect that we might get glitches on session-switches (depending on driver behavior). However, there's no way around this and it is what everyone does so far. Most drivers still detect if we keep the mode and so don't touch the clocks. Therefore, we just get a regular async flip.
* sd-dhcp-client: support non-Ethernet hardware addressesDan Williams2014-10-11
| | | | | | | Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed, hlen is set to 0, and htype is set to ARPHRD_INFINIBAND because IB hardware addresses are 20 bytes in length.
* Report aa_change_onexec error codeMichael Scherer2014-10-11
| | | | | | | Since aa_change_onexec return the error code in errno, and return -1, the current code do not give any useful information when something fail. This make apparmor easier to debug, as seen on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760526
* bus-proxyd: fix compatibility with old dbus-1Lukasz Skalski2014-10-10
| | | | | 'ListQueuedOwners' method should return 'NameHasNoOwner' error if chosen name is not available on bus.
* mount-setup: skip relabelling when SELinux and SMACK not supportedEmil Renner Berthing2014-10-10
| | | | | | This is also the only place where FTW_ACTIONRETVAL is used, so this makes systemd compile without SELinux or SMACK support when the standard library doesn't support this extension.
* fstab-generator: Honor mount.usr*= on kernel command lineTobias Hunger2014-10-10
| | | | | | This allows to configure boot loader entries for systems where the root and usr filesystems are in different subvolumes (or even on different drives).
* kdbus: fix buffer overflow in bus_get_owner_kdbus() functionLukasz Skalski2014-10-10
| | | | | | | Commit 710fc9779b7c (kdbus repo) introduced attaching items[] instead of name[] in kdbus_cmd_conn_info struct. Commit 581fe6c81 (systemd repo) caught up with this change, but item size was not properly calculated.
* nspawn: actually allow access to /dev/net/tun in the containerLennart Poettering2014-10-10
| | | | | It's not sufficient to just copy the device node over, we need to update the policy for it too.
* systemctl: remove casts in formattingZbigniew Jędrzejewski-Szmek2014-10-09
|
* journalctl: use pager for --list-bootsZbigniew Jędrzejewski-Szmek2014-10-09
|
* sd-journal: fix sd_journal_enumerate_unique skipping valuesJan Janssen2014-10-09
| | | | | | | | | | | | | | sd_journal_enumerate_unique will lock its mmap window to prevent it from being released by calling mmap_cache_get with keep_always=true. This call may return windows that are wider, but compatible with the parameters provided to it. This can result in a mismatch where the window to be released cannot properly be selected, because we have more than one window matching the parameters of mmap_cache_release. Therefore, introduce a release_cookie to be used when releasing the window. https://bugs.freedesktop.org/show_bug.cgi?id=79380
* sd-journal: change check to assertZbigniew Jędrzejewski-Szmek2014-10-09
| | | | | As of 0f99f74a14 'sd-journal: verify that object start with the field name' this condition should never happen.
* sd-journal: do not reset sd_j_enumerate_unique position on errorZbigniew Jędrzejewski-Szmek2014-10-09
| | | | | | | | | | | | 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.
* service: enter SERVICE_STOP_SIGTERM state after getting "STOPPING=1"Michal Schmidt2014-10-09
| | | | | | | | | | 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.
* bus-proxy: allow getpeersec() to failDaniel Mack2014-10-09
| | | | | getpeersec() will fail for non-SELinux enabled machines, so don't make that a hard error.
* socket-proxyd: Unchecked return value from librarySusant Sahani2014-10-09
| | | | | CID 1237543 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)
* sd-dhcp6-lease: Name the structure containing IAADDR dataPatrik Flykt2014-10-09
| | | | | | | 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.
* bus-policy: move name list iteration to policy usersDaniel Mack2014-10-09
| | | | | | | | 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.
* logind: mount per-user tmpfs with 'smackfsroot=*' for smack enabled systemsLukasz Skalski2014-10-09
|
* sd-bus: check return value of asprintf()Daniel Mack2014-10-09
| | | | Check for OOM conditions of asprintf() in bus_set_address_user().
* systemctl: suggest -xe not -xnZbigniew Jędrzejewski-Szmek2014-10-08
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1150289
* sd-event: also update signal mask when disconnecting sourcesZbigniew Jędrzejewski-Szmek2014-10-08
|
* sd-event: be more careful when enabling/disabling signalsZbigniew Jędrzejewski-Szmek2014-10-08
| | | | | | | | | | | | 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>
* util: avoid double close of fdThomas Hindoe Paaboel Andersen2014-10-09
| | | | | | | | | | 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
* time: functions named "internal" really shouldn't be exportedLennart Poettering2014-10-08
| | | | | Also, let's try to make function names descriptive, instead of using bools for flags.
* core: map the 'rescue' argument to rescue.targetMantas Mikulėnas2014-10-08
| | | | | | 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.
* sd-bus: sync kdbus.h (ABI break)Daniel Mack2014-10-08
| | | | | | | | 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)
* nspawn: copy /dev/net/tun from hostTom Gundersen2014-10-08
| | | | This enables tuntap support in the container (assumning the necessary capabilities are in place).
* systemctl: add add-wants and add-requires verbsLukas Nykryn2014-10-08
|
* unit: move UnitDependency to unit-nameLukas Nykryn2014-10-08
|
* core: don't allow enabling if unit is maskedJan Synacek2014-10-07
|
* bus-proxyd: assorted cleanups and fixesDaniel Mack2014-10-07
| | | | | Just some cleanups around policy checks that came up during review. The code is still not productive.
* bus-proxyd: check return values of getpeercred() and getpeersec()Daniel Mack2014-10-07
| | | | | | If we can't get the remote peer or security creds, bail out. Spotted by coverity.
* sd-bus: check return value of vasprintfDaniel Mack2014-10-07
| | | | | | Check for OOM situations when vasprintf() returns < 0 in bus_error_setfv(). Spotted by coverity.
* sd-bus: fix KDBUS_CMD_FREE userDaniel Mack2014-10-07
| | | | Fix a user of the KDBUS_CMD_FREE ioctl that was missed in the transition.
* sd-bus: fix use-after-free in close_kdbus_msg()Daniel Mack2014-10-07
| | | | | | | 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.
* sd-bus: remove unused variableThomas Hindoe Paaboel Andersen2014-10-07
| | | | It is no longer used after d663f1b1a92a778bcdc68f29b8c08cb49431b4f7
* sd-bus: sync kdbus.h (ABI break)Daniel Mack2014-10-06
| | | | | | | | 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.
* build-sys: use linux/memfd.h if availableZbigniew Jędrzejewski-Szmek2014-10-05
| | | | | | | | | | | 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.
* terminal: remove an unused initializationThomas Hindoe Paaboel Andersen2014-10-05
|
* ask-password: Add --echo to enable echoing the user inputDavid Sommerseth2014-10-05
| | | | | | | | | | | | | | | | 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.]
* bus: add assert to check that we're not freeing a static structureZbigniew Jędrzejewski-Szmek2014-10-05
| | | | CID #996315.
* terminal/idev: don't remove consumed-mods from kbd-matchesDavid Herrmann2014-10-05
| | | | | | | | | | | 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.
* terminal/screen: perform bold->light conversion only on foregroundDavid Herrmann2014-10-05
| | | | | Bold glyphs always use light colors. However, this color conversion is limited to the foreground color, so skip it for backgrounds.
* terminal/subterm: leave bold-light conversion to parentDavid Herrmann2014-10-05
| | | | | | 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.
* terminal/screen: add support for alternate screen buffersTom Gundersen2014-10-05
| | | | | | | 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)
* terminal/screen: save state in separate objectDavid Herrmann2014-10-05
| | | | | | | Terminal state can be saved/restored by applications. To simplify our internal handling, put all affected state into a separate object. Especially with alternate screen buffers, this will simplify our code significantly.