Commit graph

202 commits

Author SHA1 Message Date
Sergey Poznyakoff
9a1b32df22 Various bugfixes.
* pam_fshadow/pam_fshadow.c (pam_sm_authenticate): Fix
erroneous conditional, which allowed for logins with
arbitrary passwords if `nopasswd' option was given.
* lib/graypam.h (gray_free_transform_expr): New proto.
* lib/transform.c (transform) <has_regex>: New member.
(free_transform,free_segment): New statics.
(gray_free_transform_expr): New function.
* pam_regex/pam_regex.c (pam_sm_authenticate): Free slist and
transform expression.



git-svn-id: file:///svnroot/pam-modules/trunk@116 56984be4-0537-0410-a56c-fcb268c96130
2011-08-31 07:34:59 +00:00
Sergey Poznyakoff
fc8faec0f7 * configure.ac: Enable silent rules. Set version number 1.7.
Require autoconf 2.63, automake 1.11.
* pam_log/pam_log.c: Suppress a gcc warning.
* NEWS: Update.


git-svn-id: file:///svnroot/pam-modules/trunk@114 56984be4-0537-0410-a56c-fcb268c96130
2011-04-08 09:03:49 +00:00
Sergey Poznyakoff
a8eb15d394 Update copyright years
git-svn-id: file:///svnroot/pam-modules/trunk@113 56984be4-0537-0410-a56c-fcb268c96130
2011-04-08 08:54:48 +00:00
Sergey Poznyakoff
1e8ece541a Update ChangeLog
git-svn-id: file:///svnroot/pam-modules/trunk@112 56984be4-0537-0410-a56c-fcb268c96130
2011-04-04 22:00:34 +00:00
Sergey Poznyakoff
4a14b85677 Allow for the use of `CALL proc' in MySQL queries.
* pam_sql/pam_mysql.c (flush_result): New static.
(mysql_do_query): Call mysql_real_connect with the CLIENT_MULTI_RESULTS flag.
(check_query_result, mysql_setenv, gpam_sql_acct): Call flush_result
after freeing the result.


git-svn-id: file:///svnroot/pam-modules/trunk@111 56984be4-0537-0410-a56c-fcb268c96130
2011-04-04 21:59:36 +00:00
Sergey Poznyakoff
8e3f1518fc Update copyright years.
Happy GNU Year!


git-svn-id: file:///svnroot/pam-modules/trunk@110 56984be4-0537-0410-a56c-fcb268c96130
2010-01-02 15:12:34 +00:00
Sergey Poznyakoff
a212b855de Improve docs.
* doc/Config: New file
* doc/Makefile.am (manual.tar.bz2, man-tar): New rules.
* doc/pam-modules.texi: Minor changes.
* doc/gendocs_template: Rewrite.


git-svn-id: file:///svnroot/pam-modules/trunk@109 56984be4-0537-0410-a56c-fcb268c96130
2009-10-29 12:46:40 +00:00
Sergey Poznyakoff
afa326ab45 Minor changes
* 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-04-07 17:59:45 +00:00
Sergey Poznyakoff
53cd478f5c Minor changes
* pam_fshadow/pam_fshadow.c: Protect shadow-related code with
ifdefs.
* configure.ac: Check for shadow.h, struct spwd and fgetspent. Do
not disable pam_fshadow.c if they are not present.


git-svn-id: file:///svnroot/pam-modules/trunk@107 56984be4-0537-0410-a56c-fcb268c96130
2009-02-27 15:49:13 +00:00
Sergey Poznyakoff
27cbbfe1b7 Avoid gcc warnings
git-svn-id: file:///svnroot/pam-modules/trunk@106 56984be4-0537-0410-a56c-fcb268c96130
2009-02-27 15:30:15 +00:00
Sergey Poznyakoff
aaf0e43331 Rewrite Makefile.am's in a clearer and simpler way
* 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
2009-02-27 14:54:58 +00:00
Sergey Poznyakoff
a6ce07e20e Minor fixes
git-svn-id: file:///svnroot/pam-modules/trunk@103 56984be4-0537-0410-a56c-fcb268c96130
2009-02-25 20:13:27 +00:00
Sergey Poznyakoff
91361e6976 Implement pamck utility.
* pamck/pamck.c, pamck/pamck.h, pamck/conv.c, pamck/Makefile.am: New files.
* doc/pam-modules.texi: Document pamck.
* doc/fdl.texi: Move sectioning command to pam-modules.texi.
* NEWS: Update.



git-svn-id: file:///svnroot/pam-modules/trunk@102 56984be4-0537-0410-a56c-fcb268c96130
2009-02-25 12:58:11 +00:00
Sergey Poznyakoff
e996bc37b3 Fix improper use of $< in explicit rules
git-svn-id: file:///svnroot/pam-modules/trunk@101 56984be4-0537-0410-a56c-fcb268c96130
2009-02-18 23:28:06 +00:00
Sergey Poznyakoff
d1ae7a52a3 Fix configure script
* pam_fshadow/Makefile.am: Build the module conditionally.
* pam_regex/Makefile.am: Likewise.
* pam_log/Makefile.am: Likewise.
* NEWS, README: Update.
* configure.ac: Raise version number to 1.5. Update bug-report
address.
Add options for disabling fshadow, log and regex.
* acinclude.m4: Prefix all macros with PM_
(PM_CHECK_LIB): Rewrite.


git-svn-id: file:///svnroot/pam-modules/trunk@98 56984be4-0537-0410-a56c-fcb268c96130
2009-02-17 14:48:58 +00:00
Sergey Poznyakoff
bde5c28e08 Update
git-svn-id: file:///svnroot/pam-modules/trunk@97 56984be4-0537-0410-a56c-fcb268c96130
2008-03-20 11:56:41 +00:00
Sergey Poznyakoff
dca2d18f2f * configure.ac, NEWS: Version 1.4
* doc/pam-modules.texi: Update.
* doc/macros.texi (opsummary,kwsummary): Remove anchor
definitions, they cause grief in texi2html.



git-svn-id: file:///svnroot/pam-modules/trunk@96 56984be4-0537-0410-a56c-fcb268c96130
2008-03-20 11:54:32 +00:00
Sergey Poznyakoff
e6edc4080e Update
git-svn-id: file:///svnroot/pam-modules/trunk@95 56984be4-0537-0410-a56c-fcb268c96130
2008-03-19 22:25:35 +00:00
Sergey Poznyakoff
059098abc3 Improve docs
git-svn-id: file:///svnroot/pam-modules/trunk@94 56984be4-0537-0410-a56c-fcb268c96130
2008-03-19 21:27:52 +00:00
Sergey Poznyakoff
d8d437d1a7 Update
git-svn-id: file:///svnroot/pam-modules/trunk@93 56984be4-0537-0410-a56c-fcb268c96130
2008-03-19 20:58:05 +00:00
Sergey Poznyakoff
6f50f8c380 Documentation checking framework:
* 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 20:56:26 +00:00
Sergey Poznyakoff
b6f298c644 Update
git-svn-id: file:///svnroot/pam-modules/trunk@91 56984be4-0537-0410-a56c-fcb268c96130
2008-03-19 10:00:52 +00:00
Sergey Poznyakoff
06aaf68ec3 * configure.ac: Check for pam libraries and header files.
* 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-19 09:50:00 +00:00
Sergey Poznyakoff
80aafa9dcf * pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c: Implement `setenv'
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-18 22:32:57 +00:00
Sergey Poznyakoff
09ec2b74a1 Update
git-svn-id: file:///svnroot/pam-modules/trunk@88 56984be4-0537-0410-a56c-fcb268c96130
2008-03-16 22:55:56 +00:00
Sergey Poznyakoff
d3b8bcfd1f * pam_fshadow/pam_fshadow.c, pam_sql/pam_mysql.c,
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-16 22:12:43 +00:00
Sergey Poznyakoff
f5f42d1c7b Add session management to pam_sql.
* 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-16 22:02:25 +00:00
Sergey Poznyakoff
7345ac7561 * pam_regex/pam_regex.c (pam_opt): Fix a typo: rename "user_name"
option to "user".
(pam_sm_authenticate): Bugfix


git-svn-id: file:///svnroot/pam-modules/trunk@85 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 12:39:50 +00:00
Sergey Poznyakoff
874bc492cc Prepare for the release
git-svn-id: file:///svnroot/pam-modules/trunk@83 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 10:08:34 +00:00
Sergey Poznyakoff
c934a7f360 Version 1.2.90
git-svn-id: file:///svnroot/pam-modules/trunk@82 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 09:27:24 +00:00
Sergey Poznyakoff
9728d1c2f4 Minor change
git-svn-id: file:///svnroot/pam-modules/trunk@81 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 09:27:11 +00:00
Sergey Poznyakoff
7a1d93c4eb Minor change
git-svn-id: file:///svnroot/pam-modules/trunk@80 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 09:26:59 +00:00
Sergey Poznyakoff
3c4a95de06 Bugfixes
git-svn-id: file:///svnroot/pam-modules/trunk@79 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 09:09:14 +00:00
Sergey Poznyakoff
08e01fc11d Remove mailutils' traces
git-svn-id: file:///svnroot/pam-modules/trunk@78 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 07:57:01 +00:00
Sergey Poznyakoff
9e2dcb7eca Initial framework for LDAP-style password hashes.
* pam_sql/pam_mysql.c, pam_sql/pam_pgsql.c: Call
gray_check_ldap_pass if configuration variable allow-ldap-pass is
set.
* lib/graypam.h (gray_base64_decode, gray_check_ldap_pass): New
prototypes.
* lib/Makefile.am (libgraypam_la_SOURCES): Add new files.
* lib/sha1.h, lib/base64.c, lib/md5.c, lib/ldappass.c, lib/md5.h,
lib/sha1.c: New files.


git-svn-id: file:///svnroot/pam-modules/trunk@77 56984be4-0537-0410-a56c-fcb268c96130
2008-03-15 07:39:01 +00:00
Sergey Poznyakoff
c75757a05a Update
git-svn-id: file:///svnroot/pam-modules/trunk@74 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14 15:30:23 +00:00
Sergey Poznyakoff
70b5c04c1c Update
git-svn-id: file:///svnroot/pam-modules/trunk@72 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14 15:26:50 +00:00
Sergey Poznyakoff
c6ee02dabb * doc/Makefile.am: Use texi2html to produce html files.
* doc/gendocs_template: Use latest version from Texinfo.




git-svn-id: file:///svnroot/pam-modules/trunk@71 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14 15:24:16 +00:00
Sergey Poznyakoff
f0b4d4dff5 Release 1.2
git-svn-id: file:///svnroot/pam-modules/trunk@70 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14 15:02:35 +00:00
Sergey Poznyakoff
0b547268bf * lib/graypam.h: Minor change.
* 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 14:42:56 +00:00
Sergey Poznyakoff
af7c330bf3 * NEWS, doc/pam-modules.texi: Document new regexp default for pam_fshadow.c
git-svn-id: file:///svnroot/pam-modules/trunk@68 56984be4-0537-0410-a56c-fcb268c96130
2008-03-14 12:52:38 +00:00
Sergey Poznyakoff
1128870a98 * lib/parseopt.c: New file.
* 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-14 12:50:10 +00:00
Sergey Poznyakoff
8600d3bc0e (pam_sm_authenticate): Remove unnecessary variable rmatch
git-svn-id: file:///svnroot/pam-modules/trunk@66 56984be4-0537-0410-a56c-fcb268c96130
2008-03-13 14:07:03 +00:00
Sergey Poznyakoff
b10559bf03 Update svn:ignore
git-svn-id: file:///svnroot/pam-modules/trunk@65 56984be4-0537-0410-a56c-fcb268c96130
2008-03-13 13:56:11 +00:00
Sergey Poznyakoff
6d0272d028 Update svn:ignore
git-svn-id: file:///svnroot/pam-modules/trunk@64 56984be4-0537-0410-a56c-fcb268c96130
2008-03-13 13:55:17 +00:00
Sergey Poznyakoff
222d4ff807 * configure.ac (PAM_COMMON_INCLUDES): Add -I${top_srcdir}/lib.
(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
2008-03-13 13:53:32 +00:00
Sergey Poznyakoff
f9f6f80133 Bugfixes
git-svn-id: file:///svnroot/pam-modules/trunk@62 56984be4-0537-0410-a56c-fcb268c96130
2007-08-28 13:00:56 +00:00
Sergey Poznyakoff
cf85e27af5 Lots of fixes in pam_mysql
git-svn-id: file:///svnroot/pam-modules/trunk@61 56984be4-0537-0410-a56c-fcb268c96130
2007-08-27 22:38:35 +00:00
Sergey Poznyakoff
e49b98a296 Update
git-svn-id: file:///svnroot/pam-modules/trunk@60 56984be4-0537-0410-a56c-fcb268c96130
2007-08-14 09:00:04 +00:00
Sergey Poznyakoff
69e4484b3f Update
git-svn-id: file:///svnroot/pam-modules/trunk@59 56984be4-0537-0410-a56c-fcb268c96130
2007-08-14 08:56:02 +00:00