pam-modules/pam_sql/pam_sql.h
Sergey Poznyakoff b6c720096e Use wordsplit for keyword expansion.
* .gitmodules: Add wordsplit
* configure.ac: Likewise.
* lib/Makefile.am: Likewise.
* lib/graypam.h (gray_expand_argv): Remove.
(gray_expand_string): Change prototype.
* lib/vartab.c (gray_expand_argv): Remove.
(gray_expand_string): Rewrite using wordsplit.
* pam_ldaphome/pam_ldaphome.c (import_public_key): Assume
sshPublicKey as a default attribute.
* pam_log/pam_log.c (_pam_parse): Take two return arguments.
(echo): Use gray_expand_string.
* pam_sql/pam_mysql.c: Update gray_expand_string usage.
* pam_sql/pam_pgsql.c: Likewise.
* pam_sql/pam_sql.c: Likewise.
* pam_sql/pam_sql.h (gpam_sql_get_query): Change signature.
* pam_umotd/pam_umotd.c (pam_sm_open_session): Update
gray_expand_string usage.
2020-03-29 17:39:54 +03:00

53 lines
1.8 KiB
C

/* This file is part of pam-modules.
Copyright (C) 2005-2006, 2010-2012, 2014-2015, 2018 Sergey Poznyakoff
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
#define debug_level gpam_sql_debug_level
#include <graypam.h>
#if defined(HAVE_CRYPT_H)
# include <crypt.h>
#else
extern char *crypt(const char *, const char *);
#endif
#if HAVE_SECURITY_PAM_MISC_H
# include <security/pam_misc.h>
#endif
#include <md5.h>
#include <sha1.h>
#define CHKVAR(v) \
if (!(v)) { \
_pam_log(LOG_ERR, "%s: %s not defined", \
gpam_sql_config_file, #v); \
return PAM_SERVICE_ERR; \
} \
DEBUG(100,("Config: %s=%s", #v, v));
extern long gpam_sql_debug_level;
extern char *gpam_sql_module_name;
extern char *gpam_sql_config_file;
int gpam_sql_verify_user_pass(pam_handle_t *pamh, const char *passwd,
const char *query);
int gpam_sql_acct(pam_handle_t *pamh, const char *query);
char *gpam_sql_find_config(const char *name);
int gpam_sql_get_query(pam_handle_t *pamh, char const *var,
int required, char **query);
int gpam_sql_check_boolean_config(const char *name, int defval);