summary refs log tree commit diff
path: root/pkgs/development/libraries/accountsservice
diff options
context:
space:
mode:
authorAlexander Ried <ried@mytum.de>2016-06-01 13:01:51 +0200
committerAlexander Ried <ried@mytum.de>2016-09-01 11:07:04 +0200
commit8a547ae092be11fcb7d451f7ea0fa33285915f5a (patch)
tree4aada32faa8fb87011c35d404957a40fd50d6145 /pkgs/development/libraries/accountsservice
parentef35c66fe7968916ccb86ef6194ed72f35cecf76 (diff)
downloadnixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.tar
nixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.tar.gz
nixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.tar.bz2
nixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.tar.lz
nixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.tar.xz
nixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.tar.zst
nixpkgs-8a547ae092be11fcb7d451f7ea0fa33285915f5a.zip
accountsservice: add nixbld* to blacklist
Diffstat (limited to 'pkgs/development/libraries/accountsservice')
-rw-r--r--pkgs/development/libraries/accountsservice/Add-nixbld-to-user-blacklist.patch27
-rw-r--r--pkgs/development/libraries/accountsservice/default.nix7
2 files changed, 32 insertions, 2 deletions
diff --git a/pkgs/development/libraries/accountsservice/Add-nixbld-to-user-blacklist.patch b/pkgs/development/libraries/accountsservice/Add-nixbld-to-user-blacklist.patch
new file mode 100644
index 00000000000..f5d9e569502
--- /dev/null
+++ b/pkgs/development/libraries/accountsservice/Add-nixbld-to-user-blacklist.patch
@@ -0,0 +1,27 @@
+From e069102365a9ff03822667f435e662f938e8d768 Mon Sep 17 00:00:00 2001
+From: Alexander Ried <ried@mytum.de>
+Date: Wed, 1 Jun 2016 12:49:48 +0200
+Subject: [PATCH] Add nixbld* to user blacklist
+
+---
+ src/user-classify.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/user-classify.c b/src/user-classify.c
+index 69e6809..0e152b6 100644
+--- a/src/user-classify.c
++++ b/src/user-classify.c
+@@ -75,6 +75,10 @@ user_classify_is_blacklisted (const char *username)
+                 return TRUE;
+         }
+ 
++        if (g_str_has_prefix (username, "nixbld")) {
++                return TRUE;
++        }
++
+         return FALSE;
+ }
+ 
+-- 
+2.7.4
+
diff --git a/pkgs/development/libraries/accountsservice/default.nix b/pkgs/development/libraries/accountsservice/default.nix
index 97b15f1ef28..4e19c880dd4 100644
--- a/pkgs/development/libraries/accountsservice/default.nix
+++ b/pkgs/development/libraries/accountsservice/default.nix
@@ -20,8 +20,11 @@ stdenv.mkDerivation rec {
     substituteInPlace src/user.c --replace '"/usr/sbin/' '"/run/current-system/sw/sbin/' --replace '"/usr/bin/' '"/run/current-system/sw/bin' --replace '"/bin/cat"' '"/run/current-system/sw/bin/cat"'
   '';
 
-  patches = [ ./no-create-dirs.patch ];
-  
+  patches = [
+    ./no-create-dirs.patch
+    ./Add-nixbld-to-user-blacklist.patch
+  ];
+
   preFixup = ''
     wrapProgram "$out/libexec/accounts-daemon" \
       --run "${coreutils}/bin/mkdir -p /var/lib/AccountsService/users" \