1 /*
2 * ProFTPD - mod_auth_otp API testsuite
3 * Copyright (c) 2015 The ProFTPD Project team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18 *
19 * As a special exemption, The ProFTPD Project team and other respective
20 * copyright holders give permission to link this program with OpenSSL, and
21 * distribute the resulting executable, without including the source code for
22 * OpenSSL in the source distribution.
23 */
24
25 #include "tests.h"
26
27 /* Stubs */
28
29 session_t session;
30 server_rec *main_server = NULL;
31 pool *auth_otp_pool = NULL;
32 int auth_otp_logfd = -1;
33
find_config(xaset_t * set,int type,const char * name,int recurse)34 config_rec *find_config(xaset_t *set, int type, const char *name, int recurse) {
35 return NULL;
36 }
37
get_param_ptr(xaset_t * set,const char * name,int recurse)38 void *get_param_ptr(xaset_t *set, const char *name, int recurse) {
39 errno = ENOENT;
40 return NULL;
41 }
42
pr_auth_getpwnam(pool * p,const char * name)43 struct passwd *pr_auth_getpwnam(pool *p, const char *name) {
44 return getpwnam(name);
45 }
46
pr_alarms_block(void)47 void pr_alarms_block(void) {
48 }
49
pr_alarms_unblock(void)50 void pr_alarms_unblock(void) {
51 }
52
pr_env_get(pool * p,const char * key)53 char *pr_env_get(pool *p, const char *key) {
54 errno = ENOSYS;
55 return NULL;
56 }
57
pr_env_set(pool * p,const char * key,const char * value)58 int pr_env_set(pool *p, const char *key, const char *value) {
59 return 0;
60 }
61
pr_module_get(const char * name)62 module *pr_module_get(const char *name) {
63 errno = ENOENT;
64 return NULL;
65 }
66
pr_signals_handle(void)67 void pr_signals_handle(void) {
68 }
69
pr_trace_get_level(const char * channel)70 int pr_trace_get_level(const char *channel) {
71 return 0;
72 }
73
pr_trace_msg(const char * channel,int level,const char * fmt,...)74 int pr_trace_msg(const char *channel, int level, const char *fmt, ...) {
75 return 0;
76 }
77