6b9c38df5712b951e31800efea2df0802e333e08 |
|
07-Feb-2018 |
Michal Židek <mzidek@redhat.com> |
util: Add sss_ prefix to some functions
Add sss_ prefix to del_seuser and set_seuser for consistency
with sss_get_seuser. Also sss_ prefix makes it clear that
these functions come from SSSD.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Resolves:
https://pagure.io/SSSD/sssd/issue/3618 |
450b472a68abf442479755c7916c757907b35ea5 |
|
07-Feb-2018 |
Michal Židek <mzidek@redhat.com> |
SELINUX: Check if SELinux is managed in selinux_child
If SELinux policy is not managed at all, don't call any SELinux user
handling functions and instead return that no update is needed.
Pair-Programmed-With: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Resolves:
https://pagure.io/SSSD/sssd/issue/3618 |
cfe87ca0c4fded9cbf907697d08fa0e6c8f8ebce |
|
06-Sep-2017 |
Justin Stephenson <jstephen@redhat.com> |
SELINUX: Use getseuserbyname to get IPA seuser
The libselinux function getseuserbyname is more reliable method to retrieve
SELinux usernames then functions from libsemanage `semanage_user_query`
and is recommended by libsemanage developers.
Replace get_seuser function with getseuserbyname.
Resolves:
https://pagure.io/SSSD/sssd/issue/3308
Reviewed-by: Michal Židek <mzidek@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Petr Lautrbach <plautrba@redhat.com> |
78a08d30b5fbf6e1e3b589e0cf67022e0c1faa33 |
|
06-Apr-2017 |
Michal Židek <mzidek@redhat.com> |
selinux: Do not fail if SELinux is not managed
Previously we failed if semanage_is_managed returned 0 or -1 (not
managed or error). With this patch we only fail in case of error and
continue normally if selinux is not managed by libsemanage at all.
Resolves:
https://fedorahosted.org/sssd/ticket/3297
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
a6d279489c35896432e60daa70be5728f0b6c243 |
|
01-Sep-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
DEBUG: Apend line feed to messages from libsemanage
It wasn't simple to read log files from libsemanage
because they were on single line.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
c02b8482375837b57cb618ed56d4bede0e006d9d |
|
18-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
Remove braces from DEBUG statements
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
7c30eade4ae794ed809845f2ef70dda849b6e7c9 |
|
23-Mar-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Allow to append new line in sss_vdebug_fn
libldb is not consistent with appending line feed
in debug messages. AS a result of this two messages can be on the same line
in sssd log files. Which makes analyzing log files more difficult.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
f6c1f6a561bdd5b4bba03c02988a724da3dad387 |
|
23-Feb-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Use sss_vdebug_fn for callbacks
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
2a44a8c6683cfea218ee5329bcfad953dfeb6746 |
|
23-Feb-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Use prefix for debug function
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
589a8760b38d9e2dfa278764af12d59e1487fe07 |
|
11-May-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
SELINUX: Avoid disconnecting disconnected handle
Resolves:
https://fedorahosted.org/sssd/ticket/2649
libsemanage is very strict about its API usage and actually doesn't
allow disconnecting a handle that is not connected. The unpatched code
would fail with:
selinux_child: handle.c:231: semanage_disconnect: Assertion `sh !=
((void *)0) && sh->funcs != ((void *)0) && sh->funcs->disconnect !=
((void *)0)' failed.
If semanage_connect() failed.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
1e0fa55fb377db788e065de917ba8e149eb56161 |
|
14-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
selinux: Only call semanage if the context actually changes
https://fedorahosted.org/sssd/ticket/2624
Add a function to query the libsemanage database for a user context and
only update the database if the context differes from the one set on the
server.
Adds talloc dependency to libsss_semanage.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
748b38a7991d78cbf4726f2a14ace5e926629a54 |
|
14-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
selinux: Begin and end the transaction on the same nesting level
Transaction should be started and commited on the same code nesting or
abstraction level. Also, transactions are really costly with libselinux
and splitting them from initialization will make init function reusable
by read-only libsemanage functions.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
aa00d67b2a8e07c9080e7798defdc6c774c93465 |
|
14-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
selinux: Disconnect before closing the handle
libsemanage documentation says:
~~~~
be sure that a semanage_disconnect() was previously called if the handle
was connected.
~~~~
Otherwise we get a memory leak.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
87f8bee53ee1b4ca87b602ff8536bc5fd5b5b595 |
|
17-Mar-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
Add missing new lines to debug messages
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
180c7a75ee8507d459c7de21882dc714c59c3cc9 |
|
20-Oct-2014 |
Michal Zidek <mzidek@redhat.com> |
sss_semanage: Add mlsrange parameter to set_seuser
mlsrange parameter will be needed in IPA provider
and probably at some point in the tools as well.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
42ec8af02ecf1937e4db9b1ecc6216022634f0f9 |
|
20-Oct-2014 |
Michal Zidek <mzidek@redhat.com> |
util: Move semanage related functions to src/util
These functions will be reused by IPA provider.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |