1.\" $NetBSD: openpam_get_feature.3,v 1.2 2013/07/20 21:40:04 wiz Exp $ 2.\" 3.\"- 4.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. 5.\" Copyright (c) 2004-2011 Dag-Erling Smørgrav 6.\" All rights reserved. 7.\" 8.\" This software was developed for the FreeBSD Project by ThinkSec AS and 9.\" Network Associates Laboratories, the Security Research Division of 10.\" Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 11.\" ("CBOSS"), as part of the DARPA CHATS research program. 12.\" 13.\" Redistribution and use in source and binary forms, with or without 14.\" modification, are permitted provided that the following conditions 15.\" are met: 16.\" 1. Redistributions of source code must retain the above copyright 17.\" notice, this list of conditions and the following disclaimer. 18.\" 2. Redistributions in binary form must reproduce the above copyright 19.\" notice, this list of conditions and the following disclaimer in the 20.\" documentation and/or other materials provided with the distribution. 21.\" 3. The name of the author may not be used to endorse or promote 22.\" products derived from this software without specific prior written 23.\" permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35.\" SUCH DAMAGE. 36.\" 37.\" Id 38.\" 39.Dd May 26, 2012 40.Dt OPENPAM_GET_FEATURE 3 41.Os 42.Sh NAME 43.Nm openpam_get_feature 44.Nd query the state of an optional feature 45.Sh LIBRARY 46.Lb libpam 47.Sh SYNOPSIS 48.In sys/types.h 49.In security/pam_appl.h 50.In security/openpam.h 51.Ft "int" 52.Fn openpam_get_feature "int feature" "int *onoff" 53.Sh DESCRIPTION 54.Bf Sy 55This function is experimental and may be modified or removed in a future release without further warning. 56.Ef 57.Pp 58The 59.Fn openpam_get_feature 60function stores the current state of the 61specified feature in the variable pointed to by its 62.Fa onoff 63argument. 64.Pp 65The following features are recognized: 66.Bl -tag -width 18n 67.It Dv OPENPAM_RESTRICT_SERVICE_NAME 68Disallow path separators in service names. 69This feature is enabled by default. 70Disabling it allows the application to specify the path to 71the desired policy file directly. 72.It Dv OPENPAM_VERIFY_POLICY_FILE 73Verify the ownership and permissions of the policy file 74and the path leading up to it. 75This feature is enabled by default. 76.It Dv OPENPAM_RESTRICT_MODULE_NAME 77Disallow path separators in module names. 78This feature is disabled by default. 79Enabling it prevents the use of modules in non-standard 80locations. 81.It Dv OPENPAM_VERIFY_MODULE_FILE 82Verify the ownership and permissions of each loadable 83module and the path leading up to it. 84This feature is enabled by default. 85.El 86.Sh RETURN VALUES 87The 88.Fn openpam_get_feature 89function returns one of the following values: 90.Bl -tag -width 18n 91.It Bq Er PAM_SYMBOL_ERR 92Invalid symbol. 93.El 94.Sh SEE ALSO 95.Xr openpam_set_feature 3 , 96.Xr pam 3 , 97.Xr pam_strerror 3 98.Sh STANDARDS 99The 100.Fn openpam_get_feature 101function is an OpenPAM extension. 102.Sh AUTHORS 103The 104.Fn openpam_get_feature 105function and this manual page were 106developed by 107.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no . 108