xref: /freebsd/contrib/pam-krb5/portable/pam_syslog.c (revision bf6873c5786e333d679a7838d28812febf479a8a)
1 /*
2  * Replacement for a missing pam_syslog.
3  *
4  * Implements pam_syslog in terms of pam_vsyslog (which itself may be a
5  * replacement) if the PAM implementation does not provide it.  This is a
6  * Linux PAM extension.
7  *
8  * The canonical version of this file is maintained in the rra-c-util package,
9  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
10  *
11  * Written by Russ Allbery <eagle@eyrie.org>
12  * Copyright 2010-2011
13  *     The Board of Trustees of the Leland Stanford Junior University
14  *
15  * Copying and distribution of this file, with or without modification, are
16  * permitted in any medium without royalty provided the copyright notice and
17  * this notice are preserved.  This file is offered as-is, without any
18  * warranty.
19  *
20  * SPDX-License-Identifier: FSFAP
21  */
22 
23 #include <config.h>
24 #include <portable/pam.h>
25 
26 #include <stdarg.h>
27 
28 void
pam_syslog(const pam_handle_t * pamh,int priority,const char * fmt,...)29 pam_syslog(const pam_handle_t *pamh, int priority, const char *fmt, ...)
30 {
31     va_list args;
32 
33     va_start(args, fmt);
34     pam_vsyslog(pamh, priority, fmt, args);
35     va_end(args);
36 }
37