Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
e597522f
Commit
e597522f
authored
Aug 28, 2009
by
Marc Fournier
Browse files
postfix: selinux labels differ from one distribution to another
parent
dfc16f3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/classes/postfix.pp
View file @
e597522f
...
@@ -6,6 +6,21 @@
...
@@ -6,6 +6,21 @@
class
postfix
{
class
postfix
{
case
$operatingsystem
{
RedHat
:
{
case
$lsbmajdistrelease
{
"4"
:
{
$postfix_seltype
=
"etc_t"
}
"5"
:
{
$postfix_seltype
=
"postfix_etc_t"
}
default
:
{
$postfix_seltype
=
undef
}
}
}
default
:
{
$postfix_seltype
=
undef
}
}
# Default value for various options
# Default value for various options
case
$postfix_ng_smtp_listen
{
case
$postfix_ng_smtp_listen
{
""
:
{
$postfix_ng_smtp_listen
=
"127.0.0.1"
}
""
:
{
$postfix_ng_smtp_listen
=
"127.0.0.1"
}
...
@@ -27,7 +42,7 @@ class postfix {
...
@@ -27,7 +42,7 @@ class postfix {
file
{
"/etc/mailname"
:
file
{
"/etc/mailname"
:
ensure
=>
present
,
ensure
=>
present
,
content
=>
"
${fqdn}
\n
"
,
content
=>
"
${fqdn}
\n
"
,
seltype
=>
"
postfix_
etc_t"
,
seltype
=>
$
postfix_
seltype
,
}
}
# Aliases
# Aliases
...
@@ -36,7 +51,7 @@ class postfix {
...
@@ -36,7 +51,7 @@ class postfix {
ensure
=>
present
,
ensure
=>
present
,
content
=>
"# file managed by puppet
\n
"
,
content
=>
"# file managed by puppet
\n
"
,
replace
=>
false
,
replace
=>
false
,
seltype
=>
"
postfix_
etc_t"
,
seltype
=>
$
postfix_
seltype
,
notify
=>
Exec
[
"newaliases"
],
notify
=>
Exec
[
"newaliases"
],
}
}
...
@@ -57,6 +72,7 @@ class postfix {
...
@@ -57,6 +72,7 @@ class postfix {
Redhat
=>
template
(
"postfix/master.cf.redhat5.erb"
),
Redhat
=>
template
(
"postfix/master.cf.redhat5.erb"
),
Debian
=>
template
(
"postfix/master.cf.debian-etch.erb"
),
Debian
=>
template
(
"postfix/master.cf.debian-etch.erb"
),
},
},
seltype
=>
$postfix_seltype
,
notify
=>
Service
[
"postfix"
],
notify
=>
Service
[
"postfix"
],
require
=>
Package
[
"postfix"
],
require
=>
Package
[
"postfix"
],
}
}
...
@@ -67,6 +83,7 @@ class postfix {
...
@@ -67,6 +83,7 @@ class postfix {
mode
=>
"0644"
,
mode
=>
"0644"
,
source
=>
"puppet:///postfix/main.cf"
,
source
=>
"puppet:///postfix/main.cf"
,
replace
=>
false
,
replace
=>
false
,
seltype
=>
$postfix_seltype
,
notify
=>
Service
[
"postfix"
],
notify
=>
Service
[
"postfix"
],
require
=>
Package
[
"postfix"
],
require
=>
Package
[
"postfix"
],
}
}
...
...
manifests/definitions/hash.pp
View file @
e597522f
define
postfix::hash
(
$ensure
)
{
define
postfix::hash
(
$ensure
)
{
case
$operatingsystem
{
RedHat
:
{
case
$lsbmajdistrelease
{
"4"
:
{
$postfix_seltype
=
"etc_t"
}
"5"
:
{
$postfix_seltype
=
"postfix_etc_t"
}
default
:
{
$postfix_seltype
=
undef
}
}
}
default
:
{
$postfix_seltype
=
undef
}
}
file
{
"
${name}
"
:
file
{
"
${name}
"
:
ensure
=>
$ensure
,
ensure
=>
$ensure
,
mode
=>
600
,
mode
=>
600
,
seltype
=>
"
postfix_
etc_t"
,
seltype
=>
$
postfix_
seltype
,
require
=>
Package
[
"postfix"
],
require
=>
Package
[
"postfix"
],
}
}
...
@@ -10,7 +26,7 @@ define postfix::hash ($ensure) {
...
@@ -10,7 +26,7 @@ define postfix::hash ($ensure) {
ensure
=>
$ensure
,
ensure
=>
$ensure
,
mode
=>
600
,
mode
=>
600
,
require
=>
[
File
[
"
${name}
"
],
Exec
[
"generate
${name}
.db"
]],
require
=>
[
File
[
"
${name}
"
],
Exec
[
"generate
${name}
.db"
]],
seltype
=>
"
postfix_
etc_t"
,
seltype
=>
$
postfix_
seltype
,
}
}
exec
{
"generate
${name}
.db"
:
exec
{
"generate
${name}
.db"
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment