From c1b34ef94cc4aab4b362fe4630a154f6acff490f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 14 May 2016 19:09:00 +0200 Subject: setuid foo --- custom/thinklight.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'custom/thinklight.nix') diff --git a/custom/thinklight.nix b/custom/thinklight.nix index f001f9fd..ced11d02 100644 --- a/custom/thinklight.nix +++ b/custom/thinklight.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { import Prelude hiding (readFile) import Data.List (intersperse) import Data.Maybe (fromMaybe) - import System.Posix.User (setUserID) + import System.Posix.User (setEffectiveUserID) data Mode = On | Off | Toggle | Blink deriving (Read, Show, Eq) @@ -29,7 +29,7 @@ stdenv.mkDerivation { main = do args <- getArgs let mode = if length args >= 1 then read $ head args else Toggle - setUserID 0 + setEffectiveUserID 0 sequence $ map (\g -> catchIOError g (\e -> if isDoesNotExistError e then return () else ioError e)) [thinklight mode] return () -- cgit v1.2.3