aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRoshan Pius <rpius@chromium.org>2014-11-07 11:29:05 -0800
committerAleksander Morgado <aleksander@aleksander.es>2014-11-18 17:03:01 +0100
commitc474d34db0dd409818b008798df35a212447d0b9 (patch)
tree7fe6e0db43d41b102f35d2ef37faa5148160b1eb /configure.ac
parentaafe3e64abe92fc558044418e75d5f9f9d261118 (diff)
libqmi-glib,proxy: add a configure flag to set the user ID of QMI proxy
Currently, the QMI proxy process assumes that it is run as root user and that all incoming client connection users are also root. However, it's not always preferable to run the QMI proxy as root for security reasons. On some platforms, the QMI proxy could be constrained to run as a less-privileged user and specially granted the permission to access the QMI device. So, adding a compile time flag in libqmi to check for the specified user, rather than assume it to be the root user. If the flag is not sent, it'll revert to the existing behaviour of checking for user=root(i.e UID=0)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3a63843..8c73ca7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,17 @@ AC_SUBST(GLIB_MKENUMS)
dnl Documentation
GTK_DOC_CHECK(1.0)
+# QMI proxy UID
+AC_ARG_ENABLE(qmi-proxy-username,
+ AS_HELP_STRING([--enable-qmi-proxy-username=<username>], [where qmi proxy username is]),
+ qmi_proxy_username=$enableval,
+ qmi_proxy_username="")
+if ! test x"$qmi_proxy_username" = x""; then
+ AC_DEFINE_UNQUOTED(QMI_PROXY_USERNAME, $qmi_proxy_username, [Define the QMI Proxy username])
+else
+ AC_DEFINE(QMI_PROXY_USERNAME, "root", [Define the QMI Proxy username])
+fi
+
dnl Man page
AC_PATH_PROG(HELP2MAN, help2man, false)
AM_CONDITIONAL(BUILDOPT_MAN, test x$HELP2MAN != xfalse)