[PATCHES] Enable sending DEBUG logs to journald
by Stephen Gallagher
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
All of these patches require Nikolai's "DEBUG Macro Refactoring v3"
patches to be applied first.
Patch 0001: Allow debug_fn to process __FILE__ and __LINE__
In preparation for enabling journald support for the DEBUG logs, we
will need to be able to pass in certain additional arguments that will
be required, specifically the code file and line number.
We will be able to optionally enable this in the file-based logs as well
if we so choose, but for right now we will avoid breaking the log
format on disk.
Patch 0002: Enable sending structured debug logs to journald
We are now able to send structured debug logs to journald, tagged with
the code file, line number and domain that the log pertains to. To
enable this functionality, SSSD must be configured at build-time with
- --with-syslog=journald and must be launched without -f/--debug-to-files
This behavior is nearly identical to how SSSD will function today on a
systemd-based system if --debug-to-files is disabled, since it will
redirect stdout and stderr into journald. This patch merely enhances
the situation to send structured logs instead of simple string messages.
Patch 0003: BUILD: Build with journald support by default on Fedora
The journal provided by systemd gives us structured logging
capabilities that we should be taking advantage of.
Note: this patch explicitly does not change the systemd unit file for
SSSD. Right now, an administrator will need to manually remove the
'-f' from ExecStart in the unit file to send debug logs to journald. I
suspect we'll want to discuss this before we make it the default. This
patch DOES change the default for sss_log messages to use
sd_journal_send() instead of straight log() for those messages that we
traditionally sent to the syslog (such as login events). This is code
that has been in place for some time now, but has not been the default
because we hadn't build with --with-syslog=journald.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlK0v0QACgkQeiVVYja6o6NwxgCfWnU4IbYyJPXxPe83zWjjsCHt
cG8AnitRgM9CAUjHM2ofYg3TgcUxCyCC
=Fara
-----END PGP SIGNATURE-----
9 years, 5 months
Problems with using NULL in infopipe&dbus code.
by Lukas Slebodnik
ehlo,
there is a bunch of error reported from static analysers
Dereferencing a pointer that might be null "error" when calling
"sbus_request_fail_and_finish"
similar problem is with dereferencing NULL pointer in function
sbus_request_invoke_or_finish.
These situation can happen mostly with handling errors.
LS
=============================================================
sbus_request_fail_and_finish
=============================================================
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:355: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:355: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownInterface", "No such interface")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:194: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:194: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid argument types passed to Set method")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:208: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:208: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownInterface", "No such interface")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: FORWARD_NULL
sssd-1.11.92/src/responder/ifp/ifp_components.c:676: var_deref_model: Passing "NULL" to "sbus_request_fail_and_finish", which dereferences it.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: FORWARD_NULL
sssd-1.11.92/src/responder/ifp/ifp_components.c:592: var_deref_model: Passing "NULL" to "sbus_request_fail_and_finish", which dereferences it.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: FORWARD_NULL
sssd-1.11.92/src/responder/ifp/ifp_components.c:521: var_deref_model: Passing "NULL" to "sbus_request_fail_and_finish", which dereferences it.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: FORWARD_NULL
sssd-1.11.92/src/responder/ifp/ifp_components.c:451: var_deref_model: Passing "NULL" to "sbus_request_fail_and_finish", which dereferences it.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: FORWARD_NULL
sssd-1.11.92/src/responder/ifp/ifp_components.c:421: var_deref_model: Passing "NULL" to "sbus_request_fail_and_finish", which dereferences it.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:678: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:678: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:679: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:714: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:714: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:715: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:596: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:596: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:597: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:525: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:525: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:526: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:443: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:443: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:445: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:454: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:454: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:456: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:398: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:398: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:400: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:354: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:354: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:356: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:165: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:165: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:167: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:172: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:172: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:174: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:207: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:207: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:209: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:215: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:215: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:217: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:231: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:231: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:233: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:59: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:59: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:61: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:66: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:66: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:68: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:97: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:97: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:99: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_domains.c:105: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_domains.c:105: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_domains.c:107: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:152: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:152: dereference: Dereferencing a pointer that might be null "sbus_error_new(attr_req->ireq->dbus_req, "org.freedesktop.DBus.Error.Failed", "No such user\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:158: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:158: dereference: Dereferencing a pointer that might be null "sbus_error_new(attr_req->ireq->dbus_req, "org.freedesktop.DBus.Error.Failed", "Failed to read user attribute\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:168: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:168: dereference: Dereferencing a pointer that might be null "sbus_error_new(attr_req->ireq->dbus_req, "org.freedesktop.DBus.Error.Failed", "Failed to build a reply\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:302: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:302: dereference: Dereferencing a pointer that might be null "sbus_error_new(group_req->ireq->dbus_req, "org.freedesktop.DBus.Error.Failed", "No such user\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:308: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:308: dereference: Dereferencing a pointer that might be null "sbus_error_new(group_req->ireq->dbus_req, "org.freedesktop.DBus.Error.Failed", "Failed to read attribute\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:317: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_cmd.c:317: dereference: Dereferencing a pointer that might be null "sbus_error_new(group_req->ireq->dbus_req, "org.freedesktop.DBus.Error.Failed", "Failed to build a reply\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:240: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:240: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not open variant for [%s]\n", variant_type)" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:254: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:254: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not open array for [%s]\n", array_type)" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:268: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:268: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not append [%s] to variant\n", array_type)" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:281: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:281: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not close array\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:293: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:293: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not close variant\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:152: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:152: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not open variant for [%s]\n", strtype)" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:164: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:164: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not append [%s] to variant\n", strtype)" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_request.c:178: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:178: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Could not close variant\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_util.c:87: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_util.c:87: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.AccessDenied", "User %li not in ACL\n", dbus_req->client)" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifpsrv_util.c:94: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifpsrv_util.c:94: dereference: Dereferencing a pointer that might be null "sbus_error_new(dbus_req, "org.freedesktop.DBus.Error.Failed", "Cannot create IFP request\n")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:276: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:276: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid argument types passed to Get method")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:288: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:288: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownInterface", "No such interface")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:296: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:296: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownProperty", "No such property")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:303: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:303: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.AccessDenied", "Property is not readable")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:311: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:311: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.NotSupported", "Not implemented")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:344: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:344: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid argument types passed to GetAll method")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:355: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:355: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownInterface", "No such interface")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:194: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:194: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid argument types passed to Set method")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:208: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:208: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownInterface", "No such interface")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:216: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:216: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.UnknownProperty", "No such property")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:223: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:223: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.PropertyReadOnly", "Property is not writable")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:232: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:232: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid data type for property")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:240: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:240: dereference: Dereferencing a pointer that might be null "sbus_error_new(req, "org.freedesktop.DBus.Error.NotSupported", "Not implemented")" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/sbus/sssd_dbus_connection.c:477: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/sbus/sssd_dbus_connection.c:477: var_assigned: Assigning: "dberr" = null return value from "sbus_error_new".
sssd-1.11.92/src/sbus/sssd_dbus_connection.c:481: dereference: Dereferencing a pointer that might be null "dberr" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
Error: NULL_RETURNS
sssd-1.11.92/src/responder/ifp/ifp_components.c:371: returned_null: "sbus_error_new" returns null.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:338:24: return_null: Explicitly returning null.
sssd-1.11.92/src/responder/ifp/ifp_components.c:371: var_assigned: Assigning: "error" = null return value from "sbus_error_new".
sssd-1.11.92/src/responder/ifp/ifp_components.c:373: dereference: Dereferencing a pointer that might be null "error" when calling "sbus_request_fail_and_finish".
sssd-1.11.92/src/sbus/sssd_dbus_request.c:316:5: deref_parm: Directly dereferencing parameter "error".
=============================================================
sbus_request_invoke_or_finish
=============================================================
Error: FORWARD_NULL
sssd-1.11.92/src/sbus/sssd_dbus_properties.c:361: var_deref_model: Passing "NULL" to "sbus_request_invoke_or_finish", which dereferences it.
sssd-1.11.92/src/sbus/sssd_dbus_request.c:69:9: deref_parm: Directly dereferencing parameter "handler_fn".
9 years, 5 months
[PATCH] LDAP: Try all attributes when saving an entry
by Jakub Hrozek
Hi,
this bug was reported on #sssd by a user. He was running some flavor of
IBM Tivoli where the entries only had an "ID", not separate "UID" and
"GID". But due to a bug in sssd he couldn't use the same value for both,
this configuration:
ldap_user_uid_number = idAttribute
ldap_user_gid_number = idAttribute
only saved the ID into UID and left GID empty. It appears we have a long
standing bug in sdap_parse where we only consider first match. If this
patch is accepted, I would also like to refactor sdap_parse in master
because currently it is a 250-lines long function with multiple
branches..
9 years, 5 months
[PATCH] UTIL: Fix access out of bound in parse_args
by Lukas Slebodnik
ehlo,
While parsing string with multiple whitespaces, it may happen variable i is
zero and we want to test end of argument "tmp[i-1] != '\0'". Side effect of
this bug is duplicite string output array.
Input string: "foo b"
Expected output: { "foo", "a", NULL }
Output: { "foo", "foo", "a", NULL }
This patch uses inverted logic. Instead of testing whether to read next char or
skip multiple whitespaces, we will test whether we have new argument which
should be stored in output array.
How to test?
libtool --mode=execute valgrind ./util-tests
Running suite(s): util
==17839== Invalid read of size 1
==17839== at 0x4E60329: parse_args (util.c:208)
==17839== by 0x403A04: test_parse_args (util-tests.c:166)
==17839== by 0x4C2F139: tcase_run_tfun_nofork.isra.11 (check_run.c:327)
==17839== by 0x4C2F3C5: srunner_run (check_run.c:187)
==17839== by 0x4057ED: main (util-tests.c:1090)
==17839== Address 0x62f709f is 1 bytes before a block of size 7 alloc'd
==17839== at 0x4A0645D: malloc (vg_replace_malloc.c:291)
==17839== by 0x4E6020E: parse_args (util.c:149)
==17839== by 0x403A04: test_parse_args (util-tests.c:166)
==17839== by 0x4C2F139: tcase_run_tfun_nofork.isra.11 (check_run.c:327)
==17839== by 0x4C2F3C5: srunner_run (check_run.c:187)
==17839== by 0x4057ED: main (util-tests.c:1090)
==17839==
This problem was also reported by clang static analysers.
We thought it was false positive. Unfortunately, it wasn't.
LS
9 years, 5 months
[PATCH] Improvements to nested LDAP unit tests
by Jakub Hrozek
Hi,
When I was reviewing PavelB's duplicate members patch, I realized our
nested group unit tests could use some improvements. Please see the
attached patches and their commit messages.
9 years, 5 months
SSSD] [PATCH] AD: Add support for gpo permissive mode
by Yassir Elley
Hi,
The attached patch adds support for gpo permissive mode. Specifically, if the ad_gpo_access_control option is set to "permissive" (which it is by default), and the gpo-based access control evaluation indicates that the user is denied access, then a syslog message is emitted indicating that the user would have been denied logon access if the option were set to "enforcing".
In order to simplify sending syslog messages to the security log (with or without journald), I have introduced a generic sss_log_ext function, which can be used with any syslog facility (including our standard "LOG_DAEMON" facility, as well as the security log "LOG_AUTHPRIV" facility).
This patch depends on a previously submitted patch ("Add initial gpo-smb implementation"), which has not yet been pushed to master.
Regards,
Yassir.
9 years, 5 months
[PATCH] AD: Add initial gpo-smb implementation.
by Yassir Elley
Hi,
The attached patch adds an initial gpo-smb implementation. It uses SMB to retrieve HBAC policy files, evaluate them, and enforce the whitelists and blacklists found in those policy files. This is an initial implementation and there are a few things that I am planning on implementing, but are not part of this patch.
This patch does not implement:
* the "permissive" mode, in which the policy files are evaluated, but not enforced
* a separate gpo_child process to make the blocking libsmbclient calls
* use of a cache
* few other things
As such, most of this patch will be moved to a separate gpo_child process in a subsequent patch.
Also note that some (but not all) of the changes that were pushed to master as part of my patch titled "add libsmbclient to makefiles" seem to have been deleted by subsequent pushes to master. As such, this patch reintroduces those changes (which only affect configure.ac and libsmbclient.m4).
Regards,
Yassir.
9 years, 5 months