/usr/include/util.h is in libduo-dev 1.9.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /*
* util.h
*
* Copyright (c) 2013 Duo Security
* All rights reserved, all wrongs reversed
*/
#ifndef DUO_UTIL_H
#define DUO_UTIL_H
#define MAX_GROUPS 256
#define MAX_PROMPTS 3
#include <pwd.h>
#include <syslog.h>
#include <stdarg.h>
extern int duo_debug;
enum {
DUO_FAIL_SAFE = 0,
DUO_FAIL_SECURE
};
struct duo_config {
char *ikey;
char *skey;
char *apihost;
char *cafile;
char *http_proxy;
char *groups[MAX_GROUPS];
int groups_cnt;
int groups_mode;
int failmode; /* Duo failure handling: DUO_FAIL_* */
int pushinfo;
int noverify;
int autopush;
int motd; /* login_duo only */
int prompts;
int accept_env;
int local_ip_fallback;
};
void duo_config_default(struct duo_config *cfg);
int duo_set_boolean_option(const char *val);
int duo_common_ini_handler(struct duo_config *cfg, const char *section,
const char *name, const char*val);
int duo_check_groups(struct passwd *pw, char **groups, int groups_cnt);
void duo_log(int priority, const char*msg, const char *user, const char *ip,
const char *err);
void duo_syslog(int priority, const char *fmt, ...);
const char *
duo_resolve_name(const char *hostname);
const char *
duo_local_ip();
#endif
|