How to Use Special Chars in Polices From SSSD

Johnathan Smith <[email protected]> Thu, 17 Oct 2019 15:48:01 -0500
Newsgroups gmane.comp.tools.sudo.user
Message-ID <CAJ15F2Bb18BawVGYgCEHw+k3-0T3DLz=HTJQvn3ehhXpu3bRrw@mail.gmail.com>
In sudo 1.8.25 with the policy coming through SSSD, how do I setup a policy
that includes special chars with an LDAP based policy?

As a simple example, I am trying to run:
sudo echo "q\nq"
where the \n is treated as a newline.

Currently, the only way I have been able to do this is with
sudoCommand: /bin/echo -e "q\nq"
and by running
sudo echo -e \"q\nq\"

If I remove the quotes in the policy, sudo -l shows
/bin/echo -e q\\nq
as the allowed command and the double slashes won't ever match what I need.

Having to escape the quotes while running the command is not ideal. If
there is another way to do this, I would appreciate the help.

Thanks,
John
____________________________________________________________
sudo-users mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-users