summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-27 14:18:26 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-29 13:05:28 +0200
commitc5ddb7dd56d9eb71cbe0430bcf85596d298caef8 (patch)
tree8e73568ce2758af4f217637c9b257d5ed9f15650 /pkgs/build-support/trivial-builders.nix
parent030e20f759d5a4e4962eabd4069fd06ae059e6f3 (diff)
downloadnixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.tar
nixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.tar.gz
nixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.tar.bz2
nixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.tar.lz
nixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.tar.xz
nixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.tar.zst
nixlib-c5ddb7dd56d9eb71cbe0430bcf85596d298caef8.zip
Move useSetUID to pam_usb, the only place where it's used
Diffstat (limited to 'pkgs/build-support/trivial-builders.nix')
-rw-r--r--pkgs/build-support/trivial-builders.nix26
1 files changed, 0 insertions, 26 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index 692ac685d62d..398426bf9a48 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -148,32 +148,6 @@ rec {
     };
 
 
-  # Search in the environment if the same program exists with a set uid or
-  # set gid bit.  If it exists, run the first program found, otherwise run
-  # the default binary.
-  useSetUID = drv: path:
-    let
-      name = baseNameOf path;
-      bin = "${drv}${path}";
-    in assert name != "";
-      writeScript "setUID-${name}" ''
-        #!${stdenv.shell}
-        inode=$(stat -Lc %i ${bin})
-        for file in $(type -ap ${name}); do
-          case $(stat -Lc %a $file) in
-            ([2-7][0-7][0-7][0-7])
-              if test -r "$file".real; then
-                orig=$(cat "$file".real)
-                if test $inode = $(stat -Lc %i "$orig"); then
-                  exec "$file" "$@"
-                fi
-              fi;;
-          esac
-        done
-        exec ${bin} "$@"
-      '';
-
-
   # Copy a path to the Nix store.
   # Nix automatically copies files to the store before stringifying paths.
   # If you need the store path of a file, ${copyPathToStore <path>} can be