Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11699076
D3658.id9476.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3658.id9476.diff
View Options
diff --git a/roles/core/userland-software/base.sls b/roles/core/userland-software/base.sls
--- a/roles/core/userland-software/base.sls
+++ b/roles/core/userland-software/base.sls
@@ -21,18 +21,6 @@
- tcsh
{% endif %}
- # Shell utilities
- {% if grains['os'] == 'FreeBSD' %}
- - starship
- {% endif %}
-
-{% if grains['kernel'] == 'Linux' and grains['osarch'] == 'x86_64' %}
-install_starship:
- cmd.run:
- - name: snap install starship
- - creates: /var/lib/snapd/snap/bin/starship
-{% endif %}
-
/usr/local/share/zsh/site-functions/_pm:
file.managed:
# At commit 683d331 - 2017-11-05
diff --git a/roles/core/userland-software/files/selinux/systemd-hostnamed.te b/roles/core/userland-software/files/selinux/systemd-hostnamed.te
new file mode 100644
--- /dev/null
+++ b/roles/core/userland-software/files/selinux/systemd-hostnamed.te
@@ -0,0 +1,25 @@
+# -------------------------------------------------------------
+# Configuration for systemd-hostnamed for Starship
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Description: SELinux policy to fix T2113
+# Source file: roles/core/userland-software/files/selinux/systemd-hostnamed.te
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+module systemd-hostnamed 1.0;
+
+require {
+ type init_var_run_t;
+ type systemd_hostnamed_t;
+ class sock_file { create unlink };
+}
+
+#============= systemd_hostnamed_t ==============
+allow systemd_hostnamed_t init_var_run_t:sock_file { create unlink };
diff --git a/roles/core/userland-software/init.sls b/roles/core/userland-software/init.sls
--- a/roles/core/userland-software/init.sls
+++ b/roles/core/userland-software/init.sls
@@ -9,3 +9,4 @@
include:
- .sources
- .base
+ - .starship
diff --git a/roles/core/userland-software/starship.sls b/roles/core/userland-software/starship.sls
new file mode 100644
--- /dev/null
+++ b/roles/core/userland-software/starship.sls
@@ -0,0 +1,51 @@
+# -------------------------------------------------------------
+# Salt — Provision software needed by other core roles
+# to deploy on all servers
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs, packages with context %}
+
+# -------------------------------------------------------------
+# Starship installation
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os'] == 'FreeBSD' %}
+starship:
+ pkg.installed
+{% endif %}
+
+{% if grains['kernel'] == 'Linux' and grains['osarch'] == 'x86_64' %}
+install_starship:
+ cmd.run:
+ - name: snap install starship
+ - creates: /var/lib/snapd/snap/bin/starship
+{% endif %}
+
+# -------------------------------------------------------------
+# SELinux
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os_family'] == 'RedHat' %}
+
+/usr/local/share/selinux/systemd-hostnamed.te:
+ file.managed:
+ - source: salt://roles/core/userland-software/files/selinux/systemd-hostnamed.te
+ - makedirs: True
+
+/usr/local/share/selinux/systemd-hostnamed.pp:
+ cmd.run:
+ - name: make -f /usr/share/selinux/devel/Makefile systemd-hostnamed.pp
+ - creates: /usr/local/share/selinux/systemd-hostnamed.pp
+ - cwd: /usr/local/share/selinux
+
+install_selinux_starship_module:
+ cmd.run:
+ - name: semodule -i systemd-hostnamed.pp
+ - cwd: /usr/local/share/selinux
+ - onchanges:
+ - cmd: /usr/local/share/selinux/systemd-hostnamed.pp
+
+{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 13, 05:56 (18 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2979703
Default Alt Text
D3658.id9476.diff (3 KB)
Attached To
Mode
D3658: Allow systemd-hostnamed to create socket when called from Varlink
Attached
Detach File
Event Timeline
Log In to Comment