Commit Graph

229 Commits

Author SHA1 Message Date
Kenny Levinsen
b42e4714b0 rustfmt: Change merge_imports to imports_granularity 2021-08-02 22:01:13 +02:00
Kenny Levinsen
d5b7d81342 docs: Fix scdoc syntax for greetd.5 2021-08-02 21:59:15 +02:00
Antoine POPINEAU
5201469e39 Ensure initial session is only run once.
Security concerns were raised regarding the initial session being
executed whenever greetd was restarted (when signing out of one's DE,
when greetd or a greeter restarted or crashed, ...).

This creates a runfile (by default at /run/greetd.run) either when the
initial session is executed or when a greeter is started. Whenever this
file exists, the initial session is ignored (and the configured greeter
is always run).
2021-07-29 19:25:51 +02:00
cinerea0
41c6b5f1d4 Add makefile for man pages 2021-07-29 19:20:32 +02:00
Eli Schwartz
f89d80a2f6 recommend making config world readable rather than setting owner
There is no secret material that needs to be unreadable except to the
daemon, but if there were, the current instructions never recommended
setting a locked down mode.

The daemon doesn't need write access either.

Recommending chown rather than making the config world readable as is
typical for bog standard system configs, is confusing and inconsistent
with e.g. the in house AUR packaging. It also might be erroneously
interpreted as a requirement, which is challenging for packaging systems
that don't support distributing files/directories owned by non-root
users.
2021-07-06 22:20:39 +02:00
Kenny Levinsen
e069f5ac4d readme: Add discuss section 2021-05-19 17:38:54 +02:00
Kenny Levinsen
47d0ee939e Update lock file 2021-01-18 20:14:17 +01:00
Aleksei Bavshin
e5a598298a deps: update nix and other dependencies
`fork` is now marked as unsafe (nix-rust/nix#1030)
2021-01-18 20:10:02 +01:00
Aleksei Bavshin
eef821c68b deps: update tokio to 1.0 2021-01-18 20:10:02 +01:00
Kenny Levinsen
b25b72ae51 ci: Disable automatic github mirroring 2020-12-22 12:29:48 +01:00
Kenny Levinsen
c0887255db docs: Document new general section 2020-11-16 14:38:30 +01:00
Kenny Levinsen
ef33843492 config: Fix tests for general section 2020-11-16 14:37:49 +01:00
Kenny Levinsen
8fea33c476 config: Add general.source_profile
This adds a system-wide toggle for whether the system profile should be
sourced by /bin/sh before running the command. Note that the command
will still be run with /bin/sh, regardless of profile sourcing.

The option defaults to true for now.

Example usage:

	[general]
	source_profile = false
2020-11-15 17:43:29 +01:00
Aleksei Bavshin
4c2a2e89d4 Use additional pam service config for greeter
Check the existence and attempt to use `greetd-greeter` pam service file
for greeter sessions. The fallback is a standard greetd pam service,
i.e. `greetd` or `login`.

Rationale: proper configurations for different session types can vary in
acceptable modules. Certain modules like `pam_selinux` are actually
harmful for an unprivileged greeter session as it removes the SELinux
security label from the greeter processes.
2020-10-21 00:38:12 +02:00
Kenny Levinsen
0d8812c80b config: Skip reading config in session worker
The decision to start a session worker or main process is taken after
the config module has been queried. This means that the regular process
for loading config files is also run. This can lead to errors if the
config file is not in the default location, as the session worker does
not receive the config argument.

Skip reading config files if the session-worker flag is set.
2020-10-13 18:55:46 +02:00
Kenny Levinsen
3dccaa44c7 Use stdin as VT for current/none vt selections
The controlling tty will now be obtained from stdin if possible for
current/non, which is useful for inittab setups and shell test
use-cases.
2020-09-08 17:57:34 +02:00
Kenny Levinsen
c71b83eca7 Terminate cleanly on SIGINT 2020-07-10 18:27:29 +02:00
Kenny Levinsen
1a263c94e6 Use per-pid socket paths
Use of per-pid socket paths allows multiple greetd instances to be
started without accidentally trampling on eachothers' socket paths.

This has the added benefit of rendering the socket-path configuration
unnecessary.

Delete the listener on Drop for cleanup.
2020-07-10 18:27:25 +02:00
Kirill Chibisov
d4664b4061 Add installation instructions on Gentoo 2020-07-08 14:38:23 +02:00
Antoine POPINEAU
edf7936400 greetd: Added tuigreet to known greeters list. 2020-06-28 18:11:36 +02:00
Robert Günzler
117eb7207e Make sure to require codec in tokio-codec feature 2020-06-01 00:33:01 +02:00
Kenny Levinsen
d602dd10df ci: Build both arch and alpine 2020-05-22 02:19:01 +02:00
Kenny Levinsen
48ed39e701 session: Do not log pam_conv after start
This error caused annoying issues when the main process did not have a
terminal attached.
2020-05-22 02:00:08 +02:00
Kenny Levinsen
69d5bb7915 terminal: Forcibly take terminal
In some setups, the main greetd process might be holding the controlling
terminal. Take it by force.
2020-05-22 02:00:08 +02:00
Kenny Levinsen
c67f1670a8 worker: Unconditionally set up tty
Even if we do not need to switch VT, we still need to connect the
process to the TTY.
2020-05-22 02:00:08 +02:00
Kenny Levinsen
794fbe8f28 terminal: Use direct open, proper errors 2020-05-22 01:42:11 +02:00
Kenny Levinsen
c9a2ce68a4 ci: Add lockfile check 2020-05-16 18:18:22 +02:00
Kenny Levinsen
760eceb517 Update lock file 2020-05-16 18:17:53 +02:00
Kenny Levinsen
efba21f192 Bump version number to 0.6.0 2020-05-16 17:18:49 +02:00
Kenny Levinsen
1086f1a2af config: New default location 2020-05-16 17:14:38 +02:00
Kenny Levinsen
b3bfd6509c Update dependencies 2020-05-15 23:41:13 +02:00
Kenny Levinsen
4552b525f1 Unify nix dependencies 2020-05-15 20:55:11 +02:00
Kenny Levinsen
65320498be Share inish with agreety, kill last rust-ini use
This removes several dependencies, and results in a compile task
decrease from 88 to 66 units.
2020-05-15 20:50:12 +02:00
Kenny Levinsen
391a3069d5 greetd_ipc: Split codecs into separate files 2020-05-07 01:48:21 +02:00
Kenny Levinsen
04b9ab2367 config: Replace rust-ini
This cuts binary size by around 30KiB on my local release builds.
2020-05-07 01:48:21 +02:00
Andreas Gerlach
c7068fe8fd pam: Change i8 to c_char for portability 2020-04-29 12:40:21 +02:00
Kenny Levinsen
659d51790f fakegreet: cargo clippy and fmt 2020-04-29 11:11:45 +02:00
Kenny Levinsen
6bcf82ad56 fakegreet: Dummy greetd backend 2020-04-14 03:16:12 +02:00
Kenny Levinsen
30135abc35 ci: Enable tests 2020-04-04 17:24:27 +02:00
Kenny Levinsen
4c0f5fd051 agreety: Post None answer on Info/Error 2020-04-04 17:14:40 +02:00
Kenny Levinsen
0c74e046ca greetd_ipc: Add codec examples 2020-04-04 17:13:51 +02:00
Kenny Levinsen
e8cac7c56f config: Fix initial_session issue, add tests 2020-04-04 16:20:59 +02:00
Kenny Levinsen
3b96a2394c cargo clippy 2020-04-04 04:21:16 +02:00
Kenny Levinsen
4656bf27dc config: Simplify a bit 2020-04-04 04:18:37 +02:00
Kenny Levinsen
8a768fe5ee Minor dependency cleanup 2020-04-04 04:14:15 +02:00
Kenny Levinsen
654ca2157c config: Swap toml for ini
They look alike, but we really have no use for toml. Swapping it for
manual decoding with rust-ini ends up making the code simpler, and cuts
binary size with >100KiB on my local release builds.

ini also allows us to have quote-free strings, which look more correct
for enums.
2020-04-04 04:14:15 +02:00
Kenny Levinsen
17a9397661 Remove unused dependency 2020-04-03 18:02:20 +02:00
Kenny Levinsen
7b8d8abffc greetd_ipc: Doc improvements 2020-04-02 22:34:09 +02:00
Kenny Levinsen
bfc3a3cdfb Update Cargo.lock 2020-04-02 22:22:21 +02:00
Kenny Levinsen
62f159edb1 docs: Make docs.rs build all features 2020-04-02 15:20:11 +02:00