Commit Graph

9 Commits

Author SHA1 Message Date
techknowlogick
4dc1282071
gitea: 1.22.1 -> 1.22.2
Diff: https://github.com/go-gitea/gitea/compare/v1.22.1...1.22.2
2024-09-10 01:17:44 +02:00
Maximilian Bosch
b39569222b
gitea: drop PAM support
Strongly inspired by the forgejo counterpart[1], for the following
reasons:

* The feature is broken with the current module and crashes on
  authentication with the following stacktrace (with a PAM service
  `gitea` added):

      server # Stack trace of thread 1008:
      server # #0  0x00007f3116917dfb __nptl_setxid (libc.so.6 + 0x8ddfb)
      server # #1  0x00007f3116980ae6 setuid (libc.so.6 + 0xf6ae6)
      server # #2  0x00007f30cc80f420 _unix_run_helper_binary (pam_unix.so + 0x5420)
      server # #3  0x00007f30cc8108c9 _unix_verify_password (pam_unix.so + 0x68c9)
      server # #4  0x00007f30cc80e1b5 pam_sm_authenticate (pam_unix.so + 0x41b5)
      server # #5  0x00007f3116a84e5b _pam_dispatch (libpam.so.0 + 0x3e5b)
      server # #6  0x00007f3116a846a3 pam_authenticate (libpam.so.0 + 0x36a3)
      server # #7  0x00000000029b1e7a n/a (.gitea-wrapped + 0x25b1e7a)
      server # #8  0x000000000047c7e4 n/a (.gitea-wrapped + 0x7c7e4)
      server # ELF object binary architecture: AMD x86-64
      server #
      server # [   42.420827] gitea[897]: pam_unix(gitea:auth): unix_chkpwd abnormal exit: 159
      server # [   42.423142] gitea[897]: pam_unix(gitea:auth): authentication failure; logname= uid=998 euid=998 tty= ruser= rhost=  user=snenskek

  It only worked after turning off multiple sandbox settings and adding
  `shadow` as supplementary group to `gitea.service`.

  I'm not willing to maintain additional multiple sandbox settings for
  different features, especially given that it was probably not used for
  quite a long time:

  * There was no PR or bugreport about sandboxing issues related to
    PAM.

  * Ever since the module exists, it used the user `gitea`, i.e. it had
    never read-access to `/etc/shadow`.

* Upstream has it disabled by default[2].

If somebody really needs it, it can still be brought back by an overlay
updating `tags` accordingly and modifying the systemd service config.

[1] 07641a91c9
[2] https://docs.gitea.com/usage/authentication#pam-pluggable-authentication-module
2024-08-24 13:40:58 +02:00
Motiejus Jakštys
1bd350449a gitea: fix passthru.data-compressed
Fixes two bugs:
- pass a forgotten `{}` to `compressDrv`.
- remove incorrect usage of `lndir` in `compressDrv`. I added a brief
  comment on why, see [this comment][1] for more details.

Tested with:

```
$ nix build .#legacyPackages.x86_64-linux.gitea.passthru.data-compressed
$ ls -lh result/public/assets/licenses.txt*
lrwxrwxrwx 1 root root  90 Jan  1  1970 result/public/assets/licenses.txt -> /nix/store/p21irsr57hckd3x3ym18aa0cr9zmm3an-gitea-1.22.1-data/./public/assets/licenses.txt
-r--r--r-- 1 root root 30K Jan  1  1970 result/public/assets/licenses.txt.br
-r--r--r-- 1 root root 82K Jan  1  1970 result/public/assets/licenses.txt.gz
```

[1]: https://github.com/NixOS/nixpkgs/pull/332752#discussion_r1721043286
2024-08-18 22:47:03 +03:00
Motiejus Jakštys
d97365e05e gitea.passthru.data-compressed: switch to compressDrvWeb 2024-08-04 10:10:16 +03:00
techknowlogick
2802d73bee gitea: disable pamSupport on darwin 2024-07-17 15:04:22 -04:00
Sandro
e10593c057
Merge pull request #324589 from Izorkin/fix-gitea-static
gitea: fix create static compressed files
2024-07-08 00:08:48 +02:00
Izorkin
f5df37e8bb
gitea: fix create static compressed files 2024-07-05 01:46:22 +03:00
Sandro Jäckel
b42d46629b
gitea: 1.22.0 -> 1.22.1
Diff: https://github.com/go-gitea/gitea/compare/v1.22.0...v1.22.1
2024-07-04 15:40:11 +02:00
techknowlogick
fbe20f603b gitea: move to by-name 2024-06-03 11:12:02 -04:00