---
name: "krb5_config_free_strings"
section: "3"
platform: "linux"
package: "heimdal-dev"
version: "1.2.dfsg.1-2.1+lenny1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/krb5_config_get_int"
---

# krb5\_config\_free\_strings(3)

get configuration value

Part of [krb5\_config\_get\_int(3)](/krb5_config_get_int/3.md).

## NAME

**krb5\_config\_file\_free**, **krb5\_config\_free\_strings**, **krb5\_config\_get**, **krb5\_config\_get\_bool**, **krb5\_config\_get\_bool\_default**, **krb5\_config\_get\_int**, **krb5\_config\_get\_int\_default**, **krb5\_config\_get\_list**, **krb5\_config\_get\_next**, **krb5\_config\_get\_string**, **krb5\_config\_get\_string\_default**, **krb5\_config\_get\_strings**, **krb5\_config\_get\_time**, **krb5\_config\_get\_time\_default**, **krb5\_config\_parse\_file**, **krb5\_config\_parse\_file\_multi**, **krb5\_config\_vget**, **krb5\_config\_vget\_bool**, **krb5\_config\_vget\_bool\_default**, **krb5\_config\_vget\_int**, **krb5\_config\_vget\_int\_default**, **krb5\_config\_vget\_list**, **krb5\_config\_vget\_next**, **krb5\_config\_vget\_string**, **krb5\_config\_vget\_string\_default**, **krb5\_config\_vget\_strings**, **krb5\_config\_vget\_time**, **krb5\_config\_vget\_time\_default** – get configuration value

## LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)

## SYNOPSIS

**#include \<krb5.h\>**

*krb5\_error\_code*\

**krb5\_config\_file\_free**(*krb5\_context context*, *krb5\_config\_section \*s*);

*void*\

**krb5\_config\_free\_strings**(*char \*\*strings*);

*const void \**\

**krb5\_config\_get**(*krb5\_context context*, *const krb5\_config\_section \*c*, *int type*, *...*);

*krb5\_boolean*\

**krb5\_config\_get\_bool**(*krb5\_context context*, *krb5\_config\_section \*c*, *...*);

*krb5\_boolean*\

**krb5\_config\_get\_bool\_default**(*krb5\_context context*, *krb5\_config\_section \*c*, *krb5\_boolean def\_value*, *...*);

*int*\

**krb5\_config\_get\_int**(*krb5\_context context*, *krb5\_config\_section \*c*, *...*);

*int*\

**krb5\_config\_get\_int\_default**(*krb5\_context context*, *krb5\_config\_section \*c*, *int def\_value*, *...*);

*const* *char\**\

**krb5\_config\_get\_string**(*krb5\_context context*, *krb5\_config\_section \*c*, *...*);

*const* *char\**\

**krb5\_config\_get\_string\_default**(*krb5\_context context*, *krb5\_config\_section \*c*, *const char \*def\_value*, *...*);

*char\*\**\

**krb5\_config\_get\_strings**(*krb5\_context context*, *const krb5\_config\_section \*c*, *...*);

*int*\

**krb5\_config\_get\_time**(*krb5\_context context*, *krb5\_config\_section \*c*, *...*);

*int*\

**krb5\_config\_get\_time\_default**(*krb5\_context context*, *krb5\_config\_section \*c*, *int def\_value*, *...*);

*krb5\_error\_code*\

**krb5\_config\_parse\_file**(*krb5\_context context*, *const char \*fname*, *krb5\_config\_section \*\*res*);

*krb5\_error\_code*\

**krb5\_config\_parse\_file\_multi**(*krb5\_context context*, *const char \*fname*, *krb5\_config\_section \*\*res*);

*const void \**\

**krb5\_config\_vget**(*krb5\_context context*, *const krb5\_config\_section \*c*, *int type*, *va\_list args*);

*krb5\_boolean*\

**krb5\_config\_vget\_bool**(*krb5\_context context*, *const krb5\_config\_section \*c*, *va\_list args*);

*krb5\_boolean*\

**krb5\_config\_vget\_bool\_default**(*krb5\_context context*, *const krb5\_config\_section \*c*, *krb5\_boolean def\_value*, *va\_list args*);

*int*\

**krb5\_config\_vget\_int**(*krb5\_context context*, *const krb5\_config\_section \*c*, *va\_list args*);

*int*\

**krb5\_config\_vget\_int\_default**(*krb5\_context context*, *const krb5\_config\_section \*c*, *int def\_value*, *va\_list args*);

*const krb5\_config\_binding \**\

**krb5\_config\_vget\_list**(*krb5\_context context*, *const krb5\_config\_section \*c*, *va\_list args*);

*const void \**\

**krb5\_config\_vget\_next**(*krb5\_context context*, *const krb5\_config\_section \*c*, *const krb5\_config\_binding \*\*pointer*, *int type*, *va\_list args*);

*const char \**\

**krb5\_config\_vget\_string**(*krb5\_context context*, *const krb5\_config\_section \*c*, *va\_list args*);

*const char \**\

**krb5\_config\_vget\_string\_default**(*krb5\_context context*, *const krb5\_config\_section \*c*, *const char \*def\_value*, *va\_list args*);

*char* *\*\**\

**krb5\_config\_vget\_strings**(*krb5\_context context*, *const krb5\_config\_section \*c*, *va\_list args*);

*int*\

**krb5\_config\_vget\_time**(*krb5\_context context*, *const krb5\_config\_section \*c*, *va\_list args*);

*int*\

**krb5\_config\_vget\_time\_default**(*krb5\_context context*, *const krb5\_config\_section \*c*, *int def\_value*, *va\_list args*);

## DESCRIPTION

These functions get values from the [krb5.conf(5)](/krb5.conf/5.md) configuration file, or another configuration database specified by the *c* parameter.

The variable arguments should be a list of strings naming each subsection to look for. For example:

```
krb5_config_get_bool_default(context, NULL, FALSE,
     "libdefaults", "log_utc", NULL);
```

gets the boolean value for the log\_utc option, defaulting to FALSE.

**krb5\_config\_get\_bool\_default**() will convert the option value to a boolean value, where ‘yes’, ‘true’, and any non-zero number means TRUE, and any other value FALSE.

**krb5\_config\_get\_int\_default**() will convert the value to an integer.

**krb5\_config\_get\_time\_default**() will convert the value to a period of time (not a time stamp) in seconds, so the string ‘2 weeks’ will be converted to 1209600 (2 \* 7 \* 24 \* 60 \* 60).

**krb5\_config\_get\_string**() returns a *const char \** to a string in the configuration database.  The string may not be valid after a reload of the configuration database so a caller should make a local copy if it needs to keep the string.

**krb5\_config\_free\_strings**() free *strings* as returned by **krb5\_config\_get\_strings**() and **krb5\_config\_vget\_strings**(). If the argument *strings* is a  NULL pointer, no action occurs.

**krb5\_config\_file\_free**() free the result of **krb5\_config\_parse\_file**() and **krb5\_config\_parse\_file\_multi**().

## SEE ALSO

[krb5\_appdefault(3)](/krb5_appdefault/3.md), [krb5\_init\_context(3)](/krb5_init_context/3.md), [krb5.conf(5)](/krb5.conf/5.md)

## BUGS

For the default functions, other than for the string case, there's no way to tell whether there was a value specified or not.
