Based on discussion on fedora-devel[0][1] drop the use of pkexec. pkexec was used only for starting / stopping / enabling / disabling the sshd service via systemd. This changes the "org.gnome.controlcenter.remote-login-helper" policy to request the necessary systemd permissions, and changes to using polkit to request the permission, then making the dbus calls once the permission is acquired. This also cleans up targets of the dialog response functions as discussed in the MR[3]. [0] - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/ZDZACAMG2E3P4K4P2CVBQ3XBBZ7CYSXA/ [1] - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/WCZW4Y4ONV5ZXU4JUCQUS56F3R6GNGJF/ [2] - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/F5INKYST7JUNU6FYKU5JJJWXCYOCM33I/ [3] - https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1179#note_1793602
74 lines
1.5 KiB
Meson
74 lines
1.5 KiB
Meson
panels_list += cappletname
|
|
desktop = 'gnome-@0@-panel.desktop'.format(cappletname)
|
|
|
|
i18n.merge_file(
|
|
type: 'desktop',
|
|
input: desktop + '.in',
|
|
output: desktop,
|
|
po_dir: po_dir,
|
|
install: true,
|
|
install_dir: control_center_desktopdir
|
|
)
|
|
|
|
polkit_conf = configuration_data()
|
|
polkit_conf.set('libexecdir', control_center_libexecdir)
|
|
|
|
polkit = 'org.gnome.controlcenter.remote-login-helper.policy'
|
|
|
|
polkit_in = configure_file(
|
|
input: polkit + '.in.in',
|
|
output: polkit + '.in',
|
|
configuration: polkit_conf
|
|
)
|
|
|
|
i18n.merge_file(
|
|
input: polkit_in,
|
|
output: polkit,
|
|
po_dir: po_dir,
|
|
install: true,
|
|
install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
|
|
)
|
|
|
|
sources = files(
|
|
'cc-sharing-panel.c',
|
|
'cc-media-sharing.c',
|
|
'cc-remote-login.c',
|
|
'cc-sharing-networks.c',
|
|
'cc-systemd-service.c',
|
|
'file-share-properties.c',
|
|
)
|
|
|
|
sources += gnome.compile_resources(
|
|
'cc-' + cappletname + '-resources',
|
|
cappletname + '.gresource.xml',
|
|
c_name: 'cc_' + cappletname,
|
|
export: true
|
|
)
|
|
|
|
settings_daemon = 'org.gnome.SettingsDaemon'
|
|
gdbus = settings_daemon + '.Sharing'
|
|
|
|
sources += gnome.gdbus_codegen(
|
|
gdbus,
|
|
gdbus + '.xml',
|
|
interface_prefix: settings_daemon + '.',
|
|
namespace: 'Gsd'
|
|
)
|
|
|
|
cflags += [
|
|
'-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
|
|
'-DSYSCONFDIR="@0@"'.format(control_center_sysconfdir)
|
|
]
|
|
|
|
panels_libs += static_library(
|
|
cappletname,
|
|
sources: sources,
|
|
include_directories: [ top_inc, common_inc ],
|
|
dependencies: [
|
|
common_deps,
|
|
polkit_gobject_dep,
|
|
],
|
|
c_args: cflags
|
|
)
|
|
|
|
subdir('icons')
|