summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-09 18:13:28 +0200
committerThomas Haller <thaller@redhat.com>2018-04-13 09:09:46 +0200
commit41abf9f8e81423eff0ef888d17a5454d0b5750bf (patch)
treeffbd8d6caf494d640c7a21e928251be51b9ba79f /configure.ac
parent2ea2df3184d45567fa9c44f5ef90634a779bfb75 (diff)
downloadNetworkManager-41abf9f8e81423eff0ef888d17a5454d0b5750bf.tar.gz
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code to handle the D-Bus calls. For that, there was a compile time option to even stip out that code. Note, that you could (and still can) configure the system not to use policy-kit. The point was to reduce the binary size in case you don't need it. Remove this. I guess, we we aim for such aggressive optimization of the binary size, we should instead make all device types disablable at configuration time. We don't do that either and other low hanging fruits, because it's better to always enable features, unless they require external dependencies. Also, the next commit will make more use of NMAuthManager. So, having it disabled at compile time, makes even less sense.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 8 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index a0600e1ca7..c703890e1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -629,26 +629,20 @@ AM_CONDITIONAL(WITH_JSON_VALIDATION, test "${enable_json_validation}" != "no")
# we usually compile with polkit support. --enable-polkit=yes|no only sets the
# default configuration for main.auth-polkit. User can always enable/disable polkit
-# autorization via config. Only when specifying --enable-polkit=disabled, we do
-# not compile support. In this case, the user cannot enable polkit authorization via
-# configuration.
+# autorization via config.
AC_ARG_ENABLE(polkit,
- AS_HELP_STRING([--enable-polkit=yes|no|disabled],
- [set default value for auth-polkit configuration option. This value can be overwritten by NM configuration. 'disabled' compiles NM without any support]),
+ AS_HELP_STRING([--enable-polkit=yes|no],
+ [set default value for auth-polkit configuration option. This value can be overwritten by NM configuration. 'disabled' is an alias for 'no']),
[enable_polkit=${enableval}], [enable_polkit=yes])
if (test "${enable_polkit}" != "no" -a "${enable_polkit}" != "disabled"); then
- enable_polkit=yes
+ enable_polkit=true
AC_DEFINE(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "true", [The default value of the auth-polkit configuration option])
AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, true)
else
+ enable_polkit=false
AC_DEFINE(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "false", [The default value of the auth-polkit configuration option])
AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, false)
fi
-if (test "${enable_polkit}" != "disabled"); then
- AC_DEFINE(WITH_POLKIT, 1, [whether to compile polkit support])
-else
- AC_DEFINE(WITH_POLKIT, 0, [whether to compile polkit support])
-fi
PKG_CHECK_MODULES(POLKIT, [polkit-agent-1 >= 0.97], [have_pk_agent=yes],[have_pk_agent=no])
AC_ARG_ENABLE(polkit-agent,
@@ -1341,14 +1335,10 @@ echo
echo "Platform:"
echo " session tracking: $session_tracking"
echo " suspend/resume: $with_suspend_resume"
-if test "${enable_polkit}" = "yes"; then
- if test "${enable_modify_system}" = "yes"; then
- echo " policykit: yes (permissive modify.system) (default: main.auth-polkit=${enable_polkit})"
- else
- echo " policykit: yes (restrictive modify.system) (default: main.auth-polkit=${enable_polkit})"
- fi
+if test "${enable_modify_system}" = "yes"; then
+ echo " policykit: main.auth-polkit=${enable_polkit} (permissive modify.system)"
else
- echo " policykit: no"
+ echo " policykit: main.auth-polkit=${enable_polkit} (restrictive modify.system)"
fi
echo " polkit agent: ${enable_polkit_agent}"
echo " selinux: $have_selinux"