ganeti-htoolsSource codeContentsIndex
Ganeti.Runtime
Description
Implementation of the runtime configuration details.
Synopsis
data GanetiDaemon
= GanetiMasterd
| GanetiNoded
| GanetiRapi
| GanetiConfd
data MiscGroup
= DaemonsGroup
| AdminGroup
data GanetiGroup
= DaemonGroup GanetiDaemon
| ExtraGroup MiscGroup
type RuntimeEnts = (Map GanetiDaemon UserID, Map GanetiGroup GroupID)
daemonName :: GanetiDaemon -> String
daemonUser :: GanetiDaemon -> String
daemonGroup :: GanetiGroup -> String
daemonLogFile :: GanetiDaemon -> FilePath
daemonPidFile :: GanetiDaemon -> FilePath
allGroups :: [GanetiGroup]
ignoreDoesNotExistErrors :: IO a -> IO (Result a)
getEnts :: IO (Result RuntimeEnts)
verifyDaemonUser :: GanetiDaemon -> RuntimeEnts -> IO ()
checkUidMatch :: String -> UserID -> UserID -> IO ()
Documentation
data GanetiDaemon Source
Constructors
GanetiMasterd
GanetiNoded
GanetiRapi
GanetiConfd
data MiscGroup Source
Constructors
DaemonsGroup
AdminGroup
data GanetiGroup Source
Constructors
DaemonGroup GanetiDaemon
ExtraGroup MiscGroup
type RuntimeEnts = (Map GanetiDaemon UserID, Map GanetiGroup GroupID)Source
daemonName :: GanetiDaemon -> StringSource
Returns the daemon name for a given daemon.
daemonUser :: GanetiDaemon -> StringSource
Returns the configured user name for a daemon.
daemonGroup :: GanetiGroup -> StringSource
Returns the configured group for a daemon.
daemonLogFile :: GanetiDaemon -> FilePathSource
Returns the log file for a daemon.
daemonPidFile :: GanetiDaemon -> FilePathSource
Returns the pid file name for a daemon.
allGroups :: [GanetiGroup]Source
All groups list. A bit hacking, as we can't enforce it's complete at compile time.
ignoreDoesNotExistErrors :: IO a -> IO (Result a)Source
getEnts :: IO (Result RuntimeEnts)Source
Computes the group/user maps.
verifyDaemonUser :: GanetiDaemon -> RuntimeEnts -> IO ()Source
Checks whether a daemon runs as the right user.
checkUidMatch :: String -> UserID -> UserID -> IO ()Source
Check that two UIDs are matching or otherwise exit.
Produced by Haddock version 2.6.0