capabilities: CAP_CHOWN might be required by many plugins opening UNIX sockets
But as the sockets will be created with the user/group of the running process this might not be required as no change may be needed.
This commit is contained in:
@@ -98,6 +98,12 @@ plugin_t *duplicheck_plugin_create()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) notify socket */
|
||||||
|
DBG1(DBG_CFG, "duplicheck plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -92,6 +92,12 @@ plugin_t *error_notify_plugin_create()
|
|||||||
{
|
{
|
||||||
private_error_notify_plugin_t *this;
|
private_error_notify_plugin_t *this;
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) notify socket */
|
||||||
|
DBG1(DBG_CFG, "error-notify plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -179,6 +179,12 @@ plugin_t *ha_plugin_create()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) control socket */
|
||||||
|
DBG1(DBG_CFG, "ha plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -269,6 +269,12 @@ plugin_t *load_tester_plugin_create()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) control socket */
|
||||||
|
DBG1(DBG_CFG, "load-tester plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -92,6 +92,12 @@ plugin_t *lookip_plugin_create()
|
|||||||
{
|
{
|
||||||
private_lookip_plugin_t *this;
|
private_lookip_plugin_t *this;
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) control socket */
|
||||||
|
DBG1(DBG_CFG, "lookip plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -739,6 +739,12 @@ plugin_t *smp_plugin_create()
|
|||||||
private_smp_t *this;
|
private_smp_t *this;
|
||||||
mode_t old;
|
mode_t old;
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) control socket */
|
||||||
|
DBG1(DBG_CFG, "smp plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -91,6 +91,12 @@ plugin_t *stroke_plugin_create()
|
|||||||
{
|
{
|
||||||
private_stroke_plugin_t *this;
|
private_stroke_plugin_t *this;
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) stroke socket */
|
||||||
|
DBG1(DBG_CFG, "stroke plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
@@ -92,6 +92,12 @@ plugin_t *whitelist_plugin_create()
|
|||||||
{
|
{
|
||||||
private_whitelist_plugin_t *this;
|
private_whitelist_plugin_t *this;
|
||||||
|
|
||||||
|
if (!lib->caps->keep(lib->caps, CAP_CHOWN))
|
||||||
|
{ /* required to chown(2) control socket */
|
||||||
|
DBG1(DBG_CFG, "whitelist plugin requires CAP_CHOWN capability");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|||||||
Reference in New Issue
Block a user