Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/openssh: Add sysusers.d snippet
@ 2018-01-23 23:22 Chris Lesiak
  2018-02-06 15:10 ` Samuel Martin
  2018-02-16 18:10 ` [Buildroot] [PATCH v2] " Chris Lesiak
  0 siblings, 2 replies; 15+ messages in thread
From: Chris Lesiak @ 2018-01-23 23:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
---
 package/openssh/openssh.mk | 8 ++++++++
 package/openssh/sshd.conf  | 5 +++++
 2 files changed, 13 insertions(+)
 create mode 100644 package/openssh/sshd.conf

diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
index 6b7ac22c19..fc82300ab7 100644
--- a/package/openssh/openssh.mk
+++ b/package/openssh/openssh.mk
@@ -60,12 +60,20 @@ else
 OPENSSH_CONF_OPTS += --without-selinux
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
+define OPENSSH_INSTALL_SYSTEMD_SYSUSERS
+	$(INSTALL) -m 0644 -D package/openssh/sshd.conf \
+		$(TARGET_DIR)/usr/lib/sysusers.d/sshd.conf
+endef
+endif
+
 define OPENSSH_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/openssh/sshd.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/sshd.service
 	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 	ln -fs ../../../../usr/lib/systemd/system/sshd.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service
+	$(OPENSSH_INSTALL_SYSTEMD_SYSUSERS)
 endef
 
 define OPENSSH_INSTALL_INIT_SYSV
diff --git a/package/openssh/sshd.conf b/package/openssh/sshd.conf
new file mode 100644
index 0000000000..3ea46f65c6
--- /dev/null
+++ b/package/openssh/sshd.conf
@@ -0,0 +1,5 @@
+# sysusers.d snippet for creating the sshd system user automatically
+# at boot on systemd-based systems that ship with an unpopulated
+# /etc. See sysusers.d(5) for details.
+
+u sshd - "Privilege-separated SSH"
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-02-06 13:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 23:22 [Buildroot] [PATCH] package/openssh: Add sysusers.d snippet Chris Lesiak
2018-02-06 15:10 ` Samuel Martin
2018-02-16 18:10 ` [Buildroot] [PATCH v2] " Chris Lesiak
2018-12-16 13:45   ` Yann E. MORIN
2018-12-17 15:07     ` Chris Lesiak
2018-12-17 18:13       ` Yann E. MORIN
2018-12-17 21:24         ` Chris Lesiak
2018-12-17 22:59         ` Arnout Vandecappelle
2018-12-18  7:49           ` Thomas Petazzoni
2018-12-18 14:14             ` Chris Lesiak
2018-12-18 14:32               ` Arnout Vandecappelle
2018-12-18 17:03                 ` Chris Lesiak
2019-02-06 13:13                   ` Arnout Vandecappelle
2018-12-18 20:01               ` Yann E. MORIN
2018-12-18 19:59           ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox