2023-02-08 18:12:00 +01:00
|
|
|
/* PipeWire */
|
|
|
|
|
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
|
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
2018-10-27 17:33:21 +01:00
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
#include <unistd.h>
|
2023-05-03 18:28:00 +03:00
|
|
|
#include <limits.h>
|
2018-10-27 17:33:21 +01:00
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
2022-02-03 18:52:54 +01:00
|
|
|
#ifdef HAVE_SYS_VFS_H
|
2021-02-24 19:02:47 +03:00
|
|
|
#include <sys/vfs.h>
|
|
|
|
|
#endif
|
2022-02-03 18:52:54 +01:00
|
|
|
#ifdef HAVE_SYS_MOUNT_H
|
2021-02-24 19:02:47 +03:00
|
|
|
#include <sys/mount.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-10-25 15:01:02 +02:00
|
|
|
#include <spa/utils/result.h>
|
2021-05-18 11:36:13 +10:00
|
|
|
#include <spa/utils/string.h>
|
2021-02-02 17:44:28 +01:00
|
|
|
#include <spa/utils/json.h>
|
2019-10-25 15:01:02 +02:00
|
|
|
|
2019-12-11 10:57:10 +01:00
|
|
|
#include <pipewire/impl.h>
|
2023-10-08 19:34:23 +03:00
|
|
|
#include <pipewire/cleanup.h>
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2022-07-30 21:25:03 +03:00
|
|
|
#include "flatpak-utils.h"
|
|
|
|
|
|
2023-11-18 15:11:03 +02:00
|
|
|
/** \page page_module_access Access
|
2021-06-24 15:16:58 +10:00
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* The `access` module performs access checks on clients. The access check
|
|
|
|
|
* is only performed once per client, subsequent checks return the same
|
|
|
|
|
* resolution.
|
|
|
|
|
*
|
2021-07-29 15:47:22 +10:00
|
|
|
* Permissions assigned to a client are configured as arguments to this
|
2023-10-08 19:34:23 +03:00
|
|
|
* module, see below. Permission management beyond unrestricted access
|
|
|
|
|
* is delegated to an external agent, usually the session manager.
|
2021-07-29 15:47:22 +10:00
|
|
|
*
|
2023-10-08 19:34:23 +03:00
|
|
|
* This module sets the \ref PW_KEY_ACCESS as follows:
|
2021-06-24 15:16:58 +10:00
|
|
|
*
|
2023-10-08 19:34:23 +03:00
|
|
|
* - If `access.legacy` module option is not enabled:
|
|
|
|
|
|
|
|
|
|
* The value defined for the socket in `access.socket` module option, or
|
|
|
|
|
* `"default"` if no value is defined.
|
|
|
|
|
*
|
|
|
|
|
* - If `access.legacy` is enabled, the value is:
|
|
|
|
|
*
|
|
|
|
|
* - `"flatpak"`: if client is a Flatpak client
|
|
|
|
|
* - Value of \ref PW_KEY_CLIENT_ACCESS client property, if set
|
|
|
|
|
* - `"unrestricted"`: otherwise
|
|
|
|
|
*
|
|
|
|
|
* If the resulting \ref PW_KEY_ACCESS value is `"unrestricted"`, this module
|
|
|
|
|
* will give the client all permissions to access all resources. Otherwise, the
|
|
|
|
|
* client will be forced to wait until an external actor, such as the session
|
|
|
|
|
* manager, updates the client permissions.
|
2021-06-24 15:16:58 +10:00
|
|
|
*
|
2023-10-08 19:34:23 +03:00
|
|
|
* For connections from applications running inside Flatpak, and not mediated by
|
|
|
|
|
* other clients (eg. portal or pipewire-pulse), the
|
|
|
|
|
* `pipewire.access.portal.app_id` property is to the Flatpak application ID, if
|
|
|
|
|
* found. In addition, `pipewire.sec.flatpak` is set to `true`.
|
2021-06-24 15:16:58 +10:00
|
|
|
*
|
2023-11-20 00:23:03 +02:00
|
|
|
* ## Module Name
|
|
|
|
|
*
|
|
|
|
|
* `libpipewire-module-access`
|
|
|
|
|
*
|
2021-06-24 15:16:58 +10:00
|
|
|
* ## Module Options
|
|
|
|
|
*
|
|
|
|
|
* Options specific to the behavior of this module
|
|
|
|
|
*
|
2023-10-08 19:34:23 +03:00
|
|
|
* - `access.socket = { "socket-name" = "access-value", ... }`:
|
|
|
|
|
*
|
|
|
|
|
* Socket-specific access permissions. Has the default value
|
|
|
|
|
* `{ "CORENAME-manager": "unrestricted" }`
|
|
|
|
|
* where `CORENAME` is the name of the PipeWire core, usually `pipewire-0`.
|
|
|
|
|
*
|
|
|
|
|
* - `access.legacy = true`: enable backward-compatible access mode. Cannot be
|
|
|
|
|
* enabled when using socket-based permissions.
|
|
|
|
|
*
|
|
|
|
|
* If `access.socket` is not specified, has the default value `true`
|
|
|
|
|
* otherwise `false`.
|
|
|
|
|
*
|
|
|
|
|
* \warning The legacy mode is deprecated. The default value is subject to
|
|
|
|
|
* change and the legacy mode may be removed in future PipeWire
|
|
|
|
|
* releases.
|
2021-06-24 15:16:58 +10:00
|
|
|
*
|
|
|
|
|
* ## General options
|
|
|
|
|
*
|
|
|
|
|
* Options with well-known behavior:
|
|
|
|
|
*
|
|
|
|
|
* - \ref PW_KEY_ACCESS
|
|
|
|
|
* - \ref PW_KEY_CLIENT_ACCESS
|
|
|
|
|
*
|
|
|
|
|
* ## Example configuration
|
|
|
|
|
*
|
|
|
|
|
*\code{.unparsed}
|
|
|
|
|
* context.modules = [
|
|
|
|
|
* { name = libpipewire-module-access
|
|
|
|
|
* args = {
|
2023-10-08 19:34:23 +03:00
|
|
|
* # Use separate socket for session manager applications,
|
|
|
|
|
* # and pipewire-0 for usual applications.
|
|
|
|
|
* access.socket = {
|
|
|
|
|
* pipewire-0 = "default",
|
|
|
|
|
* pipewire-0-manager = "unrestricted",
|
|
|
|
|
* }
|
2021-06-24 15:16:58 +10:00
|
|
|
* }
|
|
|
|
|
* }
|
|
|
|
|
*]
|
|
|
|
|
*\endcode
|
|
|
|
|
*
|
|
|
|
|
* \see pw_resource_error
|
|
|
|
|
* \see pw_impl_client_update_permissions
|
2021-06-24 14:06:30 +10:00
|
|
|
*/
|
|
|
|
|
|
2020-07-17 13:23:50 +02:00
|
|
|
#define NAME "access"
|
|
|
|
|
|
2021-09-16 15:35:10 +10:00
|
|
|
PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
|
|
|
|
|
#define PW_LOG_TOPIC_DEFAULT mod_topic
|
|
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
#define MODULE_USAGE "( access.socket={ <socket>=<access>, ... } ) " \
|
|
|
|
|
"( access.legacy=true ) "
|
|
|
|
|
|
|
|
|
|
#define ACCESS_UNRESTRICTED "unrestricted"
|
|
|
|
|
#define ACCESS_FLATPAK "flatpak"
|
|
|
|
|
#define ACCESS_DEFAULT "default"
|
2020-07-16 11:45:44 +02:00
|
|
|
|
2018-10-27 17:33:21 +01:00
|
|
|
static const struct spa_dict_item module_props[] = {
|
2019-05-24 15:47:48 +02:00
|
|
|
{ PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
|
|
|
|
|
{ PW_KEY_MODULE_DESCRIPTION, "Perform access check" },
|
2020-07-16 11:45:44 +02:00
|
|
|
{ PW_KEY_MODULE_USAGE, MODULE_USAGE },
|
2019-05-24 15:47:48 +02:00
|
|
|
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
|
2018-10-27 17:33:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct impl {
|
2019-12-10 18:19:56 +01:00
|
|
|
struct pw_context *context;
|
2023-10-08 19:34:23 +03:00
|
|
|
|
|
|
|
|
struct pw_properties *socket_access;
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2019-12-10 18:19:56 +01:00
|
|
|
struct spa_hook context_listener;
|
2018-10-27 17:33:21 +01:00
|
|
|
struct spa_hook module_listener;
|
|
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
unsigned int legacy:1;
|
|
|
|
|
};
|
2018-10-27 17:33:21 +01:00
|
|
|
|
|
|
|
|
static void
|
2019-12-11 11:21:43 +01:00
|
|
|
context_check_access(void *data, struct pw_impl_client *client)
|
2018-10-27 17:33:21 +01:00
|
|
|
{
|
|
|
|
|
struct impl *impl = data;
|
2018-11-05 15:02:08 +01:00
|
|
|
struct pw_permission permissions[1];
|
2023-10-08 19:34:23 +03:00
|
|
|
struct spa_dict_item items[3];
|
2019-05-10 13:12:22 +02:00
|
|
|
const struct pw_properties *props;
|
2023-10-08 19:34:23 +03:00
|
|
|
const char *str;
|
|
|
|
|
const char *access;
|
|
|
|
|
const char *socket;
|
|
|
|
|
spa_autofree char *flatpak_app_id = NULL;
|
2022-07-31 02:32:32 +03:00
|
|
|
int nitems = 0;
|
2023-10-08 19:34:23 +03:00
|
|
|
bool sandbox_flatpak;
|
2019-05-10 13:12:22 +02:00
|
|
|
int pid, res;
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
/* Get client properties */
|
|
|
|
|
|
2019-05-10 13:12:22 +02:00
|
|
|
pid = -EINVAL;
|
2023-10-08 19:34:23 +03:00
|
|
|
socket = NULL;
|
|
|
|
|
sandbox_flatpak = false;
|
|
|
|
|
|
2019-12-11 11:21:43 +01:00
|
|
|
if ((props = pw_impl_client_get_properties(client)) != NULL) {
|
2020-07-17 13:23:50 +02:00
|
|
|
if ((str = pw_properties_get(props, PW_KEY_ACCESS)) != NULL) {
|
2020-07-17 16:47:14 +02:00
|
|
|
pw_log_info("client %p: has already access: '%s'", client, str);
|
2020-07-17 13:23:50 +02:00
|
|
|
return;
|
|
|
|
|
}
|
2021-10-12 14:57:47 +10:00
|
|
|
pw_properties_fetch_int32(props, PW_KEY_SEC_PID, &pid);
|
2023-10-08 19:34:23 +03:00
|
|
|
socket = pw_properties_get(props, PW_KEY_SEC_SOCKET);
|
2019-05-10 13:12:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (pid < 0) {
|
2020-02-21 11:09:34 +01:00
|
|
|
pw_log_info("client %p: no trusted pid found, assuming not sandboxed", client);
|
2018-10-29 08:46:09 +00:00
|
|
|
} else {
|
2020-02-21 11:09:34 +01:00
|
|
|
pw_log_info("client %p has trusted pid %d", client, pid);
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
res = pw_check_flatpak(pid, &flatpak_app_id, NULL);
|
|
|
|
|
if (res != 0) {
|
|
|
|
|
if (res < 0)
|
|
|
|
|
pw_log_warn("%p: client %p flatpak check failed: %s",
|
|
|
|
|
impl, client, spa_strerror(res));
|
2020-07-16 11:45:44 +02:00
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
pw_log_info("client %p is from flatpak", client);
|
|
|
|
|
sandbox_flatpak = true;
|
2020-07-16 11:45:44 +02:00
|
|
|
}
|
2018-10-27 17:33:21 +01:00
|
|
|
}
|
|
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
/* Apply rules */
|
|
|
|
|
|
|
|
|
|
if (!impl->legacy) {
|
|
|
|
|
if ((str = pw_properties_get(impl->socket_access, socket)) != NULL)
|
|
|
|
|
access = str;
|
|
|
|
|
else
|
|
|
|
|
access = ACCESS_DEFAULT;
|
|
|
|
|
} else {
|
|
|
|
|
if (sandbox_flatpak)
|
|
|
|
|
access = ACCESS_FLATPAK;
|
|
|
|
|
else if ((str = pw_properties_get(props, PW_KEY_CLIENT_ACCESS)) != NULL)
|
|
|
|
|
access = str;
|
2022-08-13 21:32:51 +03:00
|
|
|
else
|
2023-10-08 19:34:23 +03:00
|
|
|
access = ACCESS_UNRESTRICTED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Handle resolution */
|
|
|
|
|
|
|
|
|
|
if (sandbox_flatpak) {
|
2022-07-31 02:32:32 +03:00
|
|
|
items[nitems++] = SPA_DICT_ITEM_INIT("pipewire.access.portal.app_id",
|
|
|
|
|
flatpak_app_id);
|
2023-10-08 19:34:23 +03:00
|
|
|
items[nitems++] = SPA_DICT_ITEM_INIT("pipewire.sec.flatpak", "true");
|
2018-10-27 17:33:21 +01:00
|
|
|
}
|
2022-07-30 21:25:03 +03:00
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
if (spa_streq(access, ACCESS_UNRESTRICTED)) {
|
|
|
|
|
pw_log_info("%p: client %p '%s' access granted", impl, client, access);
|
|
|
|
|
items[nitems++] = SPA_DICT_ITEM_INIT(PW_KEY_ACCESS, access);
|
|
|
|
|
pw_impl_client_update_properties(client, &SPA_DICT_INIT(items, nitems));
|
2020-07-17 16:47:14 +02:00
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
permissions[0] = PW_PERMISSION_INIT(PW_ID_ANY, PW_PERM_ALL);
|
|
|
|
|
pw_impl_client_update_permissions(client, 1, permissions);
|
|
|
|
|
} else {
|
|
|
|
|
pw_log_info("%p: client %p wait for '%s' permissions",
|
|
|
|
|
impl, client, access);
|
|
|
|
|
items[nitems++] = SPA_DICT_ITEM_INIT(PW_KEY_ACCESS, access);
|
|
|
|
|
pw_impl_client_update_properties(client, &SPA_DICT_INIT(items, nitems));
|
|
|
|
|
}
|
2018-10-27 17:33:21 +01:00
|
|
|
}
|
|
|
|
|
|
2019-12-10 18:19:56 +01:00
|
|
|
static const struct pw_context_events context_events = {
|
|
|
|
|
PW_VERSION_CONTEXT_EVENTS,
|
|
|
|
|
.check_access = context_check_access,
|
2018-10-27 17:33:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static void module_destroy(void *data)
|
|
|
|
|
{
|
|
|
|
|
struct impl *impl = data;
|
|
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
if (impl->context) {
|
|
|
|
|
spa_hook_remove(&impl->context_listener);
|
|
|
|
|
spa_hook_remove(&impl->module_listener);
|
|
|
|
|
}
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
pw_properties_free(impl->socket_access);
|
2018-10-27 17:33:21 +01:00
|
|
|
|
|
|
|
|
free(impl);
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 11:57:56 +01:00
|
|
|
static const struct pw_impl_module_events module_events = {
|
|
|
|
|
PW_VERSION_IMPL_MODULE_EVENTS,
|
2018-10-27 17:33:21 +01:00
|
|
|
.destroy = module_destroy,
|
|
|
|
|
};
|
|
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
static const char *
|
|
|
|
|
get_server_name(const struct spa_dict *props)
|
|
|
|
|
{
|
|
|
|
|
const char *name = NULL;
|
|
|
|
|
|
|
|
|
|
name = getenv("PIPEWIRE_CORE");
|
|
|
|
|
if (name == NULL && props != NULL)
|
|
|
|
|
name = spa_dict_lookup(props, PW_KEY_CORE_NAME);
|
|
|
|
|
if (name == NULL)
|
|
|
|
|
name = PW_DEFAULT_REMOTE;
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int parse_socket_args(struct impl *impl, const char *str)
|
|
|
|
|
{
|
|
|
|
|
struct spa_json it[2];
|
|
|
|
|
char socket[PATH_MAX];
|
|
|
|
|
|
|
|
|
|
spa_json_init(&it[0], str, strlen(str));
|
|
|
|
|
|
|
|
|
|
if (spa_json_enter_object(&it[0], &it[1]) <= 0)
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
|
|
while (spa_json_get_string(&it[1], socket, sizeof(socket)) > 0) {
|
|
|
|
|
char value[256];
|
|
|
|
|
const char *val;
|
|
|
|
|
int len;
|
|
|
|
|
|
|
|
|
|
if ((len = spa_json_next(&it[1], &val)) <= 0)
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
|
|
if (spa_json_parse_stringn(val, len, value, sizeof(value)) <= 0)
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
|
|
pw_properties_set(impl->socket_access, socket, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int parse_args(struct impl *impl, const struct pw_properties *props, const char *args_str)
|
|
|
|
|
{
|
|
|
|
|
spa_autoptr(pw_properties) args = NULL;
|
|
|
|
|
const char *str;
|
|
|
|
|
int res;
|
|
|
|
|
|
|
|
|
|
if (args_str)
|
|
|
|
|
args = pw_properties_new_string(args_str);
|
|
|
|
|
else
|
|
|
|
|
args = pw_properties_new(NULL, NULL);
|
|
|
|
|
|
|
|
|
|
if ((str = pw_properties_get(args, "access.legacy")) != NULL) {
|
|
|
|
|
impl->legacy = spa_atob(str);
|
|
|
|
|
} else if (pw_properties_get(args, "access.socket")) {
|
|
|
|
|
impl->legacy = false;
|
|
|
|
|
} else {
|
|
|
|
|
/* When time comes, we should change this to false */
|
|
|
|
|
impl->legacy = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (pw_properties_get(args, "access.force") ||
|
|
|
|
|
pw_properties_get(args, "access.allowed") ||
|
|
|
|
|
pw_properties_get(args, "access.rejected") ||
|
|
|
|
|
pw_properties_get(args, "access.restricted")) {
|
|
|
|
|
pw_log_warn("access.force/allowed/rejected/restricted are deprecated and ignored "
|
|
|
|
|
"but imply legacy access mode");
|
|
|
|
|
impl->legacy = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((str = pw_properties_get(args, "access.socket")) != NULL) {
|
|
|
|
|
if (impl->legacy) {
|
|
|
|
|
pw_log_error("access.socket and legacy mode cannot be both enabled");
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((res = parse_socket_args(impl, str)) < 0) {
|
|
|
|
|
pw_log_error("invalid access.socket value");
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
char def[PATH_MAX];
|
|
|
|
|
|
|
|
|
|
spa_scnprintf(def, sizeof(def), "%s-manager", get_server_name(&props->dict));
|
|
|
|
|
pw_properties_set(impl->socket_access, def, ACCESS_UNRESTRICTED);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (impl->legacy)
|
|
|
|
|
pw_log_info("Using backward-compatible legacy access mode.");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-06 13:24:41 +01:00
|
|
|
SPA_EXPORT
|
2019-12-11 11:57:56 +01:00
|
|
|
int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
2018-10-27 17:33:21 +01:00
|
|
|
{
|
2019-12-11 11:57:56 +01:00
|
|
|
struct pw_context *context = pw_impl_module_get_context(module);
|
2023-10-08 19:34:23 +03:00
|
|
|
const struct pw_properties *props = pw_context_get_properties(context);
|
2018-10-27 17:33:21 +01:00
|
|
|
struct impl *impl;
|
2023-10-08 19:34:23 +03:00
|
|
|
int res;
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2021-09-16 15:35:10 +10:00
|
|
|
PW_LOG_TOPIC_INIT(mod_topic);
|
|
|
|
|
|
2018-10-27 17:33:21 +01:00
|
|
|
impl = calloc(1, sizeof(struct impl));
|
|
|
|
|
if (impl == NULL)
|
2019-06-19 16:22:22 +02:00
|
|
|
return -errno;
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2018-10-29 08:46:09 +00:00
|
|
|
pw_log_debug("module %p: new %s", impl, args);
|
|
|
|
|
|
2023-10-08 19:34:23 +03:00
|
|
|
impl->socket_access = pw_properties_new(NULL, NULL);
|
|
|
|
|
|
|
|
|
|
if ((res = parse_args(impl, props, args)) < 0)
|
|
|
|
|
goto error;
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2019-12-10 18:19:56 +01:00
|
|
|
impl->context = context;
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2019-12-10 18:19:56 +01:00
|
|
|
pw_context_add_listener(context, &impl->context_listener, &context_events, impl);
|
2019-12-11 11:57:56 +01:00
|
|
|
pw_impl_module_add_listener(module, &impl->module_listener, &module_events, impl);
|
2018-10-27 17:33:21 +01:00
|
|
|
|
2019-12-11 11:57:56 +01:00
|
|
|
pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props));
|
2018-10-27 17:33:21 +01:00
|
|
|
|
|
|
|
|
return 0;
|
2023-10-08 19:34:23 +03:00
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
module_destroy(impl);
|
|
|
|
|
return res;
|
2018-10-27 17:33:21 +01:00
|
|
|
}
|