Print this page
    
Have openssh properly use auditing to provide audit context for logins.
Patches pulled from SmartOS, originally done by:
        Alex Wilson <alex.wilson@joyent.com>
NOTE: This is a sideport from their illumos-extra, and it needs tracking.
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/build/openssh/build.sh
          +++ new/build/openssh/build.sh
   1    1  #!/usr/bin/bash
   2    2  #
   3    3  # CDDL HEADER START
   4    4  #
   5    5  # The contents of this file are subject to the terms of the
   6    6  # Common Development and Distribution License, Version 1.0 only
   7    7  # (the "License").  You may not use this file except in compliance
   8    8  # with the License.
   9    9  #
  10   10  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  11   11  # or http://www.opensolaris.org/os/licensing.
  12   12  # See the License for the specific language governing permissions
  13   13  # and limitations under the License.
  14   14  #
  15   15  # When distributing Covered Code, include this CDDL HEADER in each
  16   16  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17   17  # If applicable, add the following below this CDDL HEADER, with the
  18   18  # fields enclosed by brackets "[]" replaced with your own identifying
  19   19  # information: Portions Copyright [yyyy] [name of copyright owner]
  20   20  #
  21   21  # CDDL HEADER END
  22   22  #
  23   23  #
  24   24  # Copyright 2011-2013 OmniTI Computer Consulting, Inc.  All rights reserved.
  25   25  # Use is subject to license terms.
  26   26  #
  27   27  # Load support functions
  28   28  . ../../lib/functions.sh
  29   29  
  30   30  PROG=openssh
  31   31  VER=7.1p1
  32   32  VERHUMAN=$VER
  33   33  PKG=network/openssh
  34   34  SUMMARY="OpenSSH Client and utilities"
  35   35  DESC="OpenSSH Secure Shell protocol Client and associated Utilities"
  36   36  
  37   37  BUILDARCH=32
  38   38  # Since we're only building 32-bit, don't bother with isaexec subdirs
  39   39  CONFIGURE_OPTS_32="
  40   40      --prefix=$PREFIX
  41   41      --sysconfdir=/etc/ssh
  42   42      --includedir=$PREFIX/include
  43   43      --bindir=$PREFIX/bin
  44   44      --sbindir=$PREFIX/sbin
  
    | 
      ↓ open down ↓ | 
    44 lines elided | 
    
      ↑ open up ↑ | 
  
  45   45      --libdir=$PREFIX/lib
  46   46      --libexecdir=$PREFIX/libexec
  47   47      "
  48   48  # Feature choices
  49   49  CONFIGURE_OPTS="
  50   50      --with-solaris-contracts
  51   51      --with-solaris-projects
  52   52      --with-tcp-wrappers
  53   53      --with-ssl-engine
  54   54      --with-pam
       55 +    --with-audit=solaris
  55   56      "
  56   57  
  57   58  install_smf() {
  58   59      logmsg "Installing SMF components"
  59   60      logcmd mkdir -p $DESTDIR/lib/svc/manifest/network || \
  60   61          logerr "--- Failed to create manifest directory"
  61   62      logcmd cp $SRCDIR/ssh.xml $DESTDIR/lib/svc/manifest/network/ || \
  62   63          logerr "--- Failed to copy manifest file"
  63   64      logcmd mkdir -p $DESTDIR/lib/svc/method || \
  64   65          logerr "--- Failed to create method directory"
  65   66      logcmd cp $SRCDIR/method-sshd $DESTDIR/lib/svc/method/sshd || \
  66   67          logerr "--- Failed to copy method script"
  67   68  }
  68   69  
       70 +CFLAGS+="-DPAM_ENHANCEMENT -DSET_USE_PAM -DPAM_BUGFIX -DDTRACE_SFTP"
       71 +
  69   72  init
  70   73  download_source $PROG $PROG $VER
  71   74  patch_source
  72   75  prep_build
       76 +run_autoconf
  73   77  build
  74   78  
  75   79  # Remove the letter from VER for packaging
  76   80  VER=${VER//p/.}
  77   81  
  78   82  # Client package
  79   83  RUN_DEPENDS_IPS="-pkg:/network/ssh -pkg:/network/ssh/ssh-key"
  80   84  make_package client.mog
  81   85  
  82   86  # Server package
  83   87  PKG=network/openssh-server
  84   88  PKGE=$(url_encode $PKG)
  85   89  SUMMARY="OpenSSH Server"
  86   90  DESC="OpenSSH Secure Shell protocol Server"
  87   91  RUN_DEPENDS_IPS="-pkg:/service/network/ssh pkg:/network/openssh@$VER"
  88   92  install_smf
  89   93  make_package server.mog
  90   94  
  91   95  clean_up
  92   96  
  93   97  # Vim hints
  94   98  # vim:ts=4:sw=4:et:
  
    | 
      ↓ open down ↓ | 
    12 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX