Changeset 7233c03 in freewrt


Ignore:
Timestamp:
Jul 19, 2006, 1:42:51 AM (19 years ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
fd8198f
Parents:
3397da8
Message:
  • add a separate sshd user
  • use the new uid/gid functions
  • rename init script,standardize

git-svn-id: svn://www.freewrt.org/trunk/freewrt@291 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
package/openssh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • package/openssh/Makefile

    r3397da8 r7233c03  
    55PKG_NAME:=openssh
    66PKG_VERSION:=4.2p1
    7 PKG_RELEASE:=2
     7PKG_RELEASE:=3
    88PKG_MD5SUM:=df899194a340c933944b193477c628fa
     9PKG_START_SERVICE:=50
    910
    1011PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
     
    6970                        --without-pam \
    7071                        --without-x \
     72                    --with-privsep-user=sshd \
     73                        --with-privsep-path=/var/run/sshd \
    7174        );
    7275        touch $@
     
    103106        $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/
    104107        install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/init.d
    105         install -m0755 ./files/S50sshd $(IDIR_OPENSSH_SERVER)/etc/init.d/
     108        install -m0755 ./files/sshd.init \
     109                $(IDIR_OPENSSH_SERVER)/etc/init.d/$(PKG_START_SERVICE)sshd
    106110        install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/bin
    107111        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/
  • package/openssh/ipkg/openssh-server.postinst

    r3397da8 r7233c03  
    11#!/bin/sh
    2 
    3 name=sshd
    4 id=99
    5 
    6 # do not change below
    7 # check if we are on real system
    8 if [ -z "${IPKG_INSTROOT}" ]; then
    9         # create copies of passwd and group, if we use squashfs
    10         rootfs=`mount |awk '/root/ { print $5 }'`
    11         if [ "$rootfs" = "squashfs" ]; then
    12                 if [ -h /etc/group ]; then
    13                         rm /etc/group
    14                         cp /rom/etc/group /etc/group
    15                 fi
    16                 if [ -h /etc/passwd ]; then
    17                         rm /etc/passwd
    18                         cp /rom/etc/passwd /etc/passwd
    19                 fi
    20         fi
    21 fi
    22 
    23 echo ""
    24 if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then
    25         echo "adding group $name to /etc/group"
    26         echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group 
    27 fi
    28 
    29 if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then
    30         echo "adding user $name to /etc/passwd"
    31         echo "${name}:x:${id}:${id}:${name}:/var/empty/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd
    32 fi
     2. $IPKG_INSTROOT/etc/functions.sh
     3add_user sshd $(get_next_uid) $(get_next_gid) /var/run/sshd
     4add_group sshd $(get_next_gid)
     5add_rcconf sshd "sshd=NO"
Note: See TracChangeset for help on using the changeset viewer.