On Fri, Jul 12, 2013 at 06:16:21PM +0200, Michele Tartara wrote:
> Commit 91525dee856951ace940c78b6254a1c7344b4803 fixed Issue 477 but broke
> "gnt-cluster info".
>
> This commit offers a solution to both problems, by changing the permission
> of the socket instead of changing the permission the confd process is run
> with.
>
> Signed-off-by: Michele Tartara <[email protected]>
> ---
> daemons/daemon-util.in | 2 +-
> src/Ganeti/Luxi.hs | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
> index 2b3d24d..2bb0b9d 100644
> --- a/daemons/daemon-util.in
> +++ b/daemons/daemon-util.in
> @@ -80,7 +80,7 @@ _daemon_usergroup() {
> echo "@GNTMASTERUSER@:@GNTMASTERDGROUP@"
> ;;
> confd)
> - echo "@GNTCONFDUSER@:@GNTDAEMONSGROUP@"
> + echo "@GNTCONFDUSER@:@GNTCONFDGROUP@"
> ;;
> rapi)
> echo "@GNTRAPIUSER@:@GNTRAPIGROUP@"
> diff --git a/src/Ganeti/Luxi.hs b/src/Ganeti/Luxi.hs
> index 9e5b337..4ac2e24 100644
> --- a/src/Ganeti/Luxi.hs
> +++ b/src/Ganeti/Luxi.hs
> @@ -79,6 +79,7 @@ import Ganeti.OpCodes
> import qualified Ganeti.Query.Language as Qlang
> import Ganeti.THH
> import Ganeti.Types
> +import Ganeti.Utils
>
> -- * Utility functions
>
> @@ -222,6 +223,7 @@ getServer path = do
> s <- S.socket S.AF_UNIX S.Stream S.defaultProtocol
> S.bindSocket s (S.SockAddrUnix path)
> S.listen s 5 -- 5 is the max backlog
> + setOwnerAndGroupFromNames path confdUser daemonsGroup
I would move this just after the 'bind' call, before listen ('listen'
should be, conceptually, the last step I think).
LGTM then (as [email protected])
thanks,
iustin