fe87187 sanlock: setup supplementary groups before daemonizing

1 file Authored by nsoffer 8 years ago, Committed by teigland 8 years ago,
1 file changed. 14 lines added. 56 lines removed.
    sanlock: setup supplementary groups before daemonizing
    
    Sanlock daemon used to setup the supplementary groups after daemonizing.
    This may be slow on overloaded machines creating a window where sanlock
    supplementary groups are empty, confusing vdsm-tool.
    
    This patch set the supplementary groups before daemonizing, so programs
    managing sanlock would wait until it the daemon is configured properly,
    eliminating the race during startup. The child process inherits the
    supplementary groups set by the parent.
    
    The complex code for setting groups was replaced with a call to
    initgroups().
    
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
    
        
file modified
+14 -56