Make journal always available in the sandbox

I don't think it makes sense to have to enable this for everything.
It should be safe in the sense that you can't ever do more than
the user can do anyway, and there is no way to use this to communicate
with the rest of the system because you can't read from it.
The worst this could ever cause is to overload the system, but the
sandbox doesn't protect against that in any other way anyway.
This commit is contained in:
Alexander Larsson committed 2016-06-28 15:05:01 +02:00
1 parent 44b6c31efc
commit 7070dbf96c
5 files changed
+10 -19

No files matched your search

+2 -11
View File
@@ -72,7 +72,6 @@ typedef enum {
FLATPAK_CONTEXT_SOCKET_PULSEAUDIO = 1 << 2,
FLATPAK_CONTEXT_SOCKET_SESSION_BUS = 1 << 3,
FLATPAK_CONTEXT_SOCKET_SYSTEM_BUS = 1 << 4,
FLATPAK_CONTEXT_SOCKET_JOURNAL = 1 << 5,
} FlatpakContextSockets;
/* Same order as enum */
@@ -82,7 +81,6 @@ const char *flatpak_context_sockets[] = {
"pulseaudio",
"session-bus",
"system-bus",
"journal",
NULL
};
@@ -1534,8 +1532,7 @@ flatpak_run_add_pulseaudio_args (GPtrArray *argv_array,
}
static void
flatpak_run_add_journal_args (GPtrArray *argv_array,
char ***envp_p)
flatpak_run_add_journal_args (GPtrArray *argv_array)
{
const char *journal_socket_socket = g_strdup ("/run/systemd/journal/socket");
const char *journal_stdout_socket = g_strdup ("/run/systemd/journal/stdout");
@@ -1997,12 +1994,6 @@ flatpak_run_add_environment_args (GPtrArray *argv_array,
flatpak_run_add_pulseaudio_args (argv_array, fd_array, envp_p);
}
if (context->sockets & FLATPAK_CONTEXT_SOCKET_JOURNAL)
{
g_debug ("Allowing journal access");
flatpak_run_add_journal_args (argv_array, envp_p);
}
unrestricted_session_bus = (context->sockets & FLATPAK_CONTEXT_SOCKET_SESSION_BUS) != 0;
if (unrestricted_session_bus)
g_debug ("Allowing session-dbus access");
@@ -3164,7 +3155,7 @@ flatpak_run_app (const char *app_ref,
session_bus_proxy_argv,
system_bus_proxy_argv,
app_ref_parts[1], app_context, app_id_dir);
flatpak_run_add_journal_args (argv_array);
add_font_path_args (argv_array);
/* Must run this before spawning the dbus proxy, to ensure it
+2 -2
View File
@@ -114,7 +114,7 @@
<listitem><para>
Expose a well known socket to the application. This updates
the [Context] group in the metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
@@ -125,7 +125,7 @@
<listitem><para>
Don't expose a well known socket to the application. This updates
the [Context] group in the metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
+2 -2
View File
@@ -139,7 +139,7 @@
<listitem><para>
Expose a well-known socket to the application. This overrides to
the Context section from the application metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
@@ -150,7 +150,7 @@
<listitem><para>
Don't expose a well-known socket to the application. This overrides to
the Context section from the application metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
+2 -2
View File
@@ -95,7 +95,7 @@
<listitem><para>
Expose a well-known socket to the application. This overrides to
the Context section from the application metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
@@ -106,7 +106,7 @@
<listitem><para>
Don't expose a well-known socket to the application. This overrides to
the Context section from the application metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
+2 -2
View File
@@ -173,7 +173,7 @@
<listitem><para>
Expose a well known socket to the application. This overrides to
the Context section from the application metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>
@@ -184,7 +184,7 @@
<listitem><para>
Don't expose a well known socket to the application. This overrides to
the Context section from the application metadata.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus, journal.
SOCKET must be one of: x11, wayland, pulseaudio, system-bus, session-bus.
This option can be used multiple times.
</para></listitem>
</varlistentry>