Revision 129bde01 src/Ganeti/Utils.hs
b/src/Ganeti/Utils.hs | ||
---|---|---|
525 | 525 |
setOwnerAndGroupFromNames filename daemon dGroup = do |
526 | 526 |
-- TODO: it would be nice to rework this (or getEnts) so that runtimeEnts |
527 | 527 |
-- is read only once per daemon startup, and then cached for further usage. |
528 |
runtimeEnts <- getEnts |
|
528 |
runtimeEnts <- runResultT getEnts
|
|
529 | 529 |
ents <- exitIfBad "Can't find required user/groups" runtimeEnts |
530 | 530 |
-- note: we use directly ! as lookup failures shouldn't happen, due |
531 | 531 |
-- to the map construction |
532 |
let uid = fst ents M.! daemon
|
|
533 |
let gid = snd ents M.! dGroup
|
|
532 |
let uid = reUserToUid ents M.! daemon
|
|
533 |
let gid = reGroupToGid ents M.! dGroup
|
|
534 | 534 |
setOwnerAndGroup filename uid gid |
535 | 535 |
|
536 | 536 |
-- | Resets permissions so that the owner can read/write and the group only |
Also available in: Unified diff