This avoid using `nobody` as user since multiple services fallback to
this user, resulting in a security issue. The UID was taken from Gentoos
`acct-user` repository.
https://gitweb.gentoo.org/repo/gentoo.git/tree/acct-user/memcached/memcached-0-r1.ebuild
Signed-off-by: Paul Spooren <mail@aparcar.org>
DEPENDS:=+libevent2 +libpthread
TITLE:=The high-performance, distributed memory object caching system
URL:=https://memcached.org/
+ USERID:=memcached=441:memcached=441
endef
define Package/memcached/description
config memcached
- option user 'nobody'
+ option user 'memcached'
option maxconn '1024'
option listen '0.0.0.0'
option port '11211'
config_get port "$section" port
config_get memory "$section" memory
- service_start /usr/bin/memcached -d -u ${user:-nobody} \
+ service_start /usr/bin/memcached -d -u ${user:-memcached} \
-c ${maxconn:-1024} -l ${listen:-0.0.0.0} \
-p ${port:-11211} -U ${port:-11211} -m ${memory:-64}
}