Commit Graph

10 Commits

Author SHA1 Message Date
Lars Uebernickel
89a7bbcf6e gmenumodel: disallow exporting large menus on the bus
This solves problems with validating untrusted inputs from D-Bus, where
invalid numbers of added and removed menu entries, and positions, could
be specified.

Original patch from
https://bugzilla.gnome.org/show_bug.cgi?id=728733#c7, tweaked by Philip
Withnall to add a few code comments and make
`G_MENU_EXPORTER_MAX_SECTION_SIZE` public so callers can check their
inputs against it if they want. Also tweaked to use `g_warning()` instead
of the nonexistent `g_dbus_warning()`.

Fixes: #861
2022-12-14 15:42:14 +00:00
Xavier Claessens
e5565f6635 Rename all visibility macros 2022-10-13 20:53:56 -04:00
Philip Withnall
26409f19cd Add SPDX license headers for LGPL-2.1-or-later to various files
These have all been added manually, as I’ve finished all the files which
I can automatically detect.

All the license headers in this commit are for LGPL-2.1-or-later, and
all have been double-checked against the license paragraph in the file
header.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
2022-06-01 12:44:23 +01:00
Sébastien Wilmet
3bf4a720c3 gio/: LGPLv2+ -> LGPLv2.1+
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-05-29 19:53:34 +02:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Colin Walters
1cc7162c95 Annotate API introduced for 2.32 with GLIB_AVAILABLE_IN_2_32
https://bugzilla.gnome.org/show_bug.cgi?id=676816
2012-05-26 10:13:30 -04:00
Ryan Lortie
4f2c207745 menu/action exporter docs fixup 2011-12-08 18:05:14 -05:00
Ryan Lortie
cfbc1b5a4b Menu model exporter: clean up the API
Give it the same treatment as the exporter for GActionGroup just got.

There is a wart here: the exporter attempt to re-enter GDBusConnection
when it is freed in order to cancel outstanding name watches.
GDBusConnection holds its own lock while calling the destroy notify, so
the attempt at reentrancy results in a deadlock.

We have a workaround to deal with that for now...
2011-12-08 18:05:14 -05:00
Matthias Clasen
db34b1aebe Rename exporter APIs
There are no public 'exporter' objects, so don't allude to them
in the function names. At the same time, we want to make it clear
that these functions are D-Bus specific.

The new APIs are
g_action_group_dbus_export_start
g_action_group_dbus_export_query
g_action_group_dbus_export_stop
g_menu_model_dbus_export_start
g_menu_model_dbus_export_query
g_menu_model_dbus_export_stop
2011-12-08 18:05:12 -05:00
Matthias Clasen
66e089f086 Add GMenuModel D-Bus exporter 2011-12-08 18:05:12 -05:00