mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
client: introduce auto-connect-display= following the scheme of auto-connect-localhost=
Just connecting to a PA server just because X11's $DISPLAY is set might be a security hole.
This commit is contained in:
parent
3d6cc026e2
commit
21cbcc1a8a
5 changed files with 19 additions and 7 deletions
|
|
@ -987,13 +987,15 @@ int pa_context_connect(
|
|||
/* Prepend in reverse order */
|
||||
|
||||
/* Follow the X display */
|
||||
if ((d = getenv("DISPLAY"))) {
|
||||
d = pa_xstrndup(d, strcspn(d, ":"));
|
||||
if (c->conf->auto_connect_display) {
|
||||
if ((d = getenv("DISPLAY"))) {
|
||||
d = pa_xstrndup(d, strcspn(d, ":"));
|
||||
|
||||
if (*d)
|
||||
c->server_list = pa_strlist_prepend(c->server_list, d);
|
||||
if (*d)
|
||||
c->server_list = pa_strlist_prepend(c->server_list, d);
|
||||
|
||||
pa_xfree(d);
|
||||
pa_xfree(d);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add TCP/IP on the localhost */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue