Let the caller log info about successful privilege drop.
We don't want to log this in hastctl. MFC after: 1 week
This commit is contained in:
parent
bfc46083b9
commit
f4c96f944c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218214
@ -850,6 +850,7 @@ hastd_primary(struct hast_resource *res)
|
|||||||
cleanup(res);
|
cleanup(res);
|
||||||
exit(EX_CONFIG);
|
exit(EX_CONFIG);
|
||||||
}
|
}
|
||||||
|
pjdlog_info("Privileges successfully dropped.");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the guard thread first, so we can handle signals from the
|
* Create the guard thread first, so we can handle signals from the
|
||||||
|
@ -414,6 +414,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
|
|||||||
|
|
||||||
if (drop_privs() != 0)
|
if (drop_privs() != 0)
|
||||||
exit(EX_CONFIG);
|
exit(EX_CONFIG);
|
||||||
|
pjdlog_info("Privileges successfully dropped.");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the control thread before sending any event to the parent,
|
* Create the control thread before sending any event to the parent,
|
||||||
|
@ -184,7 +184,5 @@ drop_privs(void)
|
|||||||
PJDLOG_VERIFY(getgroups(1, gidset) == 1);
|
PJDLOG_VERIFY(getgroups(1, gidset) == 1);
|
||||||
PJDLOG_VERIFY(gidset[0] == pw->pw_gid);
|
PJDLOG_VERIFY(gidset[0] == pw->pw_gid);
|
||||||
|
|
||||||
pjdlog_info("Privileges successfully dropped.");
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user