aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/osiris/Makefile76
-rw-r--r--security/osiris/distinfo4
-rw-r--r--security/osiris/files/patch-osirisd-in16
-rw-r--r--security/osiris/files/patch-osirismd-in17
-rw-r--r--security/osiris/pkg-deinstall50
-rw-r--r--security/osiris/pkg-descr13
-rw-r--r--security/osiris/pkg-install73
-rw-r--r--security/osiris/pkg-plist27
8 files changed, 235 insertions, 41 deletions
diff --git a/security/osiris/Makefile b/security/osiris/Makefile
index 028fa300bdd1..84c776696d05 100644
--- a/security/osiris/Makefile
+++ b/security/osiris/Makefile
@@ -6,46 +6,62 @@
#
PORTNAME= osiris
-PORTVERSION= 1.5.2
+PORTVERSION= 2.4.4
CATEGORIES= security
MASTER_SITES= http://osiris.shmoo.com/data/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-stable
-MAINTAINER= ecu@ipv42.net
-COMMENT= File integrity checking, with GDBM and MySQL support
-
-.if defined(WITH_MYSQL)
-LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
-CONFIGURE_ARGS+= --with-mysql=${LOCALBASE} \
- --enable-module=mysql
-.else
-LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
-CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} \
- --with-module-lib=${LOCALBASE}/lib \
- --with-module-includes=${LOCALBASE}/include
-.endif
-
-NO_CDROM= This software can not be sold.
+MAINTAINER= lx@redundancy.redundancy.org
+COMMENT= The Shmoo client/server host integrity checker
GNU_CONFIGURE= yes
-USE_LIBTOOL_VER=13
-
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+USE_LIBTOOL_VER= 15
-MAN1= osiris.1 scale.1
+DOCS= docs/OsirisUserGuide.pdf docs/OsirisUserGuide.rtf
-pre-configure:
- @${ECHO_MSG} ""
- @${ECHO_MSG} "Set WITH_MYSQL to get MySQL support."
- @${ECHO_MSG} ""
+.if defined(WITH_OSIRISMD)
+PLIST_SUB+= OSIRISMD=""
+.else
+PLIST_SUB+= OSIRISMD="@comment "
+.endif
-post-install:
- ${INSTALL_DATA} ${WRKSRC}/configs/osiris-freebsd-4.4.conf \
- ${PREFIX}/etc/osiris.conf-sample
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
-.for f in docs/manual.html docs/manual.txt
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+pre-everything::
+ @${ECHO_MSG}
+ @${ECHO_MSG} "Define WITH_OSIRISMD to enable build of the management daemon."
+ @${ECHO_MSG}
+
+post-build:
+ ${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/src/install/freebsd/osirisd.in > \
+ ${WRKSRC}/src/install/freebsd/osirisd.sh.sample
+.if defined(WITH_OSIRISMD)
+ ${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/src/install/freebsd/osirismd.in > \
+ ${WRKSRC}/src/install/freebsd/osirismd.sh.sample
+.endif
+
+do-install:
+ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${MKDIR} ${PREFIX}/osiris/configs
+.for os in bsdos darwin freebsd irix linux openbsd sunos unix-generic \
+ windows2000 windowsnt windowsxp
+ ${INSTALL_DATA} ${WRKSRC}/src/configs/default.${os} \
+ ${PREFIX}/osiris/configs
.endfor
+ ${CHOWN} -R osiris:osiris ${PREFIX}/osiris
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/cli/osiris ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/osirisd/osirisd ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKSRC}/src/install/freebsd/osirisd.sh.sample \
+ ${PREFIX}/etc/rc.d
+.if defined(WITH_OSIRISMD)
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/osirismd/osirismd ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKSRC}/src/install/freebsd/osirismd.sh.sample \
+ ${PREFIX}/etc/rc.d
+.endif
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>
diff --git a/security/osiris/distinfo b/security/osiris/distinfo
index 6cffc4f504e4..c16f1ba9e3e6 100644
--- a/security/osiris/distinfo
+++ b/security/osiris/distinfo
@@ -1,2 +1,2 @@
-MD5 (osiris-1.5.2.tar.gz) = c340c0ef555cc339a8d4d8f81e0d325c
-SIZE (osiris-1.5.2.tar.gz) = 337298
+MD5 (osiris-2.4.4-stable.tar.gz) = 1f99f157c65505fe81530037c7a5347f
+SIZE (osiris-2.4.4-stable.tar.gz) = 4647083
diff --git a/security/osiris/files/patch-osirisd-in b/security/osiris/files/patch-osirisd-in
new file mode 100644
index 000000000000..4369e8177bfa
--- /dev/null
+++ b/security/osiris/files/patch-osirisd-in
@@ -0,0 +1,16 @@
+--- src/install/freebsd/osirisd.in.old Tue Jan 27 18:23:16 2004
++++ src/install/freebsd/osirisd.in Tue Jan 27 18:24:07 2004
+@@ -1,11 +1,11 @@
+ #!/bin/sh
+
+-OSIRISD=@INSTALLDIR@/osirisd
++OSIRISD=%%PREFIX%%/sbin/osirisd
+
+ case "$1" in
+ start)
+ if [ -x ${OSIRISD} ]; then
+- ${OSIRISD} -r @OSIRISDIR@ -l2 && echo -n ' osirisd'
++ ${OSIRISD} -r %%PREFIX%%/osiris -l2 && echo -n ' osirisd'
+ fi
+ ;;
+ stop)
diff --git a/security/osiris/files/patch-osirismd-in b/security/osiris/files/patch-osirismd-in
new file mode 100644
index 000000000000..ebb7c2f57fdd
--- /dev/null
+++ b/security/osiris/files/patch-osirismd-in
@@ -0,0 +1,17 @@
+--- src/install/freebsd/osirismd.in.old Tue Jan 27 18:25:27 2004
++++ src/install/freebsd/osirismd.in Tue Jan 27 18:26:01 2004
+@@ -1,12 +1,12 @@
+ #!/bin/sh
+
+-OSIRISMD=@INSTALLDIR@/osirismd
++OSIRISMD=%%PREFIX%%/sbin/osirismd
+
+ case "$1" in
+ start)
+ if [ -f ${SUDO} ]; then
+ if [ -x ${OSIRISMD} ]; then
+- ${OSIRISMD} -r @OSIRISDIR@ && echo -n ' osirismd'
++ ${OSIRISMD} -r %%PREFIX%%/osiris && echo -n ' osirismd'
+ fi
+ else
+ echo ""
diff --git a/security/osiris/pkg-deinstall b/security/osiris/pkg-deinstall
new file mode 100644
index 000000000000..f5c0013390cb
--- /dev/null
+++ b/security/osiris/pkg-deinstall
@@ -0,0 +1,50 @@
+#! /bin/sh
+#
+# $FreeBSD$
+#
+
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ echo ${answer:-${default}}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+delete_account() {
+ local u
+
+ u=$1
+ if yesno "Do you want me to remove user and group \"${u}\"" n; then
+ pw userdel -n ${u}
+ echo "Done."
+ fi
+}
+
+case $2 in
+
+DEINSTALL)
+
+ delete_account osiris
+ ;;
+
+esac
diff --git a/security/osiris/pkg-descr b/security/osiris/pkg-descr
index 72ccc28662ed..07f23e77b3ad 100644
--- a/security/osiris/pkg-descr
+++ b/security/osiris/pkg-descr
@@ -1,5 +1,12 @@
-Osiris is another file integrity checking tool.
-It creates file information databases and diff them.
-It uses GDBM database by default and optionally MySQL.
+Osiris is a Host Integrity Management System that periodically monitors
+one or more hosts for change. It maintains detailed logs of changes to
+the file system, user and group lists, resident kernel modules, and
+more. Osiris can be configured to email these logs to the administrator.
+Hosts are periodically scanned and, if desired, the records can be
+maintained for forensic purposes. Osiris keeps an administrator apprised
+of possible attacks and/or nasty little trojans. The purpose here is
+to isolate changes that indicate a break-in or a compromised system.
+Osiris makes use of OpenSSL for encryption and authentication in all
+components.
WWW: http://osiris.shmoo.com/
diff --git a/security/osiris/pkg-install b/security/osiris/pkg-install
new file mode 100644
index 000000000000..1fb8ae3be68c
--- /dev/null
+++ b/security/osiris/pkg-install
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ echo ${answer:-${default}}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+make_account() {
+ local u g gcos
+
+ u=$1
+ g=$2
+ gcos=$3
+
+ if pw group show "${g}" >/dev/null 2>&1; then
+ echo "You already have a group \"${g}\", so I will use it."
+ else
+ echo "You need a group \"${g}\"."
+ if which -s pw && yesno "Would you like me to create it" y
+ then
+ pw groupadd ${g} || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${u}" >/dev/null 2>&1; then
+ echo "You already have a user \"${u}\", so I will use it."
+ else
+ echo "You need a user \"${u}\"."
+ if which -s pw && yesno "Would you like me to create it" y
+ then
+ pw useradd ${u} -g ${g} -h - -d /usr/local/etc/osiris -s /sbin/nologin -c "${gcos}" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+}
+
+case $2 in
+
+PRE-INSTALL)
+ make_account osiris osiris "Osiris"
+ ;;
+esac
diff --git a/security/osiris/pkg-plist b/security/osiris/pkg-plist
index 2aebf3754ab0..f4c5785dc081 100644
--- a/security/osiris/pkg-plist
+++ b/security/osiris/pkg-plist
@@ -1,7 +1,22 @@
-bin/osiris
-bin/scale
-@unexec if [ -f %D/etc/osiris.conf ] && cmp -s %D/etc/osiris.conf %D/etc/osiris.conf-sample; then rm -f %D/etc/osiris.conf; fi
-etc/osiris.conf-sample
-%%PORTDOCS%%%%DOCSDIR%%/manual.html
-%%PORTDOCS%%%%DOCSDIR%%/manual.txt
+@comment $FreeBSD$
+sbin/osiris
+sbin/osirisd
+%%OSIRISMD%%sbin/osirismd
+etc/rc.d/osirisd.sh.sample
+%%OSIRISMD%%etc/rc.d/osirismd.sh.sample
+osiris/configs/default.bsdos
+osiris/configs/default.darwin
+osiris/configs/default.freebsd
+osiris/configs/default.irix
+osiris/configs/default.linux
+osiris/configs/default.openbsd
+osiris/configs/default.sunos
+osiris/configs/default.unix-generic
+osiris/configs/default.windows2000
+osiris/configs/default.windowsnt
+osiris/configs/default.windowsxp
+@dirrm osiris/configs
+@dirrm osiris
+%%PORTDOCS%%%%DOCSDIR%%/OsirisUserGuide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/OsirisUserGuide.rtf
%%PORTDOCS%%@dirrm %%DOCSDIR%%