47ad0778be72994a2294b2e73cc5c670be6811a7 |
|
04-Apr-2018 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap: do not store rules without sudoHost attribute
Unless it is cn=defaults.
Resolves:
https://pagure.io/SSSD/sssd/issue/3558
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
2ee201dcf6bbe52abbbed3c2fc4c35ca2e0c8a43 |
|
31-Oct-2017 |
Pavel Březina <pbrezina@redhat.com> |
sudo: always use srv_opts from id context
Prior this patch, we remember id_ctx->srv_opts in sudo request to switch
the latest usn values. This works fine most of the time but it may cause
a crash.
If we have two concurrent sudo refresh and one of these fails, it causes
failover to try the next server and possibly replacing the old srv_opts
with new one and it causes an access after free in the other refresh.
Resolves:
https://pagure.io/SSSD/sssd/issue/3562
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
a02a5ed51178b2cbede0396d66aed716b8898096 |
|
25-Oct-2017 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes
Merges: https://pagure.io/SSSD/sssd/pull-request/3556
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
bd769a08d18c791a18e913cf92f7f1651f56d3ff |
|
07-Jul-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Qualify user and group names when saving the sudo users
If the sudoUser values we fetch from LDAP correspond to a user or a
group name per:
http://www.sudo.ws/man/1.8.14/sudoers.ldap.man.html
then we parse the usernames into (name,domain) tuples and store them
qualified.
This patch not only makes the sudo provider work with qualified names,
but also makes it possible to use qualified names on the LDAP side,
allowing for example AD users from different domains to access sudo
rules.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
cc2d77d5218c188119fa954c856e858cbde76947 |
|
20-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
Rename dp_backend.h to backend.h
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
cad751beaa12e34e15565bc413442b1e80ac0c29 |
|
19-Jan-2016 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: fail on failed request that cannot be retry
Reviewed-by: Sumit Bose <sbose@redhat.com> |
85feb8d77a2c832787880944e02104846c4d5376 |
|
19-Jan-2016 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: move code shared between ldap and ipa to separate module
Reviewed-by: Sumit Bose <sbose@redhat.com> |
68abbe716bed7c8d6790d9bec168ef44469306a1 |
|
19-Jan-2016 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: make sudo sysdb interface more reusable
Reviewed-by: Sumit Bose <sbose@redhat.com> |
e9ae5cd285dcc8fa232e16f9c7a29f18537272f2 |
|
19-Jan-2016 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: use sdap_search_bases instead custom sb iterator
Removes code duplication.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
92ec40e6aa25f75903ffdb166a8ec56b67bfd77d |
|
19-Jan-2016 |
Pavel Březina <pbrezina@redhat.com> |
SDAP: rename sdap_get_id_specific_filter
More generic name is used now since it is not used only for id
filters. Probably all references will be deleted when the code
uses sdap_search_in_bases istead of custom search base iterators.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
6b83f562fbd67cf61a7167c6057764fd08146241 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: get srv_opts after we are connected
It may be NULL in _send if SSSD has not been connected to LDAP so far.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
15ebeedaad83cc5dcf896cfcdea850227fdc46b5 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: use size_t instead of int in for cycles
So we compare proper data types.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
cb235ec146f1ba81c211f8506736edea436be28a |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: obtain host information when going online
Resolves:
https://fedorahosted.org/sssd/ticket/2672
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
c0000a8cc9eccdf5cd8dd72fd6e9bc09d8c7cf00 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: do not imitate full refresh if usn is unknown in smart refresh
USN value should be always known now if at least one full refresh
was successful.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
1ab2b07c71da6c19c3855e390d10156d598c06a2 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: built host filter inside sdap_sudo_refresh request
Preparation for:
https://fedorahosted.org/sssd/ticket/2672
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
a00c89f23bd50d4fd9cf24aa09037c997781b8c9 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: set USN inside sdap_sudo_refresh request
Reduce code duplication.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
d103c2e4a704b1dfffd39fea2b601c2f337d06d5 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: sdap_sudo_load_sudoers improve iterator
The old search base iterator was difficult to read since its logic
spread through all functions. This patch also shorten names.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
24eac34a8c1f0a284cb697e8d5c09ff049181691 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: fix tevent style
Rearrage and rename functions in sdap_async_sudo.c to obey
tevent style and improve readability.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
7e0158f9fdb1d299ab2d018e9d81cc71eed98c15 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: fix sdap_id_op logic
Adds missing sdap_id_op_done call and retry logic.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
fc19031212369d69a9693ac8777ce1e61a16fe93 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: simplify error handling
This patch removes state->error and uses only ret instead since
state->error was only duplication anyway.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
81f135f9e83031c4a021a3d19009b2bc179c8468 |
|
15-Dec-2015 |
Pavel Březina <pbrezina@redhat.com> |
SUDO: move offline check to handler
We let sdap_id_op decide if we are offline or not here but we
should not get to this code since ptask is disabled and we will
not get through sudo handler if offline.
This simplyfies the code and make it more similar to other providers.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
a3c8390d19593b1e5277d95bfb4ab206d4785150 |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Make DEBUG macro invocations variadic
Use a script to update DEBUG macro invocations to use it as a variadic
macro, supplying format string and its arguments directly, instead of
wrapping them in parens.
This script was used to update the code:
grep -rwl --include '*.[hc]' DEBUG . |
while read f; do
mv "$f"{,.orig}
perl -e \
'use strict;
use File::Slurp;
my $text=read_file(\*STDIN);
$text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs;
print $text;' < "$f.orig" > "$f"
rm "$f.orig"
done
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
6a31a971a376a992afb838fe60b311360c970267 |
|
15-Nov-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
SYSDB: Drop the sysdb_ctx parameter from the sysdb_sudo.c module |
0e65abe5cf2abf5d4b431cf6bd161b419f07901d |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: size_t |
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d |
|
07-Jun-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: new SDAP domain structure
Previously an sdap_id_ctx was always tied to one domain with a single
set of search bases. But with the introduction of Global Catalog
lookups, primary domain and subdomains might have different search
bases.
This patch introduces a new structure sdap_domain that contains an sssd
domain or subdomain and a set of search bases. With this patch, there is
only one sdap_domain that describes the primary domain. |
df0596ec12bc5091608371e2977f3111241e8caf |
|
21-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Remove sysdb as a be context structure member
The sysdb context is already available through the 'domain' structure. |
b0fa48b0d612b46a86e45f8e4b5d9feae9784c2b |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain arguments to sysdb sudo functions |
9675bccabff4e79d224f64611ad9ff3e073b488e |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Make sysdb_custom_subtree_dn() require a domain. |
55b8413d20d15f342a5c08a3077ca22028fd1a0d |
|
07-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Fix tevent_req style for sdap_async_sudo.
Use correct name for _done() function from the caller.
Remove unneded initializzations to NULL for a lot of variables hat are going to
be assigned as the first thing done in the functions. |
fc647b8eb5bca901658dedf3dbda2f35c63a86f2 |
|
02-Jan-2013 |
Pavel Březina <pbrezina@redhat.com> |
set ret to EOK after for loop in sdap_sudo_purge_sudoers
If we are unable to delete some rule from cache we print a debug
message and ignore the error. Thus we should set ret to EOK after
the for loop otherwise we return whether the last rule was deleted
successfully or not.
This also removes compilation warning that ret may be used
uninitialized (when we don't go inside the loop at all). |
21d485184df986e1a123f70c689517386e51a5ce |
|
23-Aug-2012 |
Michal Zidek <mzidek@redhat.com> |
Unify usage of sysdb transactions
Removing bad examples of usage of sysdb_transaction_start/commit/end
functions and making it more consistent (all files except of
src/db/sysdb_*.c). |
8bbf89c5ab798c112773fe23515c3a9df56dde71 |
|
18-Jul-2012 |
Nick Guay <nguay@redhat.com> |
Fix uninitialized values
https://fedorahosted.org/sssd/ticket/1379 |
4684d427e7e10642ceff62128c3d22db87872c4c |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: return number of downloaded rules in sdap_sudo_refresh_recv() |
6ea68b049dd507409d454100978ee125febc69ea |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: when sysdb filter is NULL remove downloaded rules |
f143937efc6cbb1eb84042979c83dd5b3f23a40c |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: find highest USN |
80357fbba7e8251c85aa884749f275eed28eb4eb |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: add expiration time to each rule |
4cab4191f9e0d8d2cc04084964c71454a62852fe |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: add domain info in sdap_sudo_refresh_state |
2b5b66499301dab74d2a96c3ecd1f3959de8392d |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: add sysdb ctx in sdap_sudo_refresh_state |
751a7930d5af7c1a3c36936e3c5b9205189c6b92 |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: give sdap_sudo_refresh_send() search and purge filters |
0ca19d792b717456f334abdf35279acddf6d71c2 |
|
29-Jun-2012 |
Pavel Březina <pbrezina@redhat.com> |
sudo ldap provider: move async routines to sdap_async_sudo.c |