Revision e455a3e8

b/daemons/daemon-util.in
82 82
      echo "@GNTMASTERUSER@:@GNTMASTERDGROUP@"
83 83
      ;;
84 84
    confd)
85
      echo "@GNTCONFDUSER@:@GNTDAEMONSGROUP@"
85
      echo "@GNTCONFDUSER@:@GNTCONFDGROUP@"
86 86
      ;;
87 87
    luxid)
88 88
      echo "@GNTLUXIDUSER@:@GNTLUXIDGROUP@"
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

  
b/src/Ganeti/Query/Server.hs
249 249
  socket_path <- Path.defaultQuerySocket
250 250
  cleanupSocket socket_path
251 251
  s <- describeError "binding to the Luxi socket"
252
         Nothing (Just socket_path) $ getServer socket_path
252
         Nothing (Just socket_path) $ getServer True socket_path
253 253
  cref <- newIORef (Bad "Configuration not yet loaded")
254 254
  return (socket_path, s, cref)
255 255

  
b/test/hs/Test/Ganeti/Luxi.hs
126 126
  -- we need to create the server first, otherwise (if we do it in the
127 127
  -- forked thread) the client could try to connect to it before it's
128 128
  -- ready
129
  server <- run $ Luxi.getServer fpath
129
  server <- run $ Luxi.getServer False fpath
130 130
  -- fork the server responder
131 131
  _ <- run . forkIO $
132 132
    bracket

Also available in: Unified diff