summaryrefslogtreecommitdiff
path: root/src/nm-auth-manager.c
Commit message (Collapse)AuthorAgeFilesLines
* logging: use _nm_log() to avoid duplicate check of whether logging is enabledThomas Haller2015-04-291-3/+3
| | | | | | | | | | Use _nm_log() in places that already checked whether logging is enabled. No need to check again as done by nm_log(). (cherry picked from commit 4526b55a516f2b7836a1879ca70d039b23dd7044) Conflicts: src/nm-route-manager.c
* core/trivial: rename singleton variables according to default nameThomas Haller2015-03-131-8/+8
| | | | (cherry picked from commit 822cb293ef26ead5afd2e60d63d76d3df4f09f3d)
* all: consistently include config.hDan Winship2014-11-131-0/+2
| | | | | | | | | | | config.h should be included from every .c file, and it should be included before any other include. Fix that. (As a side effect of how I did this, this also changes us to consistently use "config.h" rather than <config.h>. To the extent that it matters [which is not much], quotes are more correct anyway, since we're talking about a file in our own build tree, not a system include.)
* core: drop all remaining core-internal error domainsDan Winship2014-10-221-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | A number of classes in core had their own error domains that aren't really necessary. In the case of NMDcbError, NMDhcpManagerError, NMDnsManagerError, NMDnsmasqManagerError, NMPppManagerError, and NMSessionMonitorError, most of the codes they defined weren't even being used, and at any rate, the errors were always returned into contexts where they would just have their message extracted and then get thrown away without anyone ever looking at the domain or code. So all uses of those domains can just be replaced with NM_MANAGER_ERROR_FAILED without any loss of information. NMAuthManagerError only had 1 error code, and it just indicated "something went wrong", so it can be replaced with NM_MANAGER_ERROR_FAILED without loss of information. (nm-auth-manager.c has also been fixed to return NM_MANAGER_ERROR_FAILED when the CheckAuthorization D-Bus call fails, rather than returning whatever error domain/code the D-Bus call returned.) NMVpnManagerError used 2 of its 4 error codes, and they could actually end up getting returned across D-Bus in some cases. But there are NMManagerError codes that are semantically similar enough to make the NMVpnManagerError ones unnecessary.
* auth: support disabling POLKIT authentication entirely at compile timeThomas Haller2014-09-291-0/+17
| | | | | | | | | | | | | Let the user completly disable polkit authentication by building NM with configure option '--enable-polkit=disabled'. In that case, configuring 'main.auth-polkit=yes' will fail all authentication requests (except root-requests, which are always granted). This reduces the size of the NetworkManager binary by some 26KB (16KB stripped). Signed-off-by: Thomas Haller <thaller@redhat.com>
* auth: rework polkit autorization to use DBUS interface directlyThomas Haller2014-09-291-0/+643
This makes NetworkManager independent of <polkit/polkit.h> development headers and libpolkit-gobject-1.so library. Instead communicate directly with polkit using its DBUS interface. PolicyKit support is now always compiled in. You can control polkit authorization with the configuration option [main] auth-polkit=yes|no If the configure option is omitted, a build time default value is used. This default value can be set with the configure option --enable-polkit. This commit adds a new class NMAuthManager that reimplements the relevant DBUS client parts. It takes source code from the polkit library. https://bugzilla.gnome.org/show_bug.cgi?id=734146 Signed-off-by: Thomas Haller <thaller@redhat.com>