Changeset 38494


Ignore:
Timestamp:
2013-10-22T03:12:31+02:00 (4 years ago)
Author:
tripolar
Message:

[packages] add openssh-server-pam
this adds openssh-server with pam support
the user still has the change this settings in
/etc/ssh/sshd_config:

PasswordAuthentication no
UsePAM yes

to use pam. To avoid having two moduli files which is just
static data, openssh-moduli now depends on ssh-keygen.

based on patch from DkSouls

Signed-off-by: Peter Wagner <tripolar@…>

Location:
packages/net/openssh
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/openssh/Makefile

    r38136 r38494  
    1010PKG_NAME:=openssh 
    1111PKG_VERSION:=6.3p1 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     
    1818                ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/ 
    1919PKG_MD5SUM:=225e75c9856f76011966013163784038 
     20 
     21 
     22PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) 
    2023 
    2124PKG_BUILD_DEPENDS:=libopenssl 
     
    3134  URL:=http://www.openssh.com/ 
    3235  SUBMENU:=SSH 
     36  VARIANT:=without-pam 
    3337endef 
    3438 
    3539define Package/openssh-moduli 
    3640  $(call Package/openssh/Default) 
    37   DEPENDS+= +openssh-server 
     41  DEPENDS+= +openssh-keygen 
    3842  TITLE+= moduli file 
    3943endef 
     
    4347endef 
    4448 
    45  
    4649define Package/openssh-client 
    4750  $(call Package/openssh/Default) 
     
    8790 
    8891define Package/openssh-server/conffiles 
     92/etc/ssh/sshd_config 
     93endef 
     94 
     95define Package/openssh-server-pam 
     96  $(call Package/openssh/Default) 
     97  DEPENDS+= +libpthread +openssh-keygen +libpam 
     98  TITLE+= server (with PAM support) 
     99  VARIANT:=with-pam 
     100endef 
     101 
     102define Package/openssh-server-pam/description 
     103OpenSSH server (with PAM support). 
     104endef 
     105 
     106define Package/openssh-server-pam/conffiles 
     107/etc/pam.d/sshd 
     108/etc/security/access-sshd-local.conf 
    89109/etc/ssh/sshd_config 
    90110endef 
     
    125145        --without-bsd-auth \ 
    126146        --without-kerberos5 \ 
    127         --without-pam \ 
    128147        --without-x 
     148 
     149ifeq ($(BUILD_VARIANT),with-pam) 
     150CONFIGURE_ARGS += \ 
     151        --with-pam 
     152else 
     153CONFIGURE_ARGS += \ 
     154        --without-pam 
     155endif 
    129156 
    130157ifeq ($(CONFIG_OPENSSL_ENGINE),y) 
     
    139166 
    140167CONFIGURE_VARS += LD="$(TARGET_CC)" 
     168 
     169ifeq ($(BUILD_VARIANT),with-pam) 
     170TARGET_LDFLAGS += -lpthread 
     171endif 
    141172 
    142173define Build/Compile 
     
    153184define Package/openssh-moduli/install 
    154185        $(INSTALL_DIR) $(1)/etc/ssh 
    155         $(CP) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/ 
     186        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/ 
    156187endef 
    157188 
     
    179210        $(INSTALL_DIR) $(1)/etc/ssh 
    180211        chmod 0700 $(1)/etc/ssh 
    181         $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/ 
     212        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/ 
     213        $(INSTALL_DIR) $(1)/etc/init.d 
     214        $(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd 
     215        $(INSTALL_DIR) $(1)/usr/sbin 
     216        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(1)/usr/sbin/ 
     217endef 
     218 
     219define Package/openssh-server-pam/install 
     220        $(INSTALL_DIR) $(1)/etc/ssh 
     221        chmod 0700 $(1)/etc/ssh 
     222        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/ 
     223        $(INSTALL_DIR) $(1)/etc/pam.d 
     224        $(INSTALL_DATA) ./files/sshd.pam $(1)/etc/pam.d/sshd 
     225        $(INSTALL_DIR) $(1)/etc/security 
     226        $(INSTALL_DATA) ./files/sshd.pam-access $(1)/etc/security/access-sshd-local.conf 
    182227        $(INSTALL_DIR) $(1)/etc/init.d 
    183228        $(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd 
     
    203248$(eval $(call BuildPackage,openssh-keygen)) 
    204249$(eval $(call BuildPackage,openssh-server)) 
     250$(eval $(call BuildPackage,openssh-server-pam)) 
    205251$(eval $(call BuildPackage,openssh-sftp-client)) 
    206252$(eval $(call BuildPackage,openssh-sftp-server)) 
Note: See TracChangeset for help on using the changeset viewer.