@@ -26,6 +26,9 @@ WorkingDirectory=/usr/share/opensearch
26
26
User =opensearch
27
27
Group =opensearch
28
28
29
+ ExecStartPre =/bin/mkdir -p /dev/shm/performanceanalyzer
30
+ ExecStartPre =/bin/chown opensearch:opensearch /dev/shm/performanceanalyzer
31
+
29
32
ExecStart =/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet
30
33
31
34
# StandardOutput is configured to redirect to journalctl since
@@ -130,6 +133,7 @@ RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
130
133
131
134
ReadWritePaths =/var/log/opensearch
132
135
ReadWritePaths =/var/lib/opensearch
136
+ ReadWritePaths =/dev/shm/
133
137
ReadWritePaths =-/etc/opensearch
134
138
ReadWritePaths =-/mnt/snapshots
135
139
@@ -149,17 +153,25 @@ RestrictNamespaces=true
149
153
NoNewPrivileges =true
150
154
151
155
# Memory and execution protection
152
- MemoryDenyWriteExecute =true # Prevent creating writable executable memory mappings
153
- SystemCallArchitectures =native # Allow only native system calls
154
- KeyringMode =private # Service does not share key material with other services
155
- LockPersonality =true # Prevent changing ABI personality
156
- RestrictSUIDSGID =true # Prevent creating SUID/SGID files
157
- RestrictRealtime =true # Prevent acquiring realtime scheduling
158
- ProtectHostname =true # Prevent changes to system hostname
159
- ProtectKernelLogs =true # Prevent reading/writing kernel logs
160
- ProtectClock =true # Prevent tampering with the system clock
156
+
157
+ # Allow only native system calls
158
+ SystemCallArchitectures =native
159
+ # Service does not share key material with other services
160
+ KeyringMode =private
161
+ # Prevent changing ABI personality
162
+ LockPersonality =true
163
+ # Prevent creating SUID/SGID files
164
+ RestrictSUIDSGID =true
165
+ # Prevent acquiring realtime scheduling
166
+ RestrictRealtime =true
167
+ # Prevent changes to system hostname
168
+ ProtectHostname =true
169
+ # Prevent reading/writing kernel logs
170
+ ProtectKernelLogs =true
171
+ # Prevent tampering with the system clock
172
+ ProtectClock =true
161
173
162
174
[Install]
163
175
WantedBy =multi-user.target
164
176
165
- # Built for ${project.name}-${project.version} (${project.name})
177
+ # Built for ${project.name}-${project.version} (${project.name})
0 commit comments