summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2016-06-30 19:21:13 -0400
committerdormando <dormando@rydia.net>2016-07-01 18:11:45 -0700
commit84af23d267228c99e3ca01cb8bad96b49256ec17 (patch)
tree25ee3ca55e840963f3513fd7d800cb2d4af30c60 /scripts
parent6b52e0196ceb904570b2ae8cc9b38930d27e9f47 (diff)
downloadmemcached-84af23d267228c99e3ca01cb8bad96b49256ec17.tar.gz
Comment the systemd service1.4.28
Diffstat (limited to 'scripts')
-rw-r--r--scripts/memcached.service20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/memcached.service b/scripts/memcached.service
index fbeb03d..ca75200 100644
--- a/scripts/memcached.service
+++ b/scripts/memcached.service
@@ -1,3 +1,12 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during upgrades. If you want to customize, the best
+# way is to create a file "/etc/systemd/system/httpd.service",
+# containing
+# .include /lib/systemd/system/memcached.service
+# ...make your changes here...
+# See https://www.freedesktop.org/software/systemd/man/systemd.service.html
+# for detailed information about available options.
+
[Unit]
Description=memcached daemon
After=network.target
@@ -6,9 +15,20 @@ After=network.target
EnvironmentFile=/etc/sysconfig/memcached
ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
+# Set up a new file system namespace and mounts private /tmp and /var/tmp directories
+# so this service cannot access the global directories and other processes cannot
+# access this service's directories.
PrivateTmp=true
+
+# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit.
ProtectSystem=full
+
+# Ensures that the service process and all its children can never gain new privileges
NoNewPrivileges=true
+
+# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices
+# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it,
+# but no physical devices such as /dev/sda.
PrivateDevices=true
# Required for dropping privileges and running as a different user