On Mon, 14 Sep 2015 15:13:55 +0200
Jiri Pirko <jiri(a)resnulli.us> wrote:
<snip>
> user=root
>+dbus_policy_template="teamd/teamd.conf.in"
>+dbus_policy_file="teamd/dbus/teamd.conf"
> AC_ARG_WITH([user],
> [AS_HELP_STRING([--with-user@<:@=username@:>@], [Set
> default daemon user @<:@default=root@:>@])], [case "$withval" in
>- yes|no|"") ;;
>- *) user="$withval" ;;
>+ root|yes|no|"") ;;
>+ *) user="$withval"
>+ sed -e "s|[@]teamd_user[@]|$user|g" \
>+ < $dbus_policy_template >
<snip>
>--- /dev/null
>+++ b/teamd/teamd.conf.in
>@@ -0,0 +1,17 @@
>+<?xml version="1.0"?> <!--*-nxml-*-->
>+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus
>Configuration 1.0//EN"
>+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
>+<busconfig>
>+ <policy user="root">
>+ <allow own_prefix="org.libteam.teamd"/>
>+ <allow send_interface="org.libteam.teamd"/>
>+ </policy>
>+ <policy user="@teamd_user@">
>+ <allow own_prefix="org.libteam.teamd"/>
>+ <allow send_interface="org.libteam.teamd"/>
>+ </policy>
Ok, so by default, section for user root will be duplicated? That
looks a bit odd.
No, by default when non-root user is not specified, nothing happens and
regular teamd/dbus/teamd.conf file remains.
When --with-user=$user is specified and it does not equal 'root' the
template is modified and replaces teamd/dbus/teamd.conf.
--
Best Regards,
Pawel Wieczorkiewicz <pwieczorkiewicz(a)suse.de>, Linux System Developer
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu,
Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 / 90409
Nürnberg / Germany / Phone: +49-911-740 53 - 613