Commit graph

36 commits

Author SHA1 Message Date
Thomas Haller 17bb165c05 build: merge policy/Makefile.am into parent Makefile.am 2016-10-13 21:36:06 +02:00
Yuri Chornoivan 297ade2745 all: fix typos in documentation and translated strings
https://bugzilla.gnome.org/show_bug.cgi?id=770445
2016-08-26 19:00:12 +02:00
Alfonso Sanchez-Beato 6fb0de0a8b auth: check when setting statistics refresh rate 2016-08-17 16:08:20 +02:00
Beniamino Galvani a52d4654ec checkpoint: use polkit to check permission 2016-08-17 14:55:34 +02:00
Thomas Haller 1d0e0eeffd manager: add Reload() D-Bus command
Add new Reload D-Bus command to reload NetworkManager configuration.

For now, this is like sending SIGHUP to the process. There are several
advantages here:

  - it is guarded via PolicyKit authentication while signals
    can only be sent by root.

  - the user can wait for the reload to be complete instead of sending
    an asynchronous signal. For now, we operation completes after
    nm_config_reload() returns, but later we could delay the response
    further until specific parts are fully reloaded.

  - SIGHUP reloads everything including re-reading configuration from
    disk while SIGUSR1 reloads just certain parts such as writing out DNS
    configuration anew.
    Now, the Reload command has a flags argument which is more granular
    in selecting parts which are to be reloaded. For example, via
    signals the user can:

      1) send SIGUSR1: this writes out the DNS configuration to
         resolv.conf and possibly reloads other parts without
         re-reading configuration and without restarting the DNS plugin.
      2) send SIGHUP: this reloads configuration from disk,
         writes out resolv.conf and restarts the DNS plugin.

    There is no way, to only restart the DNS plugin without also reloading
    everything else.
2016-06-01 19:06:34 +02:00
Beniamino Galvani c83ac1ed41 manager: export DNS global configuration D-Bus property 2015-10-01 09:05:08 +02:00
Marius Vollmer 4f950ee569 policy: allow non-local admin sessions to control the network (rh #1145646) 2014-10-13 15:58:46 -05:00
Dan Williams c9b6f13c56 policy: fix policy after dcbw/kill-at-console merge (bgo #707983) (rh #979416)
Polkit documentation suggests that <allow_any> applies to all
clients, but that's actually not the case.  allow_any,
allow_inactive, and allow_active are evaluated individually based
on whether the user is local and active (allow_active), local and
inactive (allow_inactive), and not local (allow_any).  Thus all
three allow options must be specified for any authorization other
than 'no'.
2014-01-24 12:32:43 -06:00
Dan Williams d000d1223f policy: allow inactive (remote/SSH) sessions to perform some actions (bgo #707983) (rh #979416)
This commit allows inactive sessions (typically SSH or remote desktop
logins) to modify their own connections, to modify the system hostname
with authorization, and to modify system connections with
authorization.

https://bugzilla.redhat.com/show_bug.cgi?id=979416
https://bugzilla.gnome.org/show_bug.cgi?id=707983
2014-01-23 16:48:19 -06:00
Dan Winship f14ecfb9f5 build: distcheck fixes 2012-10-04 09:36:19 -04:00
Dan Winship 14b19982f6 policy: add a configure option for a permissive modify.system default
Add --enable-modify-system, to change the default for
org.freedesktop.NetworkManager.settings.modify.system to allow users
to edit system connections without needing to authenticate.
2012-09-28 08:45:05 -04:00
Dan Williams a61deb48a5 policy: revert system modify permission to auth_admin_keep
For now, until we figure out a better story here.  We don't necessarily
want to require an admin password just to connect to a wifi network
after installing, but for now lets be secure-by-default while we figure
out the right solution.
2011-03-21 16:53:35 -05:00
Dan Williams 016c56078d policy: rename HOSTNAME_MODIFY -> MODIFY_HOSTNAME for consistency 2011-02-11 11:32:57 -06:00
Dan Williams ba8f562836 policy: add a "modify own" permission for single-user-visible connections
This policy will allow users to modify their personal connections (ie
maybe VPN connections, etc) distinctly from system-wide connections that
affect more than just their user.  It makes sense to be more lenient when
making changes to settings that don't affect other users.
2011-02-11 11:31:14 -06:00
Dan Williams f2c317e3d2 policy: rename "modfiy" permission to "modify system"
Meaning stays the same, but this will allow us to differentiate
in the future between personal connections (ie, just visible to
one user) and system connections (visible to more than one user).
2011-02-11 11:19:02 -06:00
Dan Williams f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams c28850ed52 wimax: fix up WiMAX radio enable/disable and add polkit permission 2011-01-02 17:34:23 -06:00
Dan Williams 3945f75bda core: consolidate all permissions checking into main D-Bus interface
Moves the system settings permissions checking into the core service's
permissions checking, which at the same time enables 3-way permission
reporting (yes, no, auth) instead of the old yes/no that we had for
system settings permissions before.  This allows UI to show a lock
icon or such when the user could authenticate to gain the permission.

It also moves the wifi-create permissions' namespace to the main
namespace (not .settings) since they really should be checked before
starting a shared wifi connection, rather than having anything to do
with the settings service.
2010-08-26 14:26:12 -05:00
Daniel Gnoutcheff f98e2528a6 NetworkMangerSettings -> NetworkManager.Settings
Just for consistency, make settings related stuff live under the
org.freedesktop.NetworkManager namespace, rather than its own
org.freedesktop.NetworkManagerSettings namespace. Renames are done for
DBus interface names, DBus object paths, and polkit actions.
2010-08-07 01:19:46 -04:00
Daniel Gnoutcheff 67ba32cd29 Remove use-user-connections polkit action 2010-08-06 13:05:46 -04:00
Dan Williams 37d6184312 policy: don't tear down user connections on VT switch (rh #614556)
PK's "allow_inactive" actually means "allow inactive *local* users", so
we do want to allow inactive local users to provide user connections.
We don't want to allow non-local inactive users to provide user connections.

So make the use-user-connections privilege match for both active and
inactive so we get the behavior we want.
2010-07-14 15:46:20 -07:00
Dan Williams 299ab139e4 core: add policy for overall network control
Allows for locking down connections completely and disallowing
certain users from touching networking at all.
2010-06-02 02:23:51 -07:00
Dan Williams 65818d517e core: PolicyKit-protect sleep/wake
Default to 'not allowed', distros that need backwards compatibility
can flip this to 'yes' if they need to. At this point, only power
management scripts should call these functions.
2010-05-29 23:11:45 -07:00
Dan Williams 716a9c6c0d core: add permissions framework for various operations (rh #585182) (bgo #619323) 2010-05-28 18:23:00 -07:00
Dan Williams 58fcc8efe6 libnm-glib: libnm_glib -> libnm-glib
Bothered me for a long time; now that we've bumped the soname, we can
rename the library too.
2009-08-26 13:07:35 -05:00
Dan Williams 2dbaab2221 system-settings: add permissions
Since the new PolicyKit does away with easy checking of authorizations,
we get to implement it by ourselves, but that's OK since we can actually
use it for a lot more stuff.  So add the GetPermissions call which returns
the permissions the caller actually has, and a signal informing callers
that their permissions might have changed.  Hook this all up to
PolicyKit so it's useful.
2009-08-24 13:03:09 -05:00
Dan Williams 7dc07202e3 polkit: fix policy for polkit >= 0.92 2009-08-11 16:06:07 -05:00
Dan Williams 18788a26d3 build: remove duplicate automake bits 2009-07-28 10:14:21 -04:00
Dan Williams c07409afc8 fix distcheck 2009-07-08 12:55:24 -04:00
Dan Williams aa7458062a distcheck: fix it 2009-06-11 21:01:16 -04:00
David Planella 93e02fa759 policy-kit: make .policy file translatable (bgo #582918) 2009-05-18 17:33:05 -04:00
Dan Williams 2f9019b268 Build fixes from Michael Biebl
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3653 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 19:08:40 +00:00
Dan Williams fd4e841042 Remove duplicate bit
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3652 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 18:02:15 +00:00
Dan Williams 9e4f42147c remove duplicated section
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3651 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 17:02:27 +00:00
Tambet Ingo 4fe828fb28 2008-05-09 Tambet Ingo <tambet@gmail.com>
* Add another missing file, sigh.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3649 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 09:58:15 +00:00
Tambet Ingo 0a230b98c1 2008-05-08 Tambet Ingo <tambet@gmail.com>
* Add the missing policy/Makefile.am


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3647 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 09:22:53 +00:00