diff options
-rw-r--r-- | net-mgmt/kismet/Makefile | 12 | ||||
-rw-r--r-- | net-mgmt/kismet/files/suid_pkg-message.in | 8 | ||||
-rw-r--r-- | net-mgmt/kismet/suid_pkg-deinstall | 51 | ||||
-rw-r--r-- | net-mgmt/kismet/suid_pkg-install | 22 |
4 files changed, 6 insertions, 87 deletions
diff --git a/net-mgmt/kismet/Makefile b/net-mgmt/kismet/Makefile index af19aaf68dca..0de44995ef80 100644 --- a/net-mgmt/kismet/Makefile +++ b/net-mgmt/kismet/Makefile @@ -51,20 +51,12 @@ CONFIGURE_ARGS+=--disable-pcre .endif .ifdef(WITH_SETUID) -KISMET_GROUP?= kismet -CONFIGURE_ARGS+=--with-suidgroup=${KISMET_GROUP} +GROUPS = kismet +CONFIGURE_ARGS+=--with-suidgroup=${GROUPS} INSTALL_TARGET = suidinstall PLIST_SUB+= SUID="" -PKGINSTALL= ${PKGDIR}/suid_pkg-install -PKGDEINSTALL = ${PKGDIR}/suid_pkg-deinstall PKGMESSAGE= ${WRKDIR}/suid_pkg-message SUB_FILES+= suid_pkg-message -SUB_LIST+= KISMET_GROUP=${KISMET_GROUP} - -pre-su-install: - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ - ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - .else INSTALL_TARGET = install CONFIGURE_ARGS+=--without-suidgroup diff --git a/net-mgmt/kismet/files/suid_pkg-message.in b/net-mgmt/kismet/files/suid_pkg-message.in index 1deb307deb85..968c45cde5fe 100644 --- a/net-mgmt/kismet/files/suid_pkg-message.in +++ b/net-mgmt/kismet/files/suid_pkg-message.in @@ -1,6 +1,6 @@ -Kismet has been installed with a setuid-root capture helper binary, +kismet has been installed with a setuid-root capture helper binary, %%LOCALBASE%%/bin/kismet_capture, which may be executed by users in the -group %%KISMET_GROUP%%. USERS IN THIS GROUP WILL BE ABLE TO ALTER NETWORK -INTERFACE STATES, but this is more secure than running all of Kismet -as root. ONLY users in this group will be able to run Kismet and capture +kismet group. USERS IN THIS GROUP WILL BE ABLE TO ALTER NETWORK +INTERFACE STATES, but this is more secure than running all of kismet +as root. ONLY users in this group will be able to run kismet and capture from physical network devices. diff --git a/net-mgmt/kismet/suid_pkg-deinstall b/net-mgmt/kismet/suid_pkg-deinstall deleted file mode 100644 index 77a736b8092f..000000000000 --- a/net-mgmt/kismet/suid_pkg-deinstall +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh -# -# taken from net/cvsup-mirror - -PATH=/bin:/usr/sbin -KISMET_GROUP=${KISMET_GROUP:-kismet} - -ask() { - local question default answer - - question=$1 - default=$2 - if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then - read -p "${question} [${default}]? " answer - fi - if [ x${answer} = x ]; then - answer=${default} - fi - echo ${answer} -} - -yesno() { - local dflt question answer - - question=$1 - dflt=$2 - while :; do - answer=$(ask "${question}" "${dflt}") - case "${answer}" in - [Yy]*) return 0;; - [Nn]*) return 1;; - esac - echo "Please answer yes or no." - done -} - -delete_group() { - local g - - g=$1 - if yesno "Do you want me to remove group \"${g}\"" y; then - pw groupdel -n ${g} - echo "Done." - fi -} - -if [ x$2 != xDEINSTALL ]; then - exit -fi - -delete_group ${KISMET_GROUP} diff --git a/net-mgmt/kismet/suid_pkg-install b/net-mgmt/kismet/suid_pkg-install deleted file mode 100644 index ebe3671e53df..000000000000 --- a/net-mgmt/kismet/suid_pkg-install +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh - -PATH=/bin:/usr/sbin -KISMET_GROUP=${KISMET_GROUP:-kismet} -KISMET_GID=${KISMET_GID:-229} - -case $2 in -PRE-INSTALL) - - if pw group show "${KISMET_GROUP}" 2>/dev/null; then - echo "You already have a group \"${KISMET_GROUP}\", so I will use it." - else - if pw groupadd ${KISMET_GROUP} -g ${KISMET_GID}; then - echo "Added group \"${KISMET_GROUP}\"." - else - echo "Adding group \"${KISMET_GROUP}\" failed..." - exit 1 - fi - fi - - ;; -esac |