Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc check sshd uid/gid, as well as /var/empty
details: https://anonhg.NetBSD.org/src/rev/efb2945957bf
branches: trunk
changeset: 526966:efb2945957bf
user: itojun <itojun%NetBSD.org@localhost>
date: Tue May 14 23:35:35 2002 +0000
description:
check sshd uid/gid, as well as /var/empty
diffstat:
etc/postinstall | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diffs (81 lines):
diff -r eb837adf89f7 -r efb2945957bf etc/postinstall
--- a/etc/postinstall Tue May 14 23:33:41 2002 +0000
+++ b/etc/postinstall Tue May 14 23:35:35 2002 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.13 2002/05/14 22:41:36 thorpej Exp $
+# $NetBSD: postinstall,v 1.14 2002/05/14 23:35:35 itojun Exp $
#
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -379,6 +379,11 @@
fi
fi
+ if [ ! -d /var/empty ]; then
+ msg "/var/empty has to be present."
+ failed=1
+ fi
+
if rcconf_isset sshd sshd_conf_dir ; then
failed=1
fi
@@ -424,6 +429,7 @@
_named=0
_ntpd=0
+ _sshd=0
while read _name _junk; do
if [ "$_name" = "named" ]; then
_named=1
@@ -431,6 +437,9 @@
if [ "$_name" = "ntpd" ]; then
_ntpd=1
fi
+ if [ "$_name" = "sshd" ]; then
+ _sshd=1
+ fi
done < ${DEST_DIR}/etc/passwd
if [ "$_named" = "0" ]; then
@@ -441,6 +450,10 @@
msg "Required UID ntpd is not found."
failed=1
fi
+ if [ "$_sshd" = "0" ]; then
+ msg "Required UID sshd is not found."
+ failed=1
+ fi
IFS="$_oIFS"
return ${failed}
@@ -461,6 +474,7 @@
_named=0
_ntpd=0
+ _sshd=0
while read _name _junk; do
if [ "$_name" = "named" ]; then
_named=1
@@ -468,6 +482,9 @@
if [ "$_name" = "ntpd" ]; then
_ntpd=1
fi
+ if [ "$_name" = "sshd" ]; then
+ _sshd=1
+ fi
done < ${DEST_DIR}/etc/group
if [ "$_named" = "0" ]; then
@@ -478,6 +495,10 @@
msg "Required GID ntpd is not found."
failed=1
fi
+ if [ "$_sshd" = "0" ]; then
+ msg "Required GID sshd is not found."
+ failed=1
+ fi
IFS="$_oIFS"
return ${failed}
Home |
Main Index |
Thread Index |
Old Index