Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a portal for proxy information #4

Merged
merged 3 commits into from
Jun 23, 2016

Conversation

matthiasclasen
Copy link
Contributor

This can probably reuse an existing libproxy backend.

Matthias Clasen added 2 commits June 21, 2016 18:25
This can be used to implement the GNetworkMonitor interface
in the sandbox.
This can be used to implement the GProxyResolver interface
in the sandbox.
@matthiasclasen
Copy link
Contributor Author

Here too, I do the check for network access inside the sandbox. In this case, we could maybe do the check on the portal side, since we actually do method calls.

if (skeleton != NULL)
{
g_dbus_interface_skeleton_set_flags (skeleton,
G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calls are async so we should perhaps not run these in a thread?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the libproxy implementation just uses a thread to make it async, so maybe you should instead just use the sync call and RUN_IN_THREAD.

No need for doing async when we handle D-Bus calls in threads
anyway.
@alexlarsson alexlarsson merged commit a967446 into flatpak:master Jun 23, 2016
@wjt wjt mentioned this pull request Jan 14, 2021
whot added a commit to whot/xdg-desktop-portal that referenced this pull request Feb 8, 2024
g_proxy_resolver_get_default() via g_proxy_resolver_gnome_init() fails
hard if the XDG_DATA_DIR isn't set because the GSettings cannot be found:

In particular this statement fails:
   resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);

  (gdb) bt
  #0  0x00007ffff7eb9bef in g_log_structured_array () at /lib64/libglib-2.0.so.0
  flatpak#1  0x00007ffff7eb9edc in g_log_default_handler () at /lib64/libglib-2.0.so.0
  flatpak#2  0x00007ffff7eba180 in g_logv () at /lib64/libglib-2.0.so.0
  flatpak#3  0x00007ffff7eba463 in g_log () at /lib64/libglib-2.0.so.0
  flatpak#4  0x00007ffff7d7b952 in g_settings_set_property () at /lib64/libgio-2.0.so.0
  flatpak#5  0x00007ffff7c4775a in object_set_property () at /lib64/libgobject-2.0.so.0
  flatpak#6  0x00007ffff7c48068 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#7  0x00007ffff7c4a1a3 in g_object_new_valist () at /lib64/libgobject-2.0.so.0
  flatpak#8  0x00007ffff7c4a55f in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#9  0x00007ffff7fb4ac4 in g_proxy_resolver_gnome_init () at /usr/lib64/gio/modules/libgiognomeproxy.so
  flatpak#10 0x00007ffff7c625ea in g_type_create_instance () at /lib64/libgobject-2.0.so.0
  flatpak#11 0x00007ffff7c47fb4 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#12 0x00007ffff7c495d6 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
  flatpak#13 0x00007ffff7c4a581 in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#14 0x00007ffff7d03c6c in try_implementation () at /lib64/libgio-2.0.so.0
  flatpak#15 0x00007ffff7d09e8e in _g_io_module_get_default () at /lib64/libgio-2.0.so.0
  flatpak#16 0x00007ffff7d18d2a in g_proxy_resolver_get_default () at /lib64/libgio-2.0.so.0
  flatpak#17 0x00000000004d4083 in proxy_resolver_init (resolver=0x5a6cc0) at ../src/proxy-resolver.c:99

This causes xdp to abort, it never claims the bus and our tests time
out.
whot added a commit to whot/xdg-desktop-portal that referenced this pull request Feb 8, 2024
g_proxy_resolver_get_default() via g_proxy_resolver_gnome_init() fails
hard if the XDG_DATA_DIR isn't set because the GSettings cannot be found:

In particular this statement fails:
   resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);

  (gdb) bt
  #0  0x00007ffff7eb9bef in g_log_structured_array () at /lib64/libglib-2.0.so.0
  flatpak#1  0x00007ffff7eb9edc in g_log_default_handler () at /lib64/libglib-2.0.so.0
  flatpak#2  0x00007ffff7eba180 in g_logv () at /lib64/libglib-2.0.so.0
  flatpak#3  0x00007ffff7eba463 in g_log () at /lib64/libglib-2.0.so.0
  flatpak#4  0x00007ffff7d7b952 in g_settings_set_property () at /lib64/libgio-2.0.so.0
  flatpak#5  0x00007ffff7c4775a in object_set_property () at /lib64/libgobject-2.0.so.0
  flatpak#6  0x00007ffff7c48068 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#7  0x00007ffff7c4a1a3 in g_object_new_valist () at /lib64/libgobject-2.0.so.0
  flatpak#8  0x00007ffff7c4a55f in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#9  0x00007ffff7fb4ac4 in g_proxy_resolver_gnome_init () at /usr/lib64/gio/modules/libgiognomeproxy.so
  flatpak#10 0x00007ffff7c625ea in g_type_create_instance () at /lib64/libgobject-2.0.so.0
  flatpak#11 0x00007ffff7c47fb4 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#12 0x00007ffff7c495d6 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
  flatpak#13 0x00007ffff7c4a581 in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#14 0x00007ffff7d03c6c in try_implementation () at /lib64/libgio-2.0.so.0
  flatpak#15 0x00007ffff7d09e8e in _g_io_module_get_default () at /lib64/libgio-2.0.so.0
  flatpak#16 0x00007ffff7d18d2a in g_proxy_resolver_get_default () at /lib64/libgio-2.0.so.0
  flatpak#17 0x00000000004d4083 in proxy_resolver_init (resolver=0x5a6cc0) at ../src/proxy-resolver.c:99

This causes xdp to abort, it never claims the bus and our tests time
out.
whot added a commit to whot/xdg-desktop-portal that referenced this pull request Feb 8, 2024
g_proxy_resolver_get_default() via g_proxy_resolver_gnome_init() fails
hard if the XDG_DATA_DIR isn't set because the GSettings cannot be found:

In particular this statement fails:
   resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);

  (gdb) bt
  #0  0x00007ffff7eb9bef in g_log_structured_array () at /lib64/libglib-2.0.so.0
  flatpak#1  0x00007ffff7eb9edc in g_log_default_handler () at /lib64/libglib-2.0.so.0
  flatpak#2  0x00007ffff7eba180 in g_logv () at /lib64/libglib-2.0.so.0
  flatpak#3  0x00007ffff7eba463 in g_log () at /lib64/libglib-2.0.so.0
  flatpak#4  0x00007ffff7d7b952 in g_settings_set_property () at /lib64/libgio-2.0.so.0
  flatpak#5  0x00007ffff7c4775a in object_set_property () at /lib64/libgobject-2.0.so.0
  flatpak#6  0x00007ffff7c48068 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#7  0x00007ffff7c4a1a3 in g_object_new_valist () at /lib64/libgobject-2.0.so.0
  flatpak#8  0x00007ffff7c4a55f in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#9  0x00007ffff7fb4ac4 in g_proxy_resolver_gnome_init () at /usr/lib64/gio/modules/libgiognomeproxy.so
  flatpak#10 0x00007ffff7c625ea in g_type_create_instance () at /lib64/libgobject-2.0.so.0
  flatpak#11 0x00007ffff7c47fb4 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#12 0x00007ffff7c495d6 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
  flatpak#13 0x00007ffff7c4a581 in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#14 0x00007ffff7d03c6c in try_implementation () at /lib64/libgio-2.0.so.0
  flatpak#15 0x00007ffff7d09e8e in _g_io_module_get_default () at /lib64/libgio-2.0.so.0
  flatpak#16 0x00007ffff7d18d2a in g_proxy_resolver_get_default () at /lib64/libgio-2.0.so.0
  flatpak#17 0x00000000004d4083 in proxy_resolver_init (resolver=0x5a6cc0) at ../src/proxy-resolver.c:99

This causes xdp to abort, it never claims the bus and our tests time
out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants