src/util.c: shut up gcc warnings
[vlock.git] / src / auth.h
blob906b321bd62a7c125c442a1399b40f877859084e
1 /* auth.h -- generic header file for authentification routines
2 * for vlock, the VT locking program for linux
4 * This program is copyright (C) 2007 Frank Benkstein, and is free
5 * software which is freely distributable under the terms of the
6 * GNU General Public License version 2, included as the file COPYING in this
7 * distribution. It is NOT public domain software, and any
8 * redistribution not permitted by the GNU General Public License is
9 * expressly forbidden without prior written permission from
10 * the author.
14 #include <stdbool.h>
15 #include <glib.h>
17 /* forward declaration */
18 struct timespec;
20 #define VLOCK_AUTH_ERROR vlock_auth_error_quark()
21 GQuark vlock_auth_error_quark(void);
23 enum {
24 VLOCK_AUTH_ERROR_FAILED,
25 VLOCK_AUTH_ERROR_DENIED
28 /* Try to authenticate the user. When the user is successfully authenticated
29 * this function returns true. When the authentication fails for whatever
30 * reason the function returns false. The timeout is passed to the prompt
31 * functions below if they are called.
33 bool auth(const char *user, struct timespec *timeout, GError **error);