return NULL;
}
- if (!lib->caps->check(lib->caps, CAP_CHOWN))
- { /* required to chown(2) notify socket */
- DBG1(DBG_CFG, "duplicheck plugin requires CAP_CHOWN capability");
- return NULL;
- }
-
INIT(this,
.public = {
.plugin = {
{
private_error_notify_plugin_t *this;
- if (!lib->caps->check(lib->caps, CAP_CHOWN))
- { /* required to chown(2) notify socket */
- DBG1(DBG_CFG, "error-notify plugin requires CAP_CHOWN capability");
- return NULL;
- }
-
INIT(this,
.public = {
.plugin = {
return NULL;
}
- if (!lib->caps->check(lib->caps, CAP_CHOWN))
- { /* required to chown(2) control socket */
- DBG1(DBG_CFG, "load-tester plugin requires CAP_CHOWN capability");
- return NULL;
- }
-
INIT(this,
.public = {
.plugin = {
}
return &this->public.plugin;
}
-
{
private_lookip_plugin_t *this;
- if (!lib->caps->check(lib->caps, CAP_CHOWN))
- { /* required to chown(2) control socket */
- DBG1(DBG_CFG, "lookip plugin requires CAP_CHOWN capability");
- return NULL;
- }
-
INIT(this,
.public = {
.plugin = {
if (reg)
{
this->socket = stroke_socket_create();
+ return this->socket != NULL;
}
else
{
DESTROY_IF(this->socket);
+ return TRUE;
}
- return TRUE;
}
METHOD(plugin_t, get_features, int,
{
private_stroke_plugin_t *this;
- if (!lib->caps->check(lib->caps, CAP_CHOWN))
- { /* required to chown(2) stroke socket */
- DBG1(DBG_CFG, "stroke plugin requires CAP_CHOWN capability");
- return NULL;
- }
-
INIT(this,
.public = {
.plugin = {
return &this->public.plugin;
}
-
{
private_whitelist_plugin_t *this;
- if (!lib->caps->check(lib->caps, CAP_CHOWN))
- { /* required to chown(2) control socket */
- DBG1(DBG_CFG, "whitelist plugin requires CAP_CHOWN capability");
- return NULL;
- }
-
INIT(this,
.public = {
.plugin = {
DBG1(DBG_NET, "invalid stream URI: '%s'", uri);
return NULL;
}
+ if (!lib->caps->check(lib->caps, CAP_CHOWN))
+ { /* required to chown(2) service socket */
+ DBG1(DBG_NET, "socket '%s' requires CAP_CHOWN capability", uri);
+ return NULL;
+ }
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd == -1)
{