stream-service: move CAP_CHOWN check from plugins to service constructor

A plugin service can be a TCP socket now, so it does not make much sense
to strictly check for CAP_CHOWN.
This commit is contained in:
Martin Willi
2013-07-18 16:00:31 +02:00
parent 1897dd730f
commit b4b3959b22
7 changed files with 7 additions and 39 deletions
+2 -8
View File
@@ -51,12 +51,13 @@ static bool register_stroke(private_stroke_plugin_t *this,
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,
@@ -91,12 +92,6 @@ plugin_t *stroke_plugin_create()
{
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 = {
@@ -110,4 +105,3 @@ plugin_t *stroke_plugin_create()
return &this->public.plugin;
}