Re: SELinux blocking Dovecot from mysqld socket
Todd Zullinger <[email protected]>
| Newsgroups | gmane.linux.redhat.fedora.selinux |
|---|---|
| Message-ID | <[email protected]> |
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.
--
Todd
_______________________________________________
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]
signature.asc
(application/pgp-signature, 543 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQFEBAEBCAAuBQJcWd7RJxhodHRwczovL3d3dy5wb2JveC5jb20vfnRtei9wZ3Av dG16LmFzYwAKCRBDJZOLvq8M443kCACehcE4zx6LmxA4sGRMv01GcwySHz52ynyt b6bFH41Ox79goHKIFN4B4+JASbeThISRf7osOFjedxwkqKE50HGwjik3soyrzQuQ xYuHyk6cRBl+PdnuVX80e4cBgspfK703sgOXLCEsaFOguDE1+/zbRWvhbmozfXrz xNWDkJSAIUpJGnSiUKHdvYHpRZYS6Y8Qr9rnnOjfw6YbHhQ2lYmQ2eK0jyQG/+SN aUfV2arEDdVSp5QDzP+Kh6QC4SX3InnaAsCkst99WbPjPW0fVde46QuEmv5sd7s2 i7emA1mMQsOyrxCebHbKgF68IR/waQ5u4Qd5KkaNJkVwvfgATMnj =vAq2 -----END PGP SIGNATURE-----