1161602Strhodes#!/bin/sh - 2161602Strhodes# 3161602Strhodes# Copyright (c) 2006 Tom Rhodes 4161602Strhodes# All rights reserved. 5161602Strhodes# 6161602Strhodes# Redistribution and use in source and binary forms, with or without 7161602Strhodes# modification, are permitted provided that the following conditions 8161602Strhodes# are met: 9161602Strhodes# 1. Redistributions of source code must retain the above copyright 10161602Strhodes# notice, this list of conditions and the following disclaimer. 11161602Strhodes# 2. Redistributions in binary form must reproduce the above copyright 12161602Strhodes# notice, this list of conditions and the following disclaimer in the 13161602Strhodes# documentation and/or other materials provided with the distribution. 14161602Strhodes# 15161602Strhodes# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16161602Strhodes# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17161602Strhodes# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18161602Strhodes# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19161602Strhodes# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20161602Strhodes# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21161602Strhodes# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22161602Strhodes# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23161602Strhodes# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24161602Strhodes# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25161602Strhodes# SUCH DAMAGE. 26161602Strhodes# 27161602Strhodes# $FreeBSD$ 28161602Strhodes# 29161602Strhodes 30161602Strhodes# If there is a global system configuration file, suck it in. 31161602Strhodes# 32161602Strhodesif [ -r /etc/defaults/periodic.conf ] 33161602Strhodesthen 34161602Strhodes . /etc/defaults/periodic.conf 35161602Strhodes source_periodic_confs 36161602Strhodesfi 37161602Strhodes 38254974Sjlhsecurity_daily_compat_var security_status_logincheck_enable 39254974Sjlh 40254974Sjlhrc=0 41254974Sjlh 42254974Sjlhif check_yesno_period security_status_logincheck_enable 43254974Sjlhthen 44161602Strhodes echo "" 45161602Strhodes echo 'Checking login.conf permissions:' 46177606Sremko if [ -G /etc/login.conf -a -O /etc/login.conf ]; then 47161602Strhodes n=0 48161602Strhodes else 49161602Strhodes echo "Bad ownership of /etc/login.conf" 50161602Strhodes n=1 51161602Strhodes fi 52254974Sjlh [ $n -gt 0 ] && rc=1 || rc=0 53254974Sjlhfi 54161602Strhodes 55161602Strhodesexit "$rc" 56