Revision 5f5aa745 src/Ganeti/Luxi.hs

b/src/Ganeti/Luxi.hs
67 67
import System.Directory (removeFile)
68 68
import System.IO (hClose, hFlush, hWaitForInput, Handle, IOMode(..))
69 69
import System.IO.Error (isEOFError)
70
import System.Posix.Files
70 71
import System.Timeout
71 72
import qualified Network.Socket as S
72 73

  
......
228 229
getServer setOwner path = do
229 230
  s <- S.socket S.AF_UNIX S.Stream S.defaultProtocol
230 231
  S.bindSocket s (S.SockAddrUnix path)
231
  when setOwner . setOwnerAndGroupFromNames path GanetiLuxid $
232
    ExtraGroup DaemonsGroup
232
  when setOwner $ do
233
    setOwnerAndGroupFromNames path GanetiLuxid $ ExtraGroup DaemonsGroup
234
    setFileMode path $ fromIntegral luxiSocketPerms
233 235
  S.listen s 5 -- 5 is the max backlog
234 236
  return s
235 237

  

Also available in: Unified diff