mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
Set owner of /var/run/utmp to root:utmp
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
ba9c897e83
commit
0fc7654a83
4 files changed
+16
No files matched your search
@@ -17,6 +17,8 @@
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#include <grp.h>
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
/*
|
||||
@@ -157,6 +159,16 @@ int run_parts(char *dir, ...)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getgroup(char *s)
|
||||
{
|
||||
struct group *grp;
|
||||
|
||||
if ((grp = getgrnam(s)) == NULL)
|
||||
return -1;
|
||||
|
||||
return grp->gr_gid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Other convenience functions
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user