Re: SELinux blocking Dovecot from mysqld socket

Robert Moskowitz <[email protected]>
Newsgroups gmane.linux.redhat.fedora.selinux
Message-ID <[email protected]>

On 2/5/19 2:06 PM, Todd Zullinger wrote:
> Robert Moskowitz wrote:
>> On 2/5/19 10:41 AM, Ondrej Mosnacek wrote:
>>> cat >dovecot_mysql.te <<EOF
>>> policy_module(dovecot_mysql,1.0.0)
>>> gen_require(`
>>>          type dovecot_t;
>>> ')
>>> mysql_read_config(dovecot_t)
>>> mysql_stream_connect(dovecot_t)
>>> EOF
>> For some reason this made an empty file.  Don't know if it was the lack of
>> spaces on that first line?  I use this myself a lot, but always put spaces
>> around the > and <<
> No need for spaces after >.  The issue with the above
> example is that the HERE-DOC includes "`" chars which bash
> tries to interpret.  It should display an error like this
> when you run it:
>
>      -bash: bad substitution: no closing "`" in `
>
> To fix that, use:
>
>      cat >dovecot_mysql.te <<\EOF
>      ...
>
> The change is the \ preceding EOF, telling bash to not
> perform parameter/command/arithmetic expansions on the
> HERE-DOC contents.
>

Ouch.  I have encountered this before and have had to use the \EOF 
convention.

Missed it this time around.

thanks for pointing it out.
_______________________________________________
selinux mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.