---
name: "openpam_ttyconv"
section: "3"
platform: "macos"
package: "OpenPAM"
version: "35"
release: "macOS 26.5"
platforms: ["freebsd", "macos"]
url: "https://new.carta.tech/openpam_ttyconv"
---

# openpam\_ttyconv(3)

simple tty-based conversation function

## NAME

**openpam\_ttyconv** – simple tty-based conversation function

## LIBRARY

library “libpam”

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<security/pam\_appl.h\>**

**#include \<security/openpam.h\>**

*int*\

**openpam\_ttyconv**(*int n*, *const struct pam\_message \*\*msg*, *struct pam\_response \*\*resp*, *void \*data*);

## DESCRIPTION

The **openpam\_ttyconv** function is a standard conversation function suitable for use on TTY devices. It should be adequate for the needs of most text-based interactive programs.

The **openpam\_ttyconv** function allows the application to specify a timeout for user input by setting the global integer variable *openpam\_ttyconv\_timeout* to the length of the timeout in seconds.

## RETURN VALUES

The **openpam\_ttyconv** function returns one of the following values:

- \[PAM\_BUF\_ERR\]

  Memory buffer error.

- \[PAM\_CONV\_ERR\]

  Conversation failure.

- \[PAM\_SYSTEM\_ERR\]

  System error.

## SEE ALSO

[openpam\_nullconv(3)](/openpam_nullconv/3.md), [pam(3)](/pam/3.md), [pam\_prompt(3)](/pam_prompt/3.md), [pam\_strerror(3)](/pam_strerror/3.md), [pam\_vprompt(3)](/pam_vprompt/3.md)

## STANDARDS

The **openpam\_ttyconv** function is an OpenPAM extension.

## AUTHORS

The **openpam\_ttyconv** function and this manual page were developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.
