Commit Graph

5400 Commits

Author SHA1 Message Date
Benjamin Dauvergne d95a7afcb6 Release 2.4.1 2014-08-28 16:02:06 +02:00
Benjamin Dauvergne 8484e7a065 Add tool gitlog-to-changelog 2014-08-28 16:00:13 +02:00
Frédéric Péters cad7b33c73 saml-2.0: set NotOnOrAfter on the Conditions element (#5248)
This is actually required for interoperability with Dropbox SAML support.
2014-08-12 10:11:33 +02:00
Benjamin Dauvergne fd10b952a8 doc: add lasso_server_add_provider2 and lasso_server_load_metadata 2014-08-12 10:11:33 +02:00
Frédéric Péters d297c88224 perl: keep on using PREFIX, required for distcheck 2014-08-11 09:55:42 +02:00
Frédéric Péters 9b99eaee8a reformat gtk-doc function comment to work with gtk-doc 1.21 2014-08-11 09:41:36 +02:00
Simon Josefsson ced1f047c2 fix pkg-config typo. 2014-08-11 09:12:42 +02:00
Niko Tyni f53c1aaaac Use INSTALLDIRS=vendor for the Perl bindings, as per the Debian Perl policy
Debian packaged Perl modules should be installed into the vendor
directories (currently /usr/lib/perl5 and /usr/share/perl5), but the
upstream default puts the into the 'site' ones (modified with the
PREFIX setting.) Explicitly using INSTALLDIRS=vendor simplifies
the install rules and removes the need for PREFIX, which has
been deprecated in ExtUtils::MakeMaker for a long time.
2014-08-06 11:42:52 +03:00
Benjamin Dauvergne 875f40832b Restore not-unused code
Clang was wrong on one instance, a value must be initialized to its NULL
state before using any lasso_assign_ macro with it.

Bug introduced in 4789e8d4d6.
2014-07-30 17:17:08 +02:00
Simo Sorce d911a2092f One more uninitialized value
encode_key may be release when not initialized if va_args returns null
on the first while loop.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:45 +02:00
Simo Sorce 99376a3c88 Fix potential null dereference errors
Ina  number of cases function inputs are not checked for NULL although
values may end up with a NULL value and then they are dereferenced
directly.
Check values in the function (or the caller) if appropriate.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:45 +02:00
Simo Sorce 1b955021a5 Do not dereference null pointers
Sounds like these should all be boolean 'OR's, otherwise,
if profile is not in fact a lasso profile then profile->private_data
will be dereferenced even if it is NULL.
Found by Clang

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:45 +02:00
Simo Sorce cb7ea06ca5 Rearrange case checking to avoid compiler warnings
The compiler was complaining that 'compa' could be uninitialized.
USe this occasion to make the code simpler to understand and assign
actually meaningful values to the variable, even though the proper
actions are not implemented yet.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce 86bfc84ba1 Properly exit on error
The rc error was being set but then it was being ignored.
Get out immediately if an Issuer can't be found.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce f91f4b4b8f Consistently check dsig_reference_ctx
Check if this is not NULL in all cases, to avoid NULL pointer dereference.
Found by clang

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce 4789e8d4d6 Trim unused code
Clang complains these values are never used, avoid even assigning them.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce b6b458e000 Trim dead code
These conditions can never be reached as the list is filtered with
and and to the value of 0xff, so just drop them, they are misleading.
(Also silences checkers which were screaming of deadcode, for each and
every unmatchable value ...)

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce be02981ff1 Fix confusing loop test
Coverity was marking the check for tsnippet after the while loop,
confused by the check. Make it more readable, and in the process
make checkers happy too.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce 1f97a06a01 Fix some uninitialized value
The compiler complain about these values not being initialized.
come of them do not really matter as they are only really used when
later initialized in the code and the code paths would not use them
if not initialized in a previous block, however some of these seem
real issues.
In all cases make the compiler happy so we get less noise in the build
and less false positives in code chckers.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce 80757431b3 Missing check for Sig_Alg value
Initialize the sig_alg value to NULL (The compilers was complaining it may
be used initialized), but also make sure to check the re is any sig_alg at
all, otherwise return a proper error.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce 899f5c8880 Fix boundary check
Coverity was marking this as an array overun as the check would never be
possible and wuld allow any value for query_request_type, including "unset"
wihch is 0.
fix the boundary checks.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:44 +02:00
Simo Sorce 661f81014e Fix uninitialized values found by Coverity
These values where being used without being initialized at least in some edge
cases. Make Coverity happy by properly initializing them.
Some of these are real bugs, not just silencing a tool.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:43 +02:00
Simo Sorce 86328f2937 Fix format check for date
Coverity was complaining that tm was used uninitialized, but the truth is
that a third error condition where the string passed in matches no valid
format was not handled. Just return an error in that case.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:43 +02:00
Simo Sorce 0238e8a986 Fix error checking in xml.c
Coverity was complaining that 'integer' was being used without
initialization (from the caller). Turns out it was erroneously used
to test the result instead of the just sourced 'what'.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:43 +02:00
Simo Sorce 5aa184b6b4 Fixes for unchecked return values
Coverity complains that in a number of places errors are not checked.
Some of them are ok not to check so put a silencing (void).
Check errors that need to be checked.

Coverity also complains g_malloc() return is never checked but given it is
never checked anywahere let it be for now.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:43 +02:00
Simo Sorce b6a3ec78a0 Be correct in dealing with varargs
Although in this cases it may be safe to omit va_end() that is not generally
so with an arbitrary compiler on an arbitrary platform.

Quoting from the spec: "Each invocation of va_start() must be matched by
a corresponding invocation of va_end() in the same function."
note the "must"

Checker tools like Coverity complain if va_start() is not always paired with
va_end(), so this patch mutes them.

License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
2014-07-30 16:07:43 +02:00
Benjamin Dauvergne 82fd1bcd38 bindings/python/tests: session indexes storage preserves order now 2014-06-08 12:50:26 +02:00
Benjamin Dauvergne cabe31f5fc tests: add target to Makefile to produce valgrind suppression entries 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne d6ec627844 tests/valgrind: add suppression of all leaks related to initialisation of the GLib type system 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne a90d3ad1c8 tests: fix leaks 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne 5def9c160b saml-2.0/profile: fix leak of xmlSecKey when building signed query strings 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne 7d514b67fc id-ff/provider: fix leak of xmlSecKey 2014-06-08 12:32:09 +02:00
Benjamin Dauvergne 49a6e9a983 xml/samlp2_logout_request: fix leaks around session indexes 2014-06-08 12:13:30 +02:00
Benjamin Dauvergne e25968a9fd server: fix leak of xmlSecKey objects 2014-06-08 12:13:30 +02:00
Benjamin Dauvergne 99f00e88bf session: fix leak of _NidAndSessionIndex structures 2014-06-08 12:13:30 +02:00
Benjamin Dauvergne 3a2c8e62dd saml-2.0/server: fix invalid memory access
GList must never be allocated through malloc as it internally managed
using gslice. Always use Glib constructors and methods.
2014-06-07 14:11:14 +02:00
Benjamin Dauvergne b6282eda59 tests: fix leak in log message checker 2014-06-07 14:11:14 +02:00
Benjamin Dauvergne 880b833c6e tests: do not reuse tc_response_new_from_xmlNode test case 2014-06-07 14:11:13 +02:00
Benjamin Dauvergne c3d451559a bindings/python: fix conversion of unicode value to UTF-8 for setters 2014-05-28 09:13:34 +02:00
Benjamin Dauvergne 7362567411 login: complete document of lasso_login_process_authn_response_msg on expectable error codes 2014-05-21 14:07:06 +02:00
Benjamin Dauvergne 6012c05951 website: update links section 2014-04-24 12:44:24 +02:00
Benjamin Dauvergne 673b16831b website: add news about 2.4.0 release 2014-04-24 12:39:21 +02:00
Benjamin Dauvergne 2df12563af website: fix HTML grammar errors 2014-04-24 12:37:25 +02:00
Benjamin Dauvergne b64dc63580 xml/xml.c: fix liberal use of casting for the SNIPPET_INTEGER and SNIPPET_BOOLEAN case
Some behaviour are also made more explicit like the optional if equals
to -1 case for integer fields, and the optional if FALSE for boolean
fields.
2014-04-24 12:32:44 +02:00
Benjamin Dauvergne a0cbf32fc4 INSTALL: add php-cli to needed dependencie when compiling on Debian 2014-04-24 12:32:44 +02:00
Benjamin Dauvergne 59b0569341 tests: pass automake CFLAGS when compiling tests2 2014-04-24 12:32:43 +02:00
Benjamin Dauvergne 6d854cef42 lasso/xml/tools.c: fix reference to unitialized memory 2014-04-24 12:32:43 +02:00
Benjamin Dauvergne 7e6c7bf3f0 NEWS: fix wrong date for 2.4.0 release 2014-04-24 12:32:43 +02:00
Benjamin Dauvergne 74eae762ad update website for 2.4.0 release
- remove windows installer reference
- update debian repository configuration
- point to cgit browser and releases directory
2014-04-24 12:32:43 +02:00
Simo Sorce 7a36f17982 Fix generators for parsing of integer values
All number types including enums are parse as if they were integers,
this breaks in many ways, long and int are not the same size in all
architectures as well as enum may vary in size depening on compiler,
architecture and optimizations.

Always pass an actual long to PyArg_ParseTuple() and rely on the a
cast from long to the destination variable type in the following
assignment.

Signed-off-by: Simo Sorce <simo@redhat.com>
2014-04-23 15:40:27 +02:00