summaryrefslogtreecommitdiff
path: root/src/login/loginctl.c
Commit message (Collapse)AuthorAge
* Prep v239: Add support for suspend-then-hibernate to loginctl.Sven Eden2018-08-29
|
* Prep v239: Uncomment header inclusions that are new or needed now.Sven Eden2018-08-24
|
* tree-wide: do not assign values if not usedYu Watanabe2018-08-24
|
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-08-24
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-08-24
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* Use const char* for timestamp strings which we don't plan to modifyZbigniew Jędrzejewski-Szmek2018-08-24
| | | | Makes the intent a bit clearer.
* tree-wide: port various bits of the tree over to the new DUMP_STRING_TABLE() ↵Lennart Poettering2018-08-24
| | | | macro
* util: rename signal_from_string_try_harder() to signal_from_string()Yu Watanabe2018-08-24
| | | | | Also this makes the new `signal_from_string()` function reject e.g, `SIG3` or `SIG+5`.
* login: drop an unused variableYu Watanabe2018-08-24
| | | | Follow-up for 99f1229d76da4b805f8f6c6e5e4a878d17d42f93.
* loginctl: port loginctl to format-table.[ch]Lennart Poettering2018-08-24
|
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* tree-wide: remove unused variables (#8612)Yu Watanabe2018-08-24
|
* bus-util: add flags for bus_map_all_properties() (#8546)Yu Watanabe2018-08-24
| | | | | | | | | | This adds flags BUS_MAP_STRDUP and BUS_MAP_BOOLEAN_AS_BOOL. If BUS_MAP_STRDUP is set, then each "s" message is duplicated. If BUS_MAP_BOOLEAN_AS_BOOL is set, then each "b" message is written to a bool pointer. Follow-up for #8488. See https://github.com/systemd/systemd/pull/8488#discussion_r175816270.
* login/eloginctl.c: Sync the following methods from systemctl.c:Sven Eden2018-06-29
| | | | | | | | | * check_inhibitors() => logind_check_inhibitors() * elogind_reboot() => logind_reboot() * elogind_schedule_shutdown() => logind_schedule_shutdown() * elogind_set_wall_message() => logind_set_wall_message() Further introduce both -q/--quiet and --dry-run.
* Comment the fact that some tools need to termintate their bus connect firstFranck Bui2018-05-30
|
* Revert "tree-wide: use _cleanup_(sd_bus_flush_close_unrefp) at various ↵Franck Bui2018-05-30
| | | | | | | | | | | appropriate places" This reverts commit 0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19. The removal of _cleanup_() usages was done on purpose, see cf647b69baee4c478d3909c327e3d917e1563f44. Fixes: #3543
* Prep v236 : Add missing SPDX-License-Identifier (5/9) src/loginSven Eden2018-03-26
|
* *: fix some inconsistent control statement styleVito Caputo2017-12-01
|
* loginctl: enable-linger does not need fallback to XDG_SESSION_IDAlan Jenkins2017-09-18
| | | | | | | To maintain consistency with `loginctl user-status`, drop the fallback to XDG_SESSION_ID for `loginctl enable-linger`. The fallback was unnecessary and also incorrect: it passed the numeric value of the session identifier as a UID value.
* Fix various build failures with the latest systemd updates.Sven Eden2017-12-08
|
* tree-wide: use IN_SET macro (#6977)Yu Watanabe2017-12-08
|
* Apply updates from upstreamSven Eden2017-12-07
|
* loginctl: also use $XDG_SESSION_ID for session-statusZbigniew Jędrzejewski-Szmek2017-07-25
|
* loginctl: use $XDG_SESSION_ID for "our" sessionZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | | | | | | | | | Instead of always letting logind guess what the caller's session is, let's give it the value from $XDG_SESSION_ID when it is present in the caller's environment. Nowadays terminal emulators are often running as services under elogind --user, and not as part of an actual session, so all loginctl calls which depend on logind guessing the session will fail. I don't see a reason not to honour $XDG_SESSION_ID. This applies to LockSession, UnlockSession, TerminateSession, ActivateSession, SetUserLinger. Fixes #6032.
* Add short-iso-precise for journalctl output (#5884)Ian Wienand2017-07-25
| | | | | This adds a short-iso-precise option for journalctl output. It is similar to short-iso, but includes microseconds.
* loginctl: fix typo causing ignoring multiple session IDs (#5732)slodki2017-07-25
| | | | Fixes #5733
* Prep v233.3: Add 'loginctl list' as a shorthand for list-sessionsSven Eden2017-07-20
|
* tree-wide: make bus_map_all_properties return a proper sd_bus_errorLennart Poettering2017-07-17
| | | | | | | | And then show it, to make things a bit friendlier to the user if we fail acquiring some props. In fact, this fixes a number of actual bugs, where we used an error structure for output that we actually never got an error in.
* shared/cgroup-show: extract funtion to query unit cgroup pathZbigniew Jędrzejewski-Szmek2017-07-17
| | | | …and use it where possible.
* loginctl: report tty in session listingsZbigniew Jędrzejewski-Szmek2017-07-05
| | | | | | | | | | | | | | | Without the tty it's really hard to tell which session is which. New output: $ ./loginctl SESSION UID USER SEAT TTY 13 1002 zbyszek seat0 tty3 c1 42 gdm seat0 /dev/tty1 11 1002 zbyszek seat0 tty4 3 1002 zbyszek seat0 /dev/tty2 17 1002 zbyszek seat0 tty5 18 1002 zbyszek seat0 tty6 6 sessions listed.
* loginctl: drop casts in printfZbigniew Jędrzejewski-Szmek2017-07-05
|
* Prep v231.2: Apply some minor style fixesSven Eden2017-06-19
|
* Prep v231: Add missing line breaks in loginctl help textSven Eden2017-06-16
|
* Prep v231: Move elogind specific code in login/loginctl.c to login/eloginctl.cSven Eden2017-06-16
|
* systemctl: make sure we terminate the bus connection first, and then close ↵Lennart Poettering2017-06-16
| | | | | | | | | | | | | | | | the pager (#3550) If "systemctl -H" is used, let's make sure we first terminate the bus connection, and only then close the pager. If done in this order ssh will get an EOF on stdin (as we speak D-Bus through ssh's stdin/stdout), and then terminate. This makes sure the standard error we were invoked on is released by ssh, and only that makes sure we don't deadlock on the pager which waits for all clients closing its input pipe. (Similar fixes for the various other xyzctl tools that support both pagers and -H) Fixes: #3543
* sd-bus: make sure bus_map_all_properties() handle booleans rightLennart Poettering2017-06-16
| | | | | | | | | | sd-bus generally exposes bools as "int" instead of "bool" in the public API. This is relevant when unmarshaling booleans, as the relevant functions expect an int* pointer and no bool* pointer. Since sizeof(bool) is not necessarily the same as sizeof(int) this is problematic and might result in memory corruption. Let's fix this, and make sure bus_map_all_properties() handles booleans as ints, as the rest of sd-bus, and make all users of it expect the right thing.
* Prep v230: Update loginctl help textSven Eden2017-06-16
|
* Prep v230: No longer print double messages when shutting down or rebooting.Sven Eden2017-06-16
|
* Prep v230: Add support for scheduled shutdown/reboot and the cancellation of ↵Sven Eden2017-06-16
| | | | them.
* Prep v230: Apply missing upstream fixes and updates (6/8) src/login.Sven Eden2017-06-16
|
* loginctl: add --value optionZbigniew Jędrzejewski-Szmek2017-06-16
|
* systemctl: add --value optionZbigniew Jędrzejewski-Szmek2017-06-16
| | | | | | | | | | With this option, systemctl will only print the rhs in show: $ systemctl show -p Wants,After elogind-journald --value elogind-journald.socket ... elogind-journald-dev-log.socket ... This is useful in scripts, because the need to call awk or similar is removed.
* Prep v229: Add missing fixes from upstream [4/6] src/loginSven Eden2017-05-17
|
* Prep v228: Condense elogind source masks (4/5)Sven Eden2017-04-26
|
* Prep v228: Add remaining updates from upstream (3/3)Sven Eden2017-04-26
| | | | | Apply remaining fixes and the performed move of utility functions into their own foo-util.[hc] files on the rest of elogind.
* Prep v227: Removed src/shared/cgroup-show.[hc], it is not needed.Sven Eden2017-04-10
|
* [4/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* loginctl: print nontrivial properties in logictl show-*Lukas Nykryn2017-03-29
|
* Rename ELOGIND_CGROUP_CONTROLLER back to SYSTEMD_CGROUP_CONTROLLERSven Eden2017-03-14
| | | | | Although it is nice to have it read ELOGIND instead of SYSTEMD, all diffs just show too many irrelevant (false) positives.
* Add support for building elogind against musl libcSven Eden2017-03-14
| | | | | | | | | | | | | | | | | | | * Check whether printf.h is available and define/undef HAVE_PRINTF_H accordingly. * Added src/shared/parse-printf-format.[hc] by Emil Renner Berthing <systemd@esmil.dk> that provides parse_printf_format() if printf.h is unavailable * Added src/basic/musl_missing.h by Juergen Buchmueller <pullmoll@t-online.de> that implements glibc functions missing in musl libc as macros. * Extended src/basic/musl_missing.h and added src/basic/musl_missing.c providing - program_invocation_name - program_invocation_short_name and - elogind_set_program_name() to set the two where appropriate. * Added calls to elogind_set_program_name() to all main() functions where needed. * A few other fixes to work nicely with musl libc.