Commit graph

34235 commits

Author SHA1 Message Date
Guillaume Girol 0e4b8a05b2 nixos/wrappers: allow setuid and setgid wrappers to run in user namespaces
In user namespaces where an unprivileged user is mapped as root and root
is unmapped, setuid bits have no effect. However setuid root
executables like mount are still usable *in the namespace* as the user
already has the required privileges. This commit detects the situation
where the wrapper gained no privileges that the parent process did not
already have and in this case does less sanity checking. In short there
is no need to be picky since the parent already can execute the foo.real
executable themselves.

Details:
man 7 user_namespaces:
   Set-user-ID and set-group-ID programs
       When a process inside a user namespace executes a set-user-ID
       (set-group-ID) program, the process's effective user (group) ID
       inside the namespace is changed to whatever value is mapped for
       the user (group) ID of the file.  However, if either the user or
       the group ID of the file has no mapping inside the namespace, the
       set-user-ID (set-group-ID) bit is silently ignored: the new
       program is executed, but the process's effective user (group) ID
       is left unchanged.  (This mirrors the semantics of executing a
       set-user-ID or set-group-ID program that resides on a filesystem
       that was mounted with the MS_NOSUID flag, as described in
       mount(2).)

The effect of the setuid bit is that the real user id is preserved and
the effective and set user ids are changed to the owner of the wrapper.
We detect that no privilege was gained by checking that euid == suid
== ruid. In this case we stop checking that euid == owner of the
wrapper file.

As a reminder here are the values of euid, ruid, suid, stat.st_uid and
stat.st_mode & S_ISUID in various cases when running a setuid 42 executable as user 1000:

Normal case:
ruid=1000 euid=42 suid=42
setuid=2048, st_uid=42

nosuid mount:
ruid=1000 euid=1000 suid=1000
setuid=2048, st_uid=42

inside unshare -rm:
ruid=0 euid=0 suid=0
setuid=2048, st_uid=65534

inside unshare -rm, on a suid mount:
ruid=0 euid=0 suid=0
setuid=2048, st_uid=65534
2023-08-09 12:00:00 +00:00
K900 db9b857e1d nixos/iso-image: fix syntax 2023-07-05 21:49:03 +03:00
Will Fancher e520c2e278
Merge pull request #240600 from lilyinstarlight/fix/luksroot-lvm-default-off
nixos/lvm: toggle initrd enable option independently of main options
2023-07-05 12:42:45 -04:00
Alexander Sieg 8d80108d6d nixos/gitlab: configure elasticsearch indexer path 2023-07-05 15:01:31 +02:00
Jan Tojnar 6bbcd65c44 gedit: Move out of GNOME
It has been moved out of GNOME core in favour of gnome-text-editor.
And it is not much of a GNOME app anymore either, using custom gtksourceview fork.
2023-07-05 14:56:27 +02:00
Yaya 71be5933cd nixos/snipe-it: Use the pinned PHP package
As 3bb3859 bumped the default PHP version to 8.2, the snipe-it package
has been pinned to PHP 8.1. This commit changes the php package used in
the module to the one pinned by snipe-it.
2023-07-05 14:47:05 +02:00
Maximilian Bosch b82c8e13c7
Merge pull request #228508 from SuperSandro2000/gitea-no-recurse
nixos/gitea: don't recursively change file owners/permissions
2023-07-05 13:56:46 +02:00
Lassulus 7e37c051c1
Merge pull request #241526 from Mic92/cloud-init 2023-07-05 13:31:27 +02:00
Jörg Thalheim 56926dda06
Merge pull request #239393 from Lassulus/iso-graphical
nixos/iso-image: make graphical grub configurable
2023-07-05 12:30:59 +01:00
Maximilian Bosch 7f0bc68c32
Merge pull request #237544 from hrdinka/fix_gitea
Revert "nixos/gitea: requires database"
2023-07-05 12:09:55 +02:00
Lily Foster 7b514d2175
nixos/lvm: toggle initrd enable option independently of main options 2023-07-05 04:59:04 -04:00
Emily 3a79936b45
Merge pull request #217536 from sephii/caddy-reload
nixos/caddy: add support for reload
2023-07-04 22:57:24 +02:00
r-vdp 9ef5b7d793 nixos/x11: change the description of the display manager service
Currently systemd prints `Starting X11 Server` in the journal, which completely
misled me into searching why my wayland system was starting an X server.
Turns out that what is started is actually the display manager,
so I think it's better to call it like that in the description.
2023-07-04 21:08:13 +02:00
Jörg Thalheim 6f404ed214 cloud-init: add xfs support 2023-07-04 19:27:18 +02:00
Alexander Sieg 8934558abf
nixos/gitlab: fix unit test result display (#241322)
After the update to GitLab 16 the puma worker needs `gzip` in it's PATH
in order to junit test results.
2023-07-04 18:57:19 +02:00
Atemu 712caf8eb1
Merge pull request #224366 from martinetd/ankisyncd-rs
ankisyncd-rs: add package for anki-sync-server-rs
2023-07-04 18:03:19 +02:00
Martin Weinelt 06f0af1f0a
firefox-esr-115-unwrapped: init at 115.0esr
The next major version of the Firefox Extended Support Release.

https://www.mozilla.org/en-US/firefox/115.0/releasenotes/
https://www.mozilla.org/en-US/security/advisories/mfsa2023-22/

Fixes: CVE-2023-3482, CVE-2023-37201, CVE-2023-37202, CVE-2023-37203
       CVE-2023-37204, CVE-2023-37205, CVE-2023-37206, CVE-2023-37207,
       CVE-2023-37208, CVE-2023-37209, CVE-2023-37210, CVE-2023-37211,
       CVE-2023-37211, CVE-2023-37212
2023-07-04 16:07:25 +02:00
Sylvain Fankhauser 27b7132e81
nixos/caddy: remove admin check
Since it introduces IFD.
2023-07-04 11:25:08 +02:00
Sylvain Fankhauser 1f0ac736b4
nixos/caddy: add support for reload 2023-07-04 11:25:05 +02:00
Pol Dellaiera 3ede00e4fa
Merge pull request #240571 from gaelreyrol/scaphandre-module-assertions
nixos/prometheus/exporters: adjust scaphandre assertions
2023-07-04 11:24:24 +02:00
Dominique Martinet fbe3e3b44e replace ankisyncd with ankisyncd-rs
- remove old ankisyncd python package
- rename new rust package so it's a drop in replacement
2023-07-04 18:14:18 +09:00
Dominique Martinet 668f528b6c nixos/ankisyncd: use ankisyncd-rs instead of the old python one
Unfortunately the config is not compatible; data itself looks like it was compatible
from an up to date python ankisyncd but I wouldn't assume anything with the older
service (which didn't work for me with either ankidroid or recent desktop version)
2023-07-04 18:14:17 +09:00
Florian Klink f338f46fff
Merge pull request #240969 from mutantmell/systemd-network-unit-util
systemd.network: move unit file generation code into a util
2023-07-04 12:02:37 +03:00
Janik 8419b512e6
Merge pull request #240189 from gmemstr/patch-1
n8n: add WEBHOOK_URL environment variable
2023-07-04 08:56:36 +02:00
Will Fancher 73a8ca1674
Merge pull request #240601 from lilyinstarlight/fix/lvm-root-sd-stage-1-unhide
nixos/*: unhide remaining systemd stage-1 options
2023-07-03 13:38:12 -04:00
Christoph Hrdinka 70cc0d412f
nixos/gitea: only require databases if createDatabase is set
Currently the database service (mysql/postgresql) is required by the
gitea service. If none of them exists on the same machine as gitea it
will refuse to start. With this change it is only required if
createDatabase was set to true.
2023-07-03 17:02:12 +02:00
Lein Matsumaru 143869247e
rtl8723bs-firmware: cleanup 2023-07-03 14:22:20 +00:00
Lily Foster e9207b0501
nixos/*: unhide remaining systemd stage-1 options
These options were missed in NixOS/nixpkgs#226237, but they all were
specifically added for systemd stage-1.
2023-07-03 08:41:38 -04:00
Janik 565fc74d28
Merge pull request #240954 from michaelshmitty/anuko-time-tracker-fixup 2023-07-03 12:29:43 +02:00
Bobby Rong dd9fcc40b7
Merge pull request #241131 from ShamrockLee/nix-daemon-gramman
nixos/nix-daemon: fix grammatical mistake in description
2023-07-03 16:41:51 +08:00
Michael Smith 65585d6c53 nixos/anuko-time-tracker: improve module options
* Remove unsafe dbinstall.php script
* Make Nginx virtualhost configurable
2023-07-03 08:39:17 +02:00
Eric Wolf ee5cc38432 lemmy: Support secret options
This commit implements #101777 by merging
the config with an external file at startup.
2023-07-03 09:12:40 +08:00
Nguyễn Gia Phong 170125ebdb nixos/ntfy.sh: require base-url setting
It is required by attachment-cache-dir whose default is provided.
2023-07-03 08:58:05 +08:00
Ryan Lahfa 9f2cff4e0a
Merge pull request #240913 from gabriel-doriath-dohler/MCHPRS 2023-07-03 01:14:24 +02:00
gabriel-doriath-dohler 04c830db01 nixos/mchprs: init module
Co-authored-by: Ryan Lahfa <masterancpp@gmail.com>
2023-07-02 23:59:59 +00:00
Emily d8c2229c49
Merge pull request #226684 from srid/patch-8
nixos/jenkins-job-builder: Fix link to documentation, use mkEnableOption
2023-07-02 19:49:17 +02:00
Sridhar Ratnakumar ac4790a84e
nixos/jenkins-job-builder: Fix link to documentation, use mkEnableOption
Co-Authored-By: emilylange <git@emilylange.de>
2023-07-02 19:07:44 +02:00
Yueh-Shun Li a899971599 nixos/nix-daemon: fix grammatical mistake in description 2023-07-02 23:27:09 +08:00
Ryan Lahfa 7672c1e9ae
Merge pull request #201907 from Tom-Hubrecht/fail2ban 2023-07-02 13:57:47 +02:00
mutantmell d51ebb6173 nixos/networkd: refactor
Reduces size of networkd module by moving unit file generation code into a util.
2023-07-01 17:17:51 -07:00
figsoda a86a7dafdf
Merge pull request #226977 from mac-chaffee/sws-module 2023-07-01 19:58:40 -04:00
Pol Dellaiera b9b176f8b8
Merge pull request #240725 from eskytthe/apachekafka-3.5.0
apacheKafka: 3.5.0, 3.4.1, 3.3.1 -> 3.3.2
2023-07-01 23:25:54 +02:00
Pol Dellaiera b9e160aef4
Merge pull request #240945 from nh2/consul-1.16.0
consul: 1.15.3 -> 1.16.0
2023-07-01 23:06:32 +02:00
Mac Chaffee 61cb4170fd
nixos/static-web-server: create module which uses upstream systemd units
This commit creates a nixos module for static-web-server.
The module uses upstream systemd units to start static-web-server.
It also includes options for configuring static-web-server.
2023-07-01 12:51:13 -04:00
Niklas Hambüchen 64ded123c6 release-notes: Mention Consul 1.16 upgrade 2023-07-01 18:36:07 +02:00
Jörg Thalheim cf2167b39e
Merge pull request #231609 from Mic92/bcachefs-tools
bcachefs-tools: unstable-2023-01-31 -> unstable-2023-05-13
2023-07-01 16:31:43 +01:00
Jörg Thalheim af57956199 nixos/test/bcachefs: fix password input 2023-07-01 17:10:11 +02:00
Jörg Thalheim 4d719f101c nixos/bcachefs: add new mount.bcachefs util 2023-07-01 17:10:10 +02:00
Niklas Hambüchen 080757c6c5 nixos/vaultwarden: Bind to localhost by default. See #100192 2023-07-01 15:35:28 +02:00
Nick Cao 99d4bf7bab
Merge pull request #218280 from thequux/set-pdns-config-dir
powerdns, pdns-recursor: find config in /etc by default
2023-07-01 20:18:22 +08:00