summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-11-28event: allow EPOLLET as event flagDavid Herrmann
EPOLLET enables edge-triggered mode (see epoll(7) for more). For most use-cases, level-triggered is just fine, but for master-TTYs we need edge-triggered to catch EPOLLHUP. master-TTYs signal EPOLLHUP if no client is connected, but a client may connect some time later (same happens during vhangup(2)). However, epoll doesn't allow masking EPOLLHUP so it's signaled constantly. To avoid this, edge-triggered mode is needed.
2013-11-28logind: mute/restore VT on behalf of session controllersDavid Herrmann
If a session process calls TakeControl(), we now put the VT into KD_GRAPHICS+K_OFF mode. This way, the new session controller can solely rely on the logind-dbus API to manage the session. Once the controller exits or calls ReleaseControl(), we restore the VT. We also restore it, if we lost a controller during crash/restart (but only if there really *was* a controller previously). Note that we also must put the VT into VT_PROCESS mode. We want VT_AUTO semantics, but VT_AUTO+KD_GRAPHICS actually disables *all* VT switches (who came up with that great idea?). Hence, we set VT_PROCESS for logind but acknowledge *all* requests immediately. If a compositor wants custom VT setups, they can still get this by *first* calling TakeControl() and afterwards setting up the VT. logind doesn't touch the VT during controller runtime, only during setup/teardown. This is actually what weston already does.
2013-11-28logind: restore session-controller after crashDavid Herrmann
We now save the unique bus-name of a session-controller as CONTROLLER=%s in the session files. This allows us to restore the controller after a crash or restart. Note that we test whether the name is still valid (dbus guarantees that the name is unique as long as the machine is up and running). If it is, we know that the controller still exists and can safely restore it. Our dbus-name-tracking guarantees that we're notified once it exits. Also note that session-devices are *not* restored. We have no way to know which devices where used before the crash. We could store all these on disk, too, or mark them via udev. However, this seems to be rather cumbersome. Instead, we expect controllers to listen for NewSession signals for their own session. This is sent on session_load() and they can then re-request all devices. The only race I could find is if logind crashes, then the session controller tries calling ReleaseControl() (which will fail as logind is down) but keeps the bus-connection valid for other independent requests. If logind is restarted, it will restore the old controller and thus block the session. However, this seems unlikely for several reasons: - The ReleaseControl() call must occur exactly in the timespan where logind is dead. - A process which calls ReleaseControl() usually closes the bus-connection afterwards. Especially if ReleaseControl() fails, the process should notice that something is wrong and close the bus. - A process calling ReleaseControl() usually exits afterwards. There may be any cleanup pending, but other than that, usual compositors exit. - If a session-controller calls ReleaseControl(), a session is usually considered closing. There is no known use-case where we hand-over session-control in a single session. So we don't care whether the controller is locked afterwards. So this seems negligible.
2013-11-28logind: ignore failing close() on session-devicesDavid Herrmann
Unfortunately, close() on a revoked/removed character-device fails with ENODEV. I tried tracking this down in the kernel, but couldn't figure out were exactly it comes from. However, can be easily reproduced with: fd = open("/dev/input/event0", O_RDWR); ioctl(fd, EVIOCREVOKE, 0); r = close(fd); A second close on @fd would return EBADF so the close is actually valid. We simply ignore close() errors for all session-devices as their access may be revoked asynchronously, or the device might get unplugged. We use close_nointr() in case anyone ever looks at the return value (or anyone runs "grep 'close(' -r src/" to find broken close() calls). Fixes: systemd-logind[31992]: Assertion 'close_nointr(fd) == 0' failed at src/shared/util.c:185, function close_nointr_nofail(). Aborting.
2013-11-28bus: add bus_name_has_owner() helperDavid Herrmann
Small helper to run a synchronous "NameHasOwner" request on the dbus-daemon.
2013-11-28login: revert lazy session-activation on non-VT seatsDavid Herrmann
Existing applications like gdm already depend on new sessions to get immediately activated on seats without VTs. Fixes a bug reported as: [systemd-devel] systemd 208:trouble with inactive user sessions at non-seat0 seats This patch restores the original behavior. We either need to add a new flag for session-creation or some other heuristic to avoid activating new sessions in the future.
2013-11-28build-sys: avoid warnings from assert_ccZbigniew Jędrzejewski-Szmek
2013-11-28po: install translationsZbigniew Jędrzejewski-Szmek
2013-11-28catalog,po: add Russian translationSergey Ptashnick
2013-11-28catalog: fix typos in the French translationSylvain Plantefeve
2013-11-28bus: update kdbus.h and always subscribe to KDBUS_HELLO_ATTACH_NAMESKay Sievers
2013-11-28automount: log info about triggering processKay Sievers
2013-11-28core: initialize variableKay Sievers
2013-11-27TODO: add sd-rtnl itemsTom Gundersen
2013-11-27Revert "socket-proxyd: Add --listener option for listener/destination pairs."Lennart Poettering
This reverts commit adcf4c81c58511b67644e17fa743d1729d3c9ccf. We have a better solution for the problem of making two processes run in the same namespace, and --listener is not needed hence and should be dropped. Conflicts: man/systemd-socket-proxyd.xml
2013-11-27namespace: comment typo fixLennart Poettering
2013-11-27bus: properly handle if we get disconnected during HELLO phaseLennart Poettering
2013-11-27service: add the ability for units to join other unit's PrivateNetwork= and ↵Lennart Poettering
PrivateTmp= namespaces
2013-11-27TODO: add dbus runtime depedencyTom Gundersen
2013-11-27networkd: Initialize variable to NULLPatrik Flykt
If any number of arguments are given, _cleanup_manager_free_ is used with unitialized memory causing a crash.
2013-11-27TODO: remove dbus requirementKay Sievers
2013-11-27updates for TODO and READMELukasz Skalski
* library support for setns() system call was added to glibc version 2.14 (setns() call is use in src/machine/machinectl.c and src/libsystemd-bus-container.c) * utf8 validation call are already exported (via sd-utf8.c file) - commit - 369c583b3fb3d672ef469d53141e274ec9d2e8a7
2013-11-27logind: log which process is delaying suspend and not closing locksLennart Poettering
2013-11-27journald: mention how long we needed to flush to /var in the logsLennart Poettering
2013-11-27journal: simplify pre-allocation logicLennart Poettering
let's just do a single fallocate() as far as possible, and don't distuingish between allocated space and file size. This way we can save a syscall for each append, which makes quite some benefits.
2013-11-27journal: add a test case for flushing messages out of a series of journal ↵Lennart Poettering
files into a single new one
2013-11-27journal: allow journal_file_copy_entry() to work on non-local filesLennart Poettering
2013-11-27journal: fix iteration when we go backwards from the beginning of an array ↵Lennart Poettering
chain element
2013-11-26journal: optimize bisection logic a bit by caching the last positionLennart Poettering
This way we can do a quick restart limiting a bit how wildly we need to jump around during the bisection process.
2013-11-26journald: keep statistics on how of we hit/miss the mmap cacheLennart Poettering
2013-11-26journal: make table constLennart Poettering
2013-11-26journal: when appending to journal file, allocate larger blocks at onceLennart Poettering
2013-11-26tree-wide usage of %m specifier instead of strerror(errno)Daniel Buch
Also for log_error() except where a specific error is specified e.g. errno ? strerror(errno) : "Some user specified message"
2013-11-26man: networkd - document bridgingTom Gundersen
2013-11-26systemctl: fix enable/disable reply handlingKay Sievers
2013-11-26pam_systemd: do not set XDG_RUNTIME_DIR if the session's original user is ↵Lennart Poettering
not the same as the newly logged in one It's better not to set any XDG_RUNTIME_DIR at all rather than one of a different user. So let's do this. This changes the bus call parameters of CreateSession(), but that is explicitly an internal API hence should be fine. Note however, that a logind restart (the way the RPM postinst scriptlets do it) is necessary to make things work again.
2013-11-26nspawn: improve error message when we cannot resolve the root directory argumentLennart Poettering
2013-11-26man: explain the precise syntax and feature set of unit names at the end of ↵Lennart Poettering
the man page, given that it is detail information
2013-11-26systemctl: replace the three job mode options by a single --job-mode= optionLennart Poettering
Also, expose the new "flush" job mode this way.
2013-11-26core: add new "flush" job mode to cancel all other jobs when queuing a new jobLennart Poettering
2013-11-26core: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= ↵Lennart Poettering
setting and make use of it where applicable
2013-11-26networkd: add bridge supportTom Gundersen
A bridge is specified in a .netdev file with a section [Bridge] and at least the entry Name=. A link may be joined to a bridge if the .network applied to it has a Bridge= entry giving the name of the bridge in its [Network] section. We eagerly create all bridges on startup, and links are added to bridges as soon as they both appear.
2013-11-26networkd: minor fixesTom Gundersen
In particular, store the ifname, though we should only use it carefully, as it is not guaranteed to be stable. Using it for logging is fine though.
2013-11-26rtnl: add support for IFLA_MASTERTom Gundersen
2013-11-26rtnl: add preliminary support for containersTom Gundersen
For now, we only support one container type IFLA_LINKINFO, and we still lack support for parsing the containers again.
2013-11-25networkd: use correct printf formatterDave Reisner
uint64_t can be formatted correctly with %ju, rather than casting to unsigned and potentially losing accuracy.
2013-11-25conf-parser: fix memory realloc errorYin Kangkai
Otherwise there is some memory corruption and undefined behavior, e.g., in my case systemd-udev was always aborted at the _cleanup_freep_ around that code blocks.
2013-11-25core: fix order of parameters in broadcast_signal()Lennart Poettering
2013-11-25bus: properly return errors to client if invalid parameters are passed to ↵Lennart Poettering
built-in methods
2013-11-25service: fix handling of PID file inotify eventsLennart Poettering