Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trousers: 0.3.14 -> 0.3.15 #110897

Merged
merged 1 commit into from
Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ diff -ur trousers-0.3.11.2.orig/src/tcsd/tcsd_conf.c trousers-0.3.11.2/src/tcsd/

+#ifndef ALLOW_NON_TSS_CONFIG_FILE
/* make sure user/group TSS owns the conf file */
if (pw->pw_uid != stat_buf.st_uid || grp->gr_gid != stat_buf.st_gid) {
if (stat_buf.st_uid != 0 || grp->gr_gid != stat_buf.st_gid) {
LogError("TCSD config file (%s) must be user/group %s/%s", tcsd_config_file,
@@ -775,6 +776,7 @@
LogError("TCSD config file (%s) must be mode 0600", tcsd_config_file);
LogError("TCSD config file (%s) must be mode 0640", tcsd_config_file);
Comment on lines 8 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should be upstreamed, there's nothing nixos specific

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.
It looks like it's this way since the introduction of the package in nixpkgs (#2129). Maybe @alexanderkjeldaas knows why the patch has not been upstreamed?

This probably should be not a blocker to pull in the fixes for the security issues though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is exposed in a module, we can align the user so that it's the same when being used.

return TCSERR(TSS_E_INTERNAL_ERROR);
}
+#endif
Expand Down
10 changes: 4 additions & 6 deletions pkgs/tools/security/trousers/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{ lib, stdenv, fetchurl, openssl, pkg-config }:
{ lib, stdenv, fetchurl, openssl, pkg-config, autoreconfHook }:

stdenv.mkDerivation rec {
pname = "trousers";
version = "0.3.14";
version = "0.3.15";

src = fetchurl {
url = "mirror://sourceforge/trousers/trousers/${version}/${pname}-${version}.tar.gz";
sha256 = "0iwgsbrbb7nfqgl61x8aailwxm8akxh9gkcwxhsvf50x4qx72l6f";
sha256 = "0zy7r9cnr2gvwr2fb1q4fc5xnvx405ymcbrdv7qsqwl3a4zfjnqy";
};

sourceRoot = ".";

nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ openssl ];

patches = [ ./allow-non-tss-config-file-owner.patch ];
Expand Down