Commit Graph

33 Commits

Author SHA1 Message Date
Luke Howard
befe1b8f90 always load plugins with RTLD_LOCAL/RTLD_GROUP if available 2019-01-03 20:06:27 -06:00
Russ Allbery
c3b3c2ec8e Close memory leak in external_passwd_quality
If the external password quality program returned a failure
message, the unparsed form of the principal name was never
freed.  Free it.
2017-09-25 18:18:55 -05:00
Jeffrey Altman
989a7c3379 kadm5: kadm5_add_passwd_quality_verifier memory leak
if krb5_get_config_strings() returns the empty string do not return
immediately.  Instead the for() loop will be skipped because the empty
string represents the end of the string list permitting
krb5_config_free_strings() to free the allocated memory.

Change-Id: Ia6fdb13f716c07b53c8b3857af4f7ab8be578882
2016-11-19 08:23:06 -05:00
Jeffrey Altman
055edd9669 kadm5: kadm5_add_passwd_quality_verifier leaks 'strs'
Change-Id: Ibcc3f512016a4a095eacbd710c395aaf93c4b7f7
2016-11-19 07:28:42 -05:00
Nicolas Williams
52a562a3a4 Misc fixes (coverity) 2016-11-18 22:21:45 -06:00
Harald Barth
8546c0c7b8 Better character classes and wording
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-05-30 19:43:30 +02:00
Love Hornquist Astrand
33f717edb2 Only set msg in case we have one, from Rangar Sundblad 2011-10-19 10:38:59 +02:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
f5f9014c90 Warning fixes from Christos Zoulas
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hornquist Astrand
1b81d2db6b support loading more then one verifier, use function name instead of module name
patch from Tom Payerle
2011-04-23 18:57:12 -07:00
Asanka C. Herath
2f8031c1d1 Cast dlsym() returns before use 2010-11-24 15:33:10 -05:00
Patrik Lundin
d5e4619738 Fix order of arguments given to memchr().
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-30 21:30:33 -07:00
Russ Allbery
bc3d8992cd Don't attempt to load a password quality verifier from NULL
When kadm5_add_passwd_quality_verifier is called with a NULL
check_library parameter and [password_quality].policy_libraries
is set, the function calls add_verifier() for each string in the
policy_libraries section and then falls through to the non-NULL
case and calls add_verifier() a final time with a NULL argument.
This leads to dlopening the running executable and then failing
since it contains no password quality verifier.

If the check_library argument is NULL, only call add_verifier()
for the configured policy_libraries and do not fall through to
the non-NULL case.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-02 20:46:23 -08:00
Russ Allbery
80317bbd20 Pass external password quality program name as first argument
Pass the path to the external password quality program as the first
argument to the program and the principal as the second argument, as is
conventional, rather than passing only the principal.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-01-14 23:38:17 +00:00
Asanka Herath
6a88c16dea Use wait_for_process() to wait for processes created with simple_exec* 2009-11-24 10:12:45 -08:00
Love Hörnquist Åstrand
25eaa03e53 drop strndup
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24537 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-30 16:45:51 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
7fcd266fdd use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
201b9198cc (kadm5_check_password_quality): set error message in context.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17595 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-30 21:51:55 +00:00
Love Hörnquist Åstrand
cb704efeeb Rename u_intXX_t to uintXX_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17445 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 10:37:46 +00:00
Love Hörnquist Åstrand
7f55eae358 constify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15489 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-17 06:45:52 +00:00
Love Hörnquist Åstrand
bf00a76951 (find_func): Fix off-by-one and logic error.
(external_passwd_quality): Improve messages.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15106 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-09 19:17:34 +00:00
Love Hörnquist Åstrand
a6a96fbc46 don't use sizeof(pointer)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14925 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-24 18:56:55 +00:00
Love Hörnquist Åstrand
bb095dc7cc replace dash with underscore in the new configuration file option,
just like the rest of the file


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14804 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-15 11:32:23 +00:00
Love Hörnquist Åstrand
bb3421e14d (kadm5_add_passwd_quality_verifier): if NULL is passed in, load defaults
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14801 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-15 11:13:12 +00:00
Love Hörnquist Åstrand
17f0e880c2 add an end tag to the external password quality check protocol
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14789 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-14 06:04:37 +00:00
Love Hörnquist Åstrand
98c23307d7 add external passsword quality check builtin module
[password_quality]
	policies = external-check
	external-program = /bin/false

To approve password a, make the test program return APPROVED on stderr
and fail with exit code 0.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14784 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-13 11:47:48 +00:00
Love Hörnquist Åstrand
193383cfd0 new password check interface (old still supported)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13964 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-21 11:16:14 +00:00
Johan Danielsson
477d8874bf remove bogus externs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8549 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-05 13:14:45 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Assar Westerlund
2ddbca2548 (kadm5_setup_passwd_quality_check): use correct types for function
pointers


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7373 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-13 04:16:31 +00:00
Assar Westerlund
867ebdec52 password quality checking functions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6912 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-10 10:19:28 +00:00