Print this page
First stab at the full Joyent wad (still needs work!!!)

Split Close
Expand all
Collapse all
          --- old/build/openssh/patches/0014-Solaris-Auditing-support.patch
          +++ new/build/openssh/patches/0015-Solaris-Auditing-support.patch
   1      -From 6d74600c9a8d52d7b03fd4274a415e980b77d4b6 Mon Sep 17 00:00:00 2001
        1 +From b60fe491735349ba901b371dc8a0d1cd5ab163da Mon Sep 17 00:00:00 2001
   2    2  From: oracle <solaris@oracle.com>
   3    3  Date: Mon, 3 Aug 2015 14:37:01 -0700
   4      -Subject: [PATCH 14/30] Solaris Auditing support
        4 +Subject: [PATCH 15/36] Solaris Auditing support
   5    5  
   6    6  #
   7    7  # Add Solaris Auditing configuration (--with-audit=solaris) to openssh-6.5p1.
   8    8  #
   9    9  # Add phase 1 Solaris Auditing of sshd login/logout to openssh-6.5p1.
  10   10  #
  11   11  # Additional Solaris Auditing should include audit of password
  12   12  #  change.
  13   13  # Presuming it is appropriate, this patch should/will be updated
  14   14  #  with additional files and updates to sources/audit-solaris.c
↓ open down ↓ 48 lines elided ↑ open up ↑
  63   63   --with-audit=[module] enable additional auditing via the specified module.
  64   64  -Currently, drivers for "debug" (additional info via syslog) and "bsm"
  65   65  -(Sun's Basic Security Module) are supported.
  66   66  +Currently, drivers for "debug" (additional info via syslog), and "bsm"
  67   67  +(Sun's Legacy Basic Security Module prior to Solaris 11), and "solaris"
  68   68  +(Sun's Audit infrastructure from Solaris 11) are supported.
  69   69   
  70   70   --with-pam enables PAM support. If PAM support is compiled in, it must
  71   71   also be enabled in sshd_config (refer to the UsePAM directive).
  72   72  diff --git a/Makefile.in b/Makefile.in
  73      -index 5bf2a06..e19c665 100644
       73 +index 121a261..62e6a84 100644
  74   74  --- a/Makefile.in
  75   75  +++ b/Makefile.in
  76      -@@ -100,7 +100,7 @@ SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
       76 +@@ -101,7 +101,7 @@ SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
  77   77          roaming_common.o roaming_client.o
  78   78   
  79   79   SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
  80   80  -       audit.o audit-bsm.o audit-linux.o platform.o \
  81   81  +       audit.o audit-bsm.o audit-linux.o audit-solaris.o platform.o \
  82   82          sshpty.o sshlogin.o servconf.o serverloop.o \
  83   83          auth.o auth1.o auth2.o auth-options.o session.o \
  84   84          auth-chall.o auth2-chall.o groupaccess.o \
  85   85  diff --git a/README.platform b/README.platform
  86   86  index d198232..6949998 100644
↓ open down ↓ 582 lines elided ↑ open up ↑
 669  669  +       }
 670  670  +       __auditd_debug("%d/%d:%d-audit_fail+put_event() ah=%p\n", getpid(),
 671  671  +           getuid(), geteuid(), (void *)ah);
 672  672  +       /* should audit authentication with failed password change here. */
 673  673  +       adt_free_event(event);
 674  674  +done:
 675  675  +       (void) adt_end_session(ah);
 676  676  +}
 677  677  +#endif /* USE_SOLARIS_AUDIT */
 678  678  diff --git a/configure.ac b/configure.ac
 679      -index 81edc01..27b95cb 100644
      679 +index 2985819..b38b1b3 100644
 680  680  --- a/configure.ac
 681  681  +++ b/configure.ac
 682      -@@ -1518,7 +1518,7 @@ AC_ARG_WITH([libedit],
      682 +@@ -1547,7 +1547,7 @@ AC_ARG_WITH([libedit],
 683  683   
 684  684   AUDIT_MODULE=none
 685  685   AC_ARG_WITH([audit],
 686  686  -       [  --with-audit=module     Enable audit support (modules=debug,bsm,linux)],
 687  687  +       [  --with-audit=module     Enable audit support (modules=debug,bsm,linux,solaris)],
 688  688          [
 689  689            AC_MSG_CHECKING([for supported audit module])
 690  690            case "$withval" in
 691      -@@ -1555,6 +1555,13 @@ AC_ARG_WITH([audit],
      691 +@@ -1584,6 +1584,13 @@ AC_ARG_WITH([audit],
 692  692                  SSHDLIBS="$SSHDLIBS -laudit"
 693  693                  AC_DEFINE([USE_LINUX_AUDIT], [1], [Use Linux audit module])
 694  694                  ;;
 695  695  +      solaris)
 696  696  +        AC_MSG_RESULT([solaris])
 697  697  +        AUDIT_MODULE=solaris
 698  698  +        AC_CHECK_HEADERS([bsm/adt.h])
 699  699  +        SSHDLIBS="$SSHDLIBS -lbsm"
 700  700  +        AC_DEFINE([USE_SOLARIS_AUDIT], [1], [Use Solaris audit module])
 701  701  +        ;;
↓ open down ↓ 10 lines elided ↑ open up ↑
 712  712   
 713  713  +#ifdef USE_SOLARIS_AUDIT
 714  714  +# define SSH_AUDIT_EVENTS
 715  715  +# define CUSTOM_SSH_AUDIT_EVENTS
 716  716  +#endif
 717  717  +
 718  718   #if !defined(HAVE___func__) && defined(HAVE___FUNCTION__)
 719  719   #  define __func__ __FUNCTION__
 720  720   #elif !defined(HAVE___func__)
 721  721  diff --git a/sshd.c b/sshd.c
 722      -index 5a00ae2..f577f75 100644
      722 +index 7e519d4..87032ec 100644
 723  723  --- a/sshd.c
 724  724  +++ b/sshd.c
 725      -@@ -2228,7 +2228,9 @@ main(int ac, char **av)
      725 +@@ -2234,7 +2234,9 @@ main(int ac, char **av)
 726  726          }
 727  727   
 728  728   #ifdef SSH_AUDIT_EVENTS
 729  729  +#ifndef        USE_SOLARIS_AUDIT
 730  730          audit_event(SSH_AUTH_SUCCESS);
 731  731  +#endif /* !USE_SOLARIS_AUDIT */
 732  732   #endif
 733  733   
 734  734   #ifdef GSSAPI
 735      -@@ -2258,6 +2260,10 @@ main(int ac, char **av)
      735 +@@ -2264,6 +2266,10 @@ main(int ac, char **av)
 736  736                  do_pam_session();
 737  737          }
 738  738   #endif
 739  739  +#ifdef USE_SOLARIS_AUDIT
 740  740  +       /* Audit should take place after all successful pam */
 741  741  +       audit_event(SSH_AUTH_SUCCESS);
 742  742  +#endif /* USE_SOLARIS_AUDIT */
 743  743   
 744  744          /*
 745  745           * In privilege separation, we fork another child and prepare
 746  746  -- 
 747      -2.3.2 (Apple Git-55)
      747 +2.5.4 (Apple Git-61)
 748  748  
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX