Commit Graph
352310 Commits
Author SHA1 Message Date
Maximilian Bosch f5b67f3b27 nixos/sudo: fix test for 1.9.9
The test failed with

> Test "test5 user should not be able to run commands under root" failed with
> error: "invalid literal for int() with base 10: ''"

since 2492da88ea.

The reason for this is that `sudo(8)` writes the lecture to the
tty[1] and only as a fallback to stdout[2]. This means that the
`base64 --wrap 0` executed by `machine.execute()` doesn't affect the
text written to the terminal, however the lecture is part of the string
that's read from the VM via `shell.recv()`.

I confirmed the problem in an interactive test session[3]:

    >>> command = "sudo -u test5 sudo -n -u root true"
    >>> out_command = f"( set -euo pipefail; {command} ) | (base64 --wrap 0; echo)\n"
    >>> machine.shell.send(out_command.encode())
    84

    >>> machine # [   99.015512] sudo[877]:     root : TTY=hvc0 ; PWD=/tmp ; USER=test5 ; COMMAND=/run/wrappers/bin/sudo -n -u root true
    machine # [   99.019373] sudo[877]: pam_unix(sudo:session): session opened for user test5(uid=1005) by (uid=0)
    machine # [   99.038692] sudo[879]: pam_unix(sudo:auth): conversation failed
    machine # sudo: a password is required
    machine # [   99.041860] sudo[879]: pam_unix(sudo:auth): auth could not identify password for [test5]
    machine # [   99.046901] sudo[877]: pam_unix(sudo:session): session closed for user test5
    >>>
    >>> x=machine._next_newline_closed_block_from_shell()
    >>> print(x)
    <newline>
    We trust you have received the usual lecture from the local System
    Administrator. It usually boils down to these three things:
    <newline>
        #1) Respect the privacy of others.
        #2) Think before you type.
        #3) With great power comes great responsibility.
    <newline>
    <newline>
    <newline>
    >>>

Since the lecture isn't strictly necessary to confirm that
`security.sudo` works as expected, I decided to disable lecturing
inside the test, however we may want to fix the underlying problem in
the test-driver at some point.

[1] https://github.com/sudo-project/sudo/blob/SUDO_1_9_9/plugins/sudoers/check.c#L275-L283
[2] https://github.com/sudo-project/sudo/blob/SUDO_1_9_9/src/conversation.c#L95-L120
[3] I replaced each empty line with `<newline>` to make sure these
    aren't swallowed by git.
2022-02-01 12:55:29 +01:00
Fabian Affolter 3eb045139a python3Packages.types-requests: 2.27.6 -> 2.27.8 2022-02-01 12:52:32 +01:00
zowoq 93a89cfa3f fuse-overlayfs: 1.8.1 -> 1.8.2
https://github.com/containers/fuse-overlayfs/releases/tag/v1.8.2
2022-02-01 21:31:06 +10:00
xrelkd e6ebd298ce mdbook-mermaid: 0.8.3 -> 0.9.0 2022-02-01 19:13:42 +08:00
Timo KaufmannandGitHub c395fe1e8f Merge pull request #156706 from Luflosi/i2pd-remove-script
nixos/i2pd: get rid of unnecessary shell script
2022-02-01 11:52:02 +01:00
Felix Buehler 919e13c238 teensyduino: 1.55 - > 1.56 2022-02-01 11:39:25 +01:00
Thomas Gerbetandzowoq fabcd012ee cosign: 1.5.0 -> 1.5.1
https://github.com/sigstore/cosign/releases/tag/v1.5.1
2022-02-01 20:34:48 +10:00
zowoq 3e3bf12416 dbmate: update vendorSha256 2022-02-01 20:07:26 +10:00
zowoq 550b235c9c air: update vendorSha256 2022-02-01 20:07:26 +10:00
zowoq eb294649b9 nerdctl: 0.16.0 -> 0.16.1
https://github.com/containerd/nerdctl/releases/tag/v0.16.1
2022-02-01 19:51:06 +10:00
Marius DAVIDandmarius david d25d9f988e ffmpeg: add openh264 2022-02-01 10:44:54 +01:00
Marius DAVIDandmarius david 4a50af42ab ffmpeg-full: fix windows compilation 2022-02-01 10:41:37 +01:00
Marius DAVIDandmarius david cedddfb41f openh264: fix compilation for windows 2022-02-01 10:41:37 +01:00
Marius DAVIDandmarius david 3cd7ed9ca9 glib: fix windows compilation 2022-02-01 10:41:37 +01:00
Marius DAVIDandmarius david d398bdde95 gettext: fix windows cross compilation 2022-02-01 10:41:36 +01:00
marius david 293c55472a binutils: fix windres not finding the apprioate cross compiler 2022-02-01 10:41:36 +01:00
Max Hille 45b5eaf288 android-studio-stable: 2020.3.1.26 -> 2021.1.1.20 2022-02-01 10:33:13 +01:00
Pavol RusnakandGitHub 466028532d Merge pull request #157608 from TredwellGit/electron
Update Electron
2022-02-01 10:21:24 +01:00
Pavol RusnakandGitHub 4777b75d67 Merge pull request #157594 from mdlayher/mdl-corerad
corerad: 0.3.4 -> 1.0.0
2022-02-01 10:20:48 +01:00
xrelkd a8b2649149 just: 0.10.5 -> 0.10.7 2022-02-01 16:58:08 +08:00
Maximilian BoschandGitHub 886845715a Merge pull request #157615 from Ma27/bump-gitea
gitea: 1.15.10 -> 1.16.0
2022-02-01 09:55:28 +01:00
Bobby RongandGitHub 01ad76f157 Merge pull request #157659 from kradalby/headscale-pkg-maintainer
headscale: Add kradalby as maintainer
2022-02-01 16:53:44 +08:00
Bobby RongandGitHub 8eebd34ca3 Merge pull request #157527 from bbigras/kopia
kopia: 0.10.2 -> 0.10.3
2022-02-01 16:51:03 +08:00
Michele Guerini RoccoandGitHub 16694a4f0d Merge pull request #157652 from K900/fix-152372-fallout
Fix a few things after #152372
2022-02-01 09:50:27 +01:00
Elis HirwingandGitHub f8516d36e0 Merge pull request #157578 from aanderse/sqlsrv
php.extensions.sqlsrv: 5.9.0 -> 5.10.0
2022-02-01 09:40:50 +01:00
Bobby RongandGitHub 38d50e7991 Merge pull request #157531 from toastal/toastal-matrix
maintainers: add matrix for toastal
2022-02-01 16:39:00 +08:00
Bobby RongandGitHub e0d437af8a Merge pull request #157557 from gordiasdot/patch-2
got: change package platforms to linux
2022-02-01 16:37:48 +08:00
Bobby RongandGitHub 71828b9865 Merge pull request #157534 from 06kellyjac/tektoncd-cli
tektoncd-cli: 0.20.0 -> 0.21.0
2022-02-01 16:37:09 +08:00
Kristoffer Dalby 3543d229c5 headscale: Add kradalby as maintainer 2022-02-01 08:29:58 +00:00
xrelkd 5bd0ee00b8 convco: 0.3.3 -> 0.3.8 2022-02-01 16:24:36 +08:00
Rafael Fernández Lópezandzowoq 91e5176566 otpauth: 0.4.0 -> 0.4.2 2022-02-01 18:12:44 +10:00
Jaka HudoklinandGitHub 282b130514 Merge pull request #156906 from Sciencentistguy/darwin-thc-hydra
thc-hydra: fix build on darwin
2022-02-01 09:07:10 +01:00
zowoq b10dc967b6 utahfs: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq d76465661f aws-lambda-rie: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq b50023443b goofys: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq 74e5bf97b4 yajsv: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq ae5c3e1831 textql: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq 555291e05d vouch-proxy: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq 8cd425836e spruce: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq af9f85dde9 sampler: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq 97adab03fb mycorrhiza: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq 0fe62b9984 k2tf: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq b6b61477b9 obfs4: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq f3af30f2d5 gron: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq c4484815cc godu: pin to go_1_16 2022-02-01 17:43:02 +10:00
zowoq 2df69394db subfinder: update vendorSha256 2022-02-01 17:20:04 +10:00
zowoq 296d999e7a stripe-cli: update vendorSha256 2022-02-01 17:20:04 +10:00
zowoq 0de459083c stern: update vendorSha256 2022-02-01 17:20:04 +10:00
zowoq ab7ae50ce7 steampipe: update vendorSha256 2022-02-01 17:20:04 +10:00
zowoq a92cc53bf2 spire: update vendorSha256 2022-02-01 17:20:04 +10:00