1.\" $NetBSD: pam_set_data.3,v 1.8 2019/12/15 17:08:21 christos Exp $ 2.\" 3.\" Generated from pam_set_data.c by gendoc.pl 4.\" $OpenPAM: pam_set_data.c 938 2017-04-30 21:34:42Z des $ 5.Dd February 24, 2019 6.Dt PAM_SET_DATA 3 7.Os 8.Sh NAME 9.Nm pam_set_data 10.Nd set module information 11.Sh SYNOPSIS 12.In sys/types.h 13.In security/pam_appl.h 14.Ft "int" 15.Fn pam_set_data "pam_handle_t *pamh" "const char *module_data_name" "void *data" "void (*cleanup)(pam_handle_t *pamh, void *data, int pam_end_status)" 16.Sh DESCRIPTION 17The 18.Fn pam_set_data 19function associates a pointer to an opaque object 20with an arbitrary string specified by the 21.Fa module_data_name 22argument, 23in the PAM context specified by the 24.Fa pamh 25argument. 26.Pp 27If not 28.Dv NULL , 29the 30.Fa cleanup 31argument should point to a function 32responsible for releasing the resources associated with the object. 33.Pp 34This function and its counterpart 35.Xr pam_get_data 3 36are useful for managing 37data that are meaningful only to a particular service module. 38.Sh RETURN VALUES 39The 40.Fn pam_set_data 41function returns one of the following values: 42.Bl -tag -width 18n 43.It Bq Er PAM_SUCCESS 44Success. 45.It Bq Er PAM_BUF_ERR 46Memory buffer error. 47.It Bq Er PAM_SYSTEM_ERR 48System error. 49.El 50.Sh SEE ALSO 51.Xr openpam_free_data 3 , 52.Xr pam 3 , 53.Xr pam_get_data 3 , 54.Xr pam_strerror 3 55.Sh STANDARDS 56.Rs 57.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules" 58.%D "June 1997" 59.Re 60.Sh AUTHORS 61The 62.Fn pam_set_data 63function and this manual page were 64developed for the 65.Fx 66Project by ThinkSec AS and Network Associates Laboratories, the 67Security Research Division of Network Associates, Inc.\& under 68DARPA/SPAWAR contract N66001-01-C-8035 69.Pq Dq CBOSS , 70as part of the DARPA CHATS research program. 71.Pp 72The OpenPAM library is maintained by 73.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no . 74