auth.h revision 65668
1164190Sjkoshy/* 2164190Sjkoshy * Copyright (c) 2000 Markus Friedl. All rights reserved. 3164190Sjkoshy * 4164190Sjkoshy * Redistribution and use in source and binary forms, with or without 5164190Sjkoshy * modification, are permitted provided that the following conditions 6164190Sjkoshy * are met: 7164190Sjkoshy * 1. Redistributions of source code must retain the above copyright 8164190Sjkoshy * notice, this list of conditions and the following disclaimer. 9164190Sjkoshy * 2. Redistributions in binary form must reproduce the above copyright 10164190Sjkoshy * notice, this list of conditions and the following disclaimer in the 11164190Sjkoshy * documentation and/or other materials provided with the distribution. 12164190Sjkoshy * 13164190Sjkoshy * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14164190Sjkoshy * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15164190Sjkoshy * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16164190Sjkoshy * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17164190Sjkoshy * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18164190Sjkoshy * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19164190Sjkoshy * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20164190Sjkoshy * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21164190Sjkoshy * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22164190Sjkoshy * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23164190Sjkoshy */ 24164190Sjkoshy#ifndef AUTH_H 25164190Sjkoshy#define AUTH_H 26164190Sjkoshy 27164190Sjkoshyvoid do_authentication(void); 28164190Sjkoshyvoid do_authentication2(void); 29164190Sjkoshy 30164190Sjkoshystruct passwd * 31164190Sjkoshyauth_get_user(void); 32164190Sjkoshy 33164190Sjkoshyint allowed_user(struct passwd * pw); 34164190Sjkoshy 35164190Sjkoshy#define AUTH_FAIL_MAX 6 36164190Sjkoshy#define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) 37164190Sjkoshy#define AUTH_FAIL_MSG "Too many authentication failures for %.100s" 38164190Sjkoshy 39164190Sjkoshy#endif 40164190Sjkoshy 41164190Sjkoshy