tools: connect to the manager socket by default

This gives the tools unrestricted access by default if access.socket is defined
in the configuration access module.
This commit is contained in:
Julian Bouzas 2026-04-07 11:39:36 -04:00 committed by Wim Taymans
parent b12b7f785e
commit 14b74962d6
9 changed files with 56 additions and 15 deletions

View file

@ -180,6 +180,7 @@ int main(int argc, char *argv[])
{
struct data data = { 0, };
int res = 0, c;
const char *remote_name;
static const struct option long_options[] = {
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' },
@ -257,9 +258,13 @@ int main(int argc, char *argv[])
return -1;
}
remote_name = "[" PW_DEFAULT_REMOTE "-manager," PW_DEFAULT_REMOTE "]";
if (data.opt_remote)
remote_name = data.opt_remote;
data.core = pw_context_connect(data.context,
pw_properties_new(
PW_KEY_REMOTE_NAME, data.opt_remote,
PW_KEY_REMOTE_NAME, remote_name,
NULL),
0);
if (data.core == NULL) {