aboutsummaryrefslogtreecommitdiff
path: root/pam_sql/pam_sql.c
AgeCommit message (Collapse)AuthorFiles
2022-02-04Update copyright yearsSergey Poznyakoff1
2021-08-11pam_mysql: optionally read MySQL default fileSergey Poznyakoff1
* doc/pam-modules.texi: Document new MySQL statements. * pam_sql/pam_mysql.c (mysql_do_query): Use MySQL default file/group, if specified. (gpam_sql_verify_user_pass): Fix handling of "setenv-query". * pam_sql/pam_pgsql.c (gpam_sql_verify_user_pass): Likewise. * pam_sql/pam_sql.c (gpam_sql_get_query): Return PAM_AUTHINFO_UNAVAIL if the keyword is not defined in the environment.
2021-01-06Update copyright yearsSergey Poznyakoff1
2020-03-29Use wordsplit for keyword expansion.Sergey Poznyakoff1
* .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.
2018-08-15Major cleanupSergey Poznyakoff1
* lib/graypam.h (gray_pam_init) (gray_raise,gray_malloc,gray_zalloc,gray_calloc) (gray_realloc,gray_strdup): Remove. (gray_slist_err,gray_slist_clrerr): New functions. (gray_slist_append,gray_slist_append_char): Return ssize_t. (gray_slist_coalesce): Likewise. (gray_slist_grow_backslash_num) (gray_slist_grow_backslash): Return int. (errno_to_pam): New function. (gray_set_transform_expr): Return int. * lib/mem.c (gray_raise,gray_malloc,gray_zalloc,gray_calloc) (gray_realloc,gray_strdup): Remove. (gray_2nrealloc): Rewrite. * lib/base64.c: Check return from gray_slist_append_char * lib/env.c: Check return values from gray_slist functions * lib/ldappass.c: Likewise. * lib/slist.c (gray_slist_bucket) <ec>: New member. (gray_slist_err,gray_slist_clrerr): New functions. (gray_slist_append,gray_slist_append_char): Return ssize_t. (gray_slist_coalesce): Likewise. (gray_slist_grow_backslash_num) (gray_slist_grow_backslash): Return int. * lib/transform.c: Use standard memory allocation functions. * pam_ldaphome/pam_ldaphome.c: Likewise. * pam_innetgr/pam_innetgr.c: Likewise. * pam_log/pam_log.c: Likewise. * pam_regex/pam_regex.c: Likewise. * pam_sql/pam_mysql.c: Likewise. * pam_sql/pam_pgsql.c: Likewise.
2018-01-01Happy GNU YearSergey Poznyakoff1
2015-01-28Update copyright dates.Sergey Poznyakoff1
2014-12-04Implement audit optionSergey Poznyakoff1
Audit is equivalent to debug=100, i.e. it enables logging maximum debugging output.
2014-02-11Update copyright years, set version 1.7.92Sergey Poznyakoff1
2012-07-04Update copyright years.Sergey Poznyakoff1
2012-05-13Revamp build system. Add pam_ldaphome module.Sergey Poznyakoff1
* configure.ac: Test for ldap. (AC_OUTPUT): Create pam_ldaphome/Makefile. * acinclude.m4 (PM_ENABLE): Declare PAM_COND_<item> conditional in addition to BUILD_PAM_<item> substitution variable. * Makefile.am (SUBDIRS): Include most modules via conditionally defined Makefile variables. * lib/graypam.h (gray_env): New struct. (gray_env_get,gray_env_free,gray_env_read) (gray_boolean_true_p): New protos. * lib/env.c: New file. * lib/Makefile.am (libgraypam_la_SOURCES): Add env.c * pam_fshadow/Makefile.am: Remove BUILD_PAM_FSHADOW substitution. * pam_regex/Makefile.am: Remove BUILD_PAM_REGEX substitution. * pam_sql/pam_sql.c (free_config, boolean_true_p) (read_config): Remove. Use gray_env_* functions instead. All uses updated. * pam_regex/pam_regex.c: Fix typo. * pam_ldaphome/Makefile.am: New file. git-svn-id: file:///svnroot/pam-modules/trunk@118 56984be4-0537-0410-a56c-fcb268c96130
2011-04-08Update copyright yearsSergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@113 56984be4-0537-0410-a56c-fcb268c96130
2010-01-02Update copyright years.Sergey Poznyakoff1
Happy GNU Year! git-svn-id: file:///svnroot/pam-modules/trunk@110 56984be4-0537-0410-a56c-fcb268c96130
2009-04-07Minor changesSergey Poznyakoff1
* pamck/conv.c (pamck_conv): Fix handling of PAM_PROMPT_ECHO_ON. * pamck/pamck.c: Minor changes. * pam_sql/pam_sql.c (_pam_get_password): Fix condition. git-svn-id: file:///svnroot/pam-modules/trunk@108 56984be4-0537-0410-a56c-fcb268c96130
2009-02-27Rewrite Makefile.am's in a clearer and simpler waySergey Poznyakoff1
* configure.ac: Require libtool 2.2.5a * Make.rules (.c.lo, .lo.la): Remove (AM_LDFLAGS, INCLUDES, LIBS): New assignments. * pam_sql/Makefile.am, pam_fshadow/Makefile.am, pam_sql/Makefile.am, pam_regex/Makefile.am, pam_log/Makefile.am: Rewrite. * pam_sql/pam_sql.h, pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c. pam_sql/pam_sql.c: Rewrite. * pam_sql/sha1.h, pam_sql/md5.c, pam_sql/md5.h, pam_sql/sha1.c * pam_fshadow/pam_fshadow.c: New option [no]shadow * doc/pam-modules.texi: Update. * lib/graypam.h (gray_trim_ws): New proto * lib/strutil.c: New file. * lib/Makefile.am: Add strutil.c git-svn-id: file:///svnroot/pam-modules/trunk@105 56984be4-0537-0410-a56c-fcb268c96130
2008-03-19Documentation checking framework:Sergey Poznyakoff1
* doc/macros.texi, doc/check-docs.sh, doc/mastermenu.el, doc/untabify.el, doc/rendition.texi: New files. * pam_regex/pam_regex.c: Remove useless use_authtok option. * pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c, pam_sql/pam_sql.c: Pacify `make check-sql-config' in doc. * doc/Makefile.am: Add check-* rules. * doc/pam-modules.texi: Update. git-svn-id: file:///svnroot/pam-modules/trunk@92 56984be4-0537-0410-a56c-fcb268c96130
2008-03-19* configure.ac: Check for pam libraries and header files.Sergey Poznyakoff1
* pam_sql/pam_mysql.c (mysql_setenv): Protect by #ifdef HAVE_PAM_MISC_SETENV. Prevent coredumps on NULL values. * pam_sql/pam_pgsql.c (pgsql_setenv): Likewise. * pam_sql/Makefile.am (pam_mysql_la_LDADD,pam_pgsql_la_LDADD): Add @PAM_MISC@. * pam_sql/pam_sql.c (read_config): Read lines of arbitrary length. git-svn-id: file:///svnroot/pam-modules/trunk@90 56984be4-0537-0410-a56c-fcb268c96130
2008-03-18* pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c: Implement `setenv'Sergey Poznyakoff1
method. * pam_sql/pam_sql.c, pam_fshadow/pam_fshadow (_pam_get_password): Set PAM_AUTHTOK. git-svn-id: file:///svnroot/pam-modules/trunk@89 56984be4-0537-0410-a56c-fcb268c96130
2008-03-16* pam_fshadow/pam_fshadow.c, pam_sql/pam_mysql.c,Sergey Poznyakoff1
pam_sql/pam_sql.c, pam_regex/pam_regex.c: Ensure passwords might get divulged only at debugging level 100. git-svn-id: file:///svnroot/pam-modules/trunk@87 56984be4-0537-0410-a56c-fcb268c96130
2008-03-16Add session management to pam_sql.Sergey Poznyakoff1
* NEWS, configure.ac: Updated. Set version to 1.3.90. * lib/escape.c lib/vartab.c: New files. * lib/graypam.h (gray_expand_argv) (gray_expand_string, gray_escape_string): New functions. (struct keyword): New declaration. (gray_find_keyword): New function. * lib/Makefile.am (libgraypam_la_SOURCES): Add vartab.c and escape.c. * pam_log/pam_log.c: Use gray_find_keyword and gray_expand_argv. * pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c (verify_user_pass): Change signature. (sql_acct): New function. * pam_sql/pam_sql.c (verify_user_pass): Change signature. (_pam_parse): Initialize globals. (free_config): Reset config_env to NULL. (read_config): Set config_env to NULL. (get_query,get_query2): New functions. (pam_sm_authenticate): Call gray_pam_init, update call to verify_user_pass. (sql_session_mgmt,pam_sm_open_session,pam_sm_close_session): New functions. git-svn-id: file:///svnroot/pam-modules/trunk@86 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15Prepare for the releaseSergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@83 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14* lib/graypam.h: Minor change.Sergey Poznyakoff1
* pam_sql/pam_pgsql.c (verify_user_pass): port is optional. Fix erroneous argument to PQsetdbLogin. * pam_sql/pam_sql.c (pam_opt): Bugfix. git-svn-id: file:///svnroot/pam-modules/trunk@69 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14* lib/parseopt.c: New file.Sergey Poznyakoff1
* lib/Makefile.am (libgraypam_la_SOURCES): Add parseopt.c * lib/graypam.h (gray_parseopt, gray_wait_debug_fun): New functions (CNTL_DEBUG_LEV, CNTL_SET_DEBUG_LEV): Removed. * lib/log.c (gray_wait_debug): New functions. * pam_fshadow/pam_fshadow.c, pam_sql/pam_sql.c, pam_regex/pam_regex.c, pam_log/pam_log.c: Use gray_parseopt for command line parsing. git-svn-id: file:///svnroot/pam-modules/trunk@67 56984be4-0537-0410-a56c-fcb268c96130
2008-03-13* configure.ac (PAM_COMMON_INCLUDES): Add -I${top_srcdir}/lib.Sergey Poznyakoff1
(AC_OUTPUT): Add lib/Makefile. * doc/pam-modules.texi: Document `transform' option. * Make.rules: New file. * lib/mem.c, lib/slist.c, lib/log.c, lib/converse.c, lib/graypam.h, lib/Makefile.am, lib/transform.c. * pam_regex/pam_regex.c: Implement user name transformations. * pam_fshadow/Makefile.am, pam_sql/Makefile.am: Add ../lib/libgraypam.la to LDADD * pam_fshadow/pam_fshadow.c, pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c, pam_sql/pam_sql.c: Use functions from ../lib. git-svn-id: file:///svnroot/pam-modules/trunk@63 56984be4-0537-0410-a56c-fcb268c96130
2007-08-27Lots of fixes in pam_mysqlSergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@61 56984be4-0537-0410-a56c-fcb268c96130
2007-08-14* pam_fshadow/pam_fshadow.c: Include config.h and time.hSergey Poznyakoff1
* pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c, pam_sql/pam_sql.c: Use _pam_log for diagnostics. * pam_regex/pam_regex.c (pam_sm_authenticate): Remove unused variable. * configure.ac: New option --enable-debug * common.c (wait_debug): Bugfix * pam_log/pam_log.c: Include ctype.h (parse_priority): Change return type. * pam_fshadow/Makefile.am, pam_log/Makefile.am, pam_regex/Makefile.am, pam_sql/Makefile.am: Use CPPFLAGS in cc rules. git-svn-id: file:///svnroot/pam-modules/trunk@58 56984be4-0537-0410-a56c-fcb268c96130
2007-08-06Relicense under GPLv3.Sergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@50 56984be4-0537-0410-a56c-fcb268c96130
2007-08-05(verify_user_pass): staticSergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@47 56984be4-0537-0410-a56c-fcb268c96130
2006-09-06UpdateSergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@37 56984be4-0537-0410-a56c-fcb268c96130
2006-09-05*** empty log message ***Sergey Poznyakoff1
git-svn-id: file:///svnroot/pam-modules/trunk@31 56984be4-0537-0410-a56c-fcb268c96130

Return to:

Send suggestions and report system problems to the System administrator.