Revision 5f5aa745

b/lib/constants.py
240 240
LUXI_OVERRIDE = "FORCE_LUXI_SOCKET"
241 241
LUXI_OVERRIDE_MASTER = "master"
242 242
LUXI_OVERRIDE_QUERY = "query"
243
LUXI_SOCKET_PERMS = 0660
243 244

  
244 245
# one of "no", "yes", "only"
245 246
SYSLOG_USAGE = _autoconf.SYSLOG_USAGE
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