[augeas-devel] [Augeas] #52: Double quotes issue in lists in sudoers
Augeas
trac at fedorahosted.org
Sat Mar 28 10:36:59 UTC 2009
#52: Double quotes issue in lists in sudoers
---------------------+------------------------------------------------------
Reporter: raphink | Owner: lutter
Type: defect | Status: new
Priority: major | Milestone: next
Component: Augeas | Version: 0.4.1
Keywords: |
---------------------+------------------------------------------------------
Let's say we have an env_keep with only one value put within double quotes
(which is optional, but possible) :[[BR]]
{{{
Defaults env_keep = "TEST"
}}}
which will get mapped as
{{{
/files/etc/sudoers/Defaults/env_keep
/files/etc/sudoers/Defaults/env_keep/var[1] = "\"TEST\""
}}}
If we add a second variable to this env_keep, we will get :
{{{
/files/etc/sudoers/Defaults/env_keep
/files/etc/sudoers/Defaults/env_keep/var[1] = "\"TEST\""
/files/etc/sudoers/Defaults/env_keep/var[2] = "TEST2"
}}}
which fails to save because "\"TEST\"" is only an acceptable value if you
have only one variable.[[BR]]
On the other hand, the options to fix this are :[[BR]]
* force the use of double quotes for all number of variables, even if
there is only one. In this case, Augeas will not be able to parse a single
variable without double quotes...[[BR]]
* consider that double quotes are not part of the value when it's a single
value, but ignore them instead. In that case, the double quotes will have
to be optional on both sides of the value, hence independent from one
another, so that '"TEST' will be an acceptable value, eventhough it is not
correct in the sudoers format.
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/52>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list