Home | History | Annotate | Line # | Download | only in man
pam_get_user.3 revision 1.6
      1 <<<<<<< pam_get_user.3
      2 .\"	$NetBSD: pam_get_user.3,v 1.6 2014/10/24 18:17:56 christos Exp $
      3 .\"
      4 =======
      5 >>>>>>> 1.1.1.4
      6 .\" Generated from pam_get_user.c by gendoc.pl
      7 .\" Id: pam_get_user.c 670 2013-03-17 19:26:07Z des 
      8 .Dd September 12, 2014
      9 .Dt PAM_GET_USER 3
     10 .Os
     11 .Sh NAME
     12 .Nm pam_get_user
     13 .Nd retrieve user name
     14 .Sh LIBRARY
     15 .Lb libpam
     16 .Sh SYNOPSIS
     17 .In sys/types.h
     18 .In security/pam_appl.h
     19 .Ft "int"
     20 .Fn pam_get_user "pam_handle_t *pamh" "const char **user" "const char *prompt"
     21 .Sh DESCRIPTION
     22 The
     23 .Fn pam_get_user
     24 function returns the name of the target user, as
     25 specified to
     26 .Xr pam_start 3 .
     27 If no user was specified, nor set using
     28 .Xr pam_set_item 3 ,
     29 .Fn pam_get_user
     30 will prompt for a user name.
     31 Either way, a pointer to the user name is stored in the location
     32 pointed to by the
     33 .Fa user
     34 argument, and the corresponding PAM item is
     35 updated.
     36 .Pp
     37 The
     38 .Fa prompt
     39 argument specifies a prompt to use if no user name is
     40 cached.
     41 If it is
     42 .Dv NULL ,
     43 the
     44 .Dv PAM_USER_PROMPT
     45 item will be used.
     46 If that item is also
     47 .Dv NULL ,
     48 a hardcoded default prompt will be used.
     49 Additionally, when
     50 .Fn pam_get_user
     51 is called from a service module, the
     52 prompt may be affected by module options as described below.
     53 The prompt is then expanded using
     54 .Xr openpam_subst 3
     55 before it is passed to
     56 the conversation function.
     57 .Sh MODULE OPTIONS
     58 When called by a service module,
     59 .Fn pam_get_user
     60 will recognize the
     61 following module options:
     62 .Bl -tag -width 18n
     63 .It Dv user_prompt
     64 Prompt to use when asking for the user name.
     65 This option overrides both the
     66 .Fa prompt
     67 argument and the
     68 .Dv PAM_USER_PROMPT
     69 item.
     70 .El
     71 .Sh RETURN VALUES
     72 The
     73 .Fn pam_get_user
     74 function returns one of the following values:
     75 .Bl -tag -width 18n
     76 .It Bq Er PAM_BUF_ERR
     77 Memory buffer error.
     78 .It Bq Er PAM_CONV_ERR
     79 Conversation failure.
     80 .It Bq Er PAM_SYSTEM_ERR
     81 System error.
     82 .El
     83 .Sh SEE ALSO
     84 .Xr openpam_get_option 3 ,
     85 .Xr openpam_subst 3 ,
     86 .Xr pam 3 ,
     87 .Xr pam_conv 3 ,
     88 .Xr pam_get_authtok 3 ,
     89 .Xr pam_get_item 3 ,
     90 .Xr pam_set_item 3 ,
     91 .Xr pam_start 3 ,
     92 .Xr pam_strerror 3
     93 .Sh STANDARDS
     94 .Rs
     95 .%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
     96 .%D "June 1997"
     97 .Re
     98 .Sh AUTHORS
     99 The
    100 .Fn pam_get_user
    101 function and this manual page were
    102 developed for the
    103 .Fx
    104 Project by ThinkSec AS and Network Associates Laboratories, the
    105 Security Research Division of Network Associates, Inc.\& under
    106 DARPA/SPAWAR contract N66001-01-C-8035
    107 .Pq Dq CBOSS ,
    108 as part of the DARPA CHATS research program.
    109 .Pp
    110 The OpenPAM library is maintained by
    111 .An Dag-Erling Sm\(/orgrav Aq des (a] des.no .
    112