#!/bin/ksh
#
# ident "@(#)utpamctl.ksh	1.4    05/06/01 SMI"
#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

set -u
########################################################################
#
# Configures pam
#
########################################################################



########################################################################
#
# Operation entry points, one for each keyword.  This is where the
# specific work for this feature happens.
#
########################################################################


#
# disable()
#
disable() {

	if [ -x ${UTGENPAM} ]; then
    		${UTGENPAM} disable
		if $VERB; then
			print "PAM configuration disabled"
		fi

	fi
	return 0

}

#
# enable ()
#
enable() {

	if [ -x ${UTGENPAM} ]; then
		${UTGENPAM} enable
		if $VERB; then
			print "PAM configuration enabled"
		fi
	fi
	return 0
}


#########################################
# LOCAL VARIABLES
# They must defined here to resolve the some of parameter resolution
# problem
#########################################
local_variables() {
	UTGENPAM=$SUNWUTLIB/utgenpam
}

########################################################################
#
# Configurable parameter
#
########################################################################
# NONE

#########################################
#
# variables used in the shared script utctl-shlib
#
#########################################
DESCR="sets up PAM configuration"

########################################################################
#
# Execution starts here
#

PROGPATH=`dirname $0`
. $PROGPATH/utctl-shlib
