mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
context: get rid of really old runtime dir logic, i.e. break compat with >4y-old PA
This commit is contained in:
parent
c50cffc016
commit
3e9cd3cfcf
2 changed files with 0 additions and 78 deletions
|
|
@ -1228,12 +1228,6 @@ AC_ARG_ENABLE([default-build-tests],
|
||||||
AS_HELP_STRING([--disable-default-build-tests], [Build test programs only during make check]))
|
AS_HELP_STRING([--disable-default-build-tests], [Build test programs only during make check]))
|
||||||
AM_CONDITIONAL([BUILD_TESTS_DEFAULT], [test "x$enable_default_build_tests" != "xno"])
|
AM_CONDITIONAL([BUILD_TESTS_DEFAULT], [test "x$enable_default_build_tests" != "xno"])
|
||||||
|
|
||||||
AC_ARG_ENABLE([legacy-runtime-dir],
|
|
||||||
AS_HELP_STRING([--disable-legacy-runtime-dir], [Try to connect on legacy (< 0.9.12) socket paths.]))
|
|
||||||
if test "x$enable_legacy_runtime_dir" != "xno" ; then
|
|
||||||
AC_DEFINE(ENABLE_LEGACY_RUNTIME_DIR, [1], [Legacy runtime dir])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([legacy-database-entry-format],
|
AC_ARG_ENABLE([legacy-database-entry-format],
|
||||||
AS_HELP_STRING([--disable-legacy-database-entry-format], [Try to load legacy (< 1.0) database files (card, device and volume restore).]))
|
AS_HELP_STRING([--disable-legacy-database-entry-format], [Try to load legacy (< 1.0) database files (card, device and volume restore).]))
|
||||||
if test "x$enable_legacy_database_entry_format" != "xno" ; then
|
if test "x$enable_legacy_database_entry_format" != "xno" ; then
|
||||||
|
|
@ -1372,7 +1366,6 @@ AS_IF([test "x$HAVE_GDBM" = "x1"], ENABLE_GDBM=yes, ENABLE_GDBM=no)
|
||||||
AS_IF([test "x$HAVE_SIMPLEDB" = "x1"], ENABLE_SIMPLEDB=yes, ENABLE_SIMPLEDB=no)
|
AS_IF([test "x$HAVE_SIMPLEDB" = "x1"], ENABLE_SIMPLEDB=yes, ENABLE_SIMPLEDB=no)
|
||||||
AS_IF([test "x$HAVE_ESOUND" = "x1"], ENABLE_ESOUND=yes, ENABLE_ESOUND=no)
|
AS_IF([test "x$HAVE_ESOUND" = "x1"], ENABLE_ESOUND=yes, ENABLE_ESOUND=no)
|
||||||
AS_IF([test "x$HAVE_ESOUND" = "x1" -a "x$USE_PER_USER_ESOUND_SOCKET" = "x1"], ENABLE_PER_USER_ESOUND_SOCKET=yes, ENABLE_PER_USER_ESOUND_SOCKET=no)
|
AS_IF([test "x$HAVE_ESOUND" = "x1" -a "x$USE_PER_USER_ESOUND_SOCKET" = "x1"], ENABLE_PER_USER_ESOUND_SOCKET=yes, ENABLE_PER_USER_ESOUND_SOCKET=no)
|
||||||
AS_IF([test "x$enable_legacy_runtime_dir" != "xno"], ENABLE_LEGACY_RUNTIME_DIR=yes, ENABLE_LEGACY_RUNTIME_DIR=no)
|
|
||||||
AS_IF([test "x$enable_legacy_database_entry_format" != "xno"], ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=yes, ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=no)
|
AS_IF([test "x$enable_legacy_database_entry_format" != "xno"], ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=yes, ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=no)
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
|
|
@ -1431,7 +1424,6 @@ echo "
|
||||||
Force preopen: ${FORCE_PREOPEN}
|
Force preopen: ${FORCE_PREOPEN}
|
||||||
Preopened modules: ${PREOPEN_MODS}
|
Preopened modules: ${PREOPEN_MODS}
|
||||||
|
|
||||||
Legacy Runtime Dir Support: ${ENABLE_LEGACY_RUNTIME_DIR}
|
|
||||||
Legacy Database Entry Support: ${ENABLE_LEGACY_DATABASE_ENTRY_FORMAT}
|
Legacy Database Entry Support: ${ENABLE_LEGACY_DATABASE_ENTRY_FORMAT}
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -563,79 +563,9 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
|
||||||
pa_context_unref(c);
|
pa_context_unref(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_LEGACY_RUNTIME_DIR
|
|
||||||
static char *get_old_legacy_runtime_dir(void) {
|
|
||||||
char *p, u[128];
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
if (!pa_get_user_name(u, sizeof(u)))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
p = pa_sprintf_malloc("/tmp/pulse-%s", u);
|
|
||||||
|
|
||||||
if (stat(p, &st) < 0) {
|
|
||||||
pa_xfree(p);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_GETUID
|
|
||||||
if (st.st_uid != getuid()) {
|
|
||||||
pa_xfree(p);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *get_very_old_legacy_runtime_dir(void) {
|
|
||||||
char *p, h[128];
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
if (!pa_get_home_dir(h, sizeof(h)))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
p = pa_sprintf_malloc("%s/.pulse", h);
|
|
||||||
|
|
||||||
if (stat(p, &st) < 0) {
|
|
||||||
pa_xfree(p);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_GETUID
|
|
||||||
if (st.st_uid != getuid()) {
|
|
||||||
pa_xfree(p);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static pa_strlist *prepend_per_user(pa_strlist *l) {
|
static pa_strlist *prepend_per_user(pa_strlist *l) {
|
||||||
char *ufn;
|
char *ufn;
|
||||||
|
|
||||||
#ifdef ENABLE_LEGACY_RUNTIME_DIR
|
|
||||||
char *legacy_dir;
|
|
||||||
|
|
||||||
/* The very old per-user instance path (< 0.9.11). This is supported only to ease upgrades */
|
|
||||||
if ((legacy_dir = get_very_old_legacy_runtime_dir())) {
|
|
||||||
char *p = pa_sprintf_malloc("%s" PA_PATH_SEP PA_NATIVE_DEFAULT_UNIX_SOCKET, legacy_dir);
|
|
||||||
l = pa_strlist_prepend(l, p);
|
|
||||||
pa_xfree(p);
|
|
||||||
pa_xfree(legacy_dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The old per-user instance path (< 0.9.12). This is supported only to ease upgrades */
|
|
||||||
if ((legacy_dir = get_old_legacy_runtime_dir())) {
|
|
||||||
char *p = pa_sprintf_malloc("%s" PA_PATH_SEP PA_NATIVE_DEFAULT_UNIX_SOCKET, legacy_dir);
|
|
||||||
l = pa_strlist_prepend(l, p);
|
|
||||||
pa_xfree(p);
|
|
||||||
pa_xfree(legacy_dir);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The per-user instance */
|
/* The per-user instance */
|
||||||
if ((ufn = pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET))) {
|
if ((ufn = pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET))) {
|
||||||
l = pa_strlist_prepend(l, ufn);
|
l = pa_strlist_prepend(l, ufn);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue