xref: /netbsd-src/external/bsd/openpam/dist/doc/man/openpam_get_feature.3 (revision 181254a7b1bdde6873432bffef2d2decc4b5c22f)
1.\"	$NetBSD: openpam_get_feature.3,v 1.7 2019/12/15 17:08:21 christos Exp $
2.\"
3.\" Generated from openpam_get_feature.c by gendoc.pl
4.\" $OpenPAM: openpam_get_feature.c 938 2017-04-30 21:34:42Z des $
5.Dd February 24, 2019
6.Dt OPENPAM_GET_FEATURE 3
7.Os
8.Sh NAME
9.Nm openpam_get_feature
10.Nd query the state of an optional feature
11.Sh SYNOPSIS
12.In sys/types.h
13.In security/pam_appl.h
14.In security/openpam.h
15.Ft "int"
16.Fn openpam_get_feature "int feature" "int *onoff"
17.Sh DESCRIPTION
18.Bf Sy
19This function is experimental and may be modified or removed in a future release without prior warning.
20.Ef
21.Pp
22The
23.Fn openpam_get_feature
24function stores the current state of the
25specified feature in the variable pointed to by its
26.Fa onoff
27argument.
28.Pp
29The following features are recognized:
30.Bl -tag -width 18n
31.It Dv OPENPAM_RESTRICT_SERVICE_NAME
32Disallow path separators in service names.
33This feature is enabled by default.
34Disabling it allows the application to specify the path to
35the desired policy file directly.
36.It Dv OPENPAM_VERIFY_POLICY_FILE
37Verify the ownership and permissions of the policy file
38and the path leading up to it.
39This feature is enabled by default.
40.It Dv OPENPAM_RESTRICT_MODULE_NAME
41Disallow path separators in module names.
42This feature is disabled by default.
43Enabling it prevents the use of modules in non-standard
44locations.
45.It Dv OPENPAM_VERIFY_MODULE_FILE
46Verify the ownership and permissions of each loadable
47module and the path leading up to it.
48This feature is enabled by default.
49.El
50.Sh RETURN VALUES
51The
52.Fn openpam_get_feature
53function returns one of the following values:
54.Bl -tag -width 18n
55.It Bq Er PAM_SUCCESS
56Success.
57.It Bq Er PAM_BAD_FEATURE
58Unrecognized or restricted feature.
59.El
60.Sh SEE ALSO
61.Xr openpam_set_feature 3 ,
62.Xr pam 3 ,
63.Xr pam_strerror 3
64.Sh STANDARDS
65The
66.Fn openpam_get_feature
67function is an OpenPAM extension.
68.Sh AUTHORS
69The
70.Fn openpam_get_feature
71function and this manual page were
72developed by
73.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
74