Revision e455a3e8 src/Ganeti/Luxi.hs

b/src/Ganeti/Luxi.hs
76 76
import Ganeti.JSON
77 77
import Ganeti.OpParams (pTagsObject)
78 78
import Ganeti.OpCodes
79
import Ganeti.Runtime
79 80
import qualified Ganeti.Query.Language as Qlang
80 81
import Ganeti.THH
81 82
import Ganeti.Types
83
import Ganeti.Utils
82 84

  
83 85
-- * Utility functions
84 86

  
......
222 224
  return Client { socket=h, rbuf=rf }
223 225

  
224 226
-- | Creates and returns a server endpoint.
225
getServer :: FilePath -> IO S.Socket
226
getServer path = do
227
getServer :: Bool -> FilePath -> IO S.Socket
228
getServer setOwner path = do
227 229
  s <- S.socket S.AF_UNIX S.Stream S.defaultProtocol
228 230
  S.bindSocket s (S.SockAddrUnix path)
231
  when setOwner . setOwnerAndGroupFromNames path GanetiConfd $
232
    ExtraGroup DaemonsGroup
229 233
  S.listen s 5 -- 5 is the max backlog
230 234
  return s
231 235

  

Also available in: Unified diff