2f7006567bebe766e5c12f18fb15c3909c83a4f4 |
|
27-Apr-2018 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Make use of sss_client_fd_handler()
Let's make use of the sss_client_fd_handler() on client_fd_handler().
Resolves:
https://pagure.io/SSSD/sssd/issue/3633
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
26592d1aa9395c9a851d8657b4c2bb53d2cc1384 |
|
27-Apr-2018 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Add sss_client_fd_handler()
Currently we have 3 functions to handle client fds:
- sec_fd_handler(): for secrets responder
- kcm_fd_handler(): for kcm responder
- client_fd_handler(): for all the others reponders
As those functions only differ by the functions used to handle sending
and receiving data to the fds, let's create a generic function that
receives the specific send_fn() and recv_fn() functions.
With this newly introduced function we'll be able to simply remove
duplicated code from those 3 handlers and just call
sss_client_fd_handler() from all of those.
Resolves:
https://pagure.io/SSSD/sssd/issue/3633
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
677a31351c80453d9ce006481364399a96312052 |
|
29-Jan-2018 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes in responder/*
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
06e741a9bf23a18a998f366d9a8990b887a01638 |
|
30-Nov-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
responder: Fix talloc hierarchy in sized_output_name
sized_output_name was a called with NULL context in
memcache_delete_entry but returned data from sized_output_name
didn't have proper talloc hierarchy and we could not release all
all returned data.
==00:01:01:29.871 10088== 934,414 bytes in 8,731 blocks are definitely lost in loss record 121 of 121
==00:01:01:29.871 10088== at 0x4C29BE3: malloc (vg_replace_malloc.c:299)
==00:01:01:29.871 10088== by 0x8FF4EAB: talloc_strdup (in /usr/lib64/libtalloc.so.2.1.9)
==00:01:01:29.871 10088== by 0x52933B9: sss_output_name (usertools.c:808)
==00:01:01:29.871 10088== by 0x5293550: sss_output_fqname (usertools.c:863)
==00:01:01:29.871 10088== by 0x1211F9: sized_output_name (responder_common.c:1708)
==00:01:01:29.871 10088== by 0x1137E6: memcache_delete_entry (nss_get_object.c:112)
==00:01:01:29.871 10088== by 0x113BB6: nss_get_object_done (nss_get_object.c:245)
==00:01:01:29.871 10088== by 0x8DE5291: _tevent_req_error (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x1276CE: cache_req_done (cache_req.c:1047)
==00:01:01:29.871 10088== by 0x8DE5291: _tevent_req_error (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x126AF6: cache_req_search_domains_done (cache_req.c:607)
==00:01:01:29.871 10088== by 0x8DE4AB9: tevent_common_loop_immediate (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x8DE9C9C: ??? (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x8DE82A6: ??? (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x8DE40CC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x8DE42FA: tevent_common_loop_wait (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x8DE8246: ??? (in /usr/lib64/libtevent.so.0.9.31)
==00:01:01:29.871 10088== by 0x5291B32: server_loop (server.c:718)
==00:01:01:29.871 10088== by 0x11004C: main (nsssrv.c:560)
Resolves:
https://pagure.io/SSSD/sssd/issue/3588
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
29dd456102dc995aa59a56483363087071bb84d6 |
|
27-Jul-2017 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
RESPONDER: Add session recording conf loading
Add session recording configuration loading to the common responder
initialization. To be used for substituting the user shell when
session recording is enabled.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
c31065ecc0793e836066035d0c692b050b5f6f55 |
|
27-Jul-2017 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
NSS: Move shell options to common responder
Move all the shell-related options from the NSS responder context to the
common responder context, so they can be used by other responders for
retrieving original user shell, when it is overrided for session
recording.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
422217c7ea5fbe94b386c93c19e2c1928151faa0 |
|
21-Jul-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDERS: Fix terminating idle connections
The client_idle_handler() function tried to schedule another tevent
timer to check for idle client connections in case the current
connection was still valid, but in doing so, it also stored the current
time into the last_request_time field of the client context.
This kept the connection always alive, because the last_request_time
could then never be older than the timeout.
This patch changes the setup_client_idle_timer() function to only do
what the synopsis says and set the idle timer. The caller (usually the
function that accepts the connection) is supposed to store the request
time itself.
Resolves:
https://pagure.io/SSSD/sssd/issue/3448
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
8890a30f5d054187fd7d5b50503f82a49cd025f0 |
|
08-Jun-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Remove fcntl.h from util/util.h
fcntl.h is not used directly by util/util.h. The header file fcntl.h
must be included in 49 files and after removing it from util.h it had to be
added only to 7 missing file which were using either directly syscall fcntl
or syscall open.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
a012a71f21bf1a4687e58085f19c18cc5b2bbadd |
|
10-May-2017 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
NSS: Move output name formatting to utils
Move NSS nss_get_name_from_msg and the core of sized_output_name to the
utils to make them available to provider and other responders.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
213048fd9a5e800deb74cb5b7f0eaf465945c640 |
|
26-Apr-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER_COMMON: Improve domaiN_resolution_order debug messages
Indicate whether a domain_resolution_order has been used and where
it came from.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
a3faad0e4dc1ca4473746c3822ecfc5aed876e6d |
|
26-Apr-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Fallback to global domain resolution order in case the view doesn't have this option set
The current code has been ignoring the domain resolution order set
globally on IPA in case there's a view but this doesn't have any domain
resolution order set.
It happens because we haven't been checking whether the view attribute
didn't exist and then we ended up populating the list cache_req domains'
list assuming that no order has been set instead of falling back to the
next preferred method.
Related:
https://pagure.io/SSSD/sssd/issue/3001
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
7c074ba2f923985ab0d4f9d6a5e01ff3f2f0a7a8 |
|
21-Apr-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
Move sized_output_name() and sized_domain_name() into responder common code
These functions are used to format a name into a format that the user
configured for output, including case sensitiveness, replacing
whitespace and qualified format. They were used only in the NSS
responder, which typically returns strings to the NSS client library and
then the user.
But it makes sense to just reuse the same code in the IFP responder as
well, since it does essentially the same job.
The patch also renames sized_member_name to sized_domain_name.
Previously, the function was only used to format a group member, the IFP
responder would use the same function to format a group the user is a
member of.
Related to:
https://pagure.io/SSSD/sssd/issue/3268
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
05c2c3047912fca1c1a35ab1c8d3157b05383495 |
|
03-Apr-2017 |
Pavel Březina <pbrezina@redhat.com> |
responders: do not leak selinux context on clients destruction
The SELinux context created in get_client_cred is not talloc bound and
we were leaking it if available with each client's destruction.
Resolves:
https://pagure.io/SSSD/sssd/issue/3360
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
16385568547351b5d2c562f3081f35f3341f695b |
|
29-Mar-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
Add domain_resolution_order config option
This is the local equivalent of option of ipaDomainResolutionOrder and
has precedence over the ones set on IPA side making the precedence order
to be like: Local > View > Globally.
As done for the IPA side configurations, the domains which were not
explicitly set up will be apennded to the final of the
domain_resolution_order list in the very same order they're presented in
the "domains" option of [sssd] section in the config file. There's no
guarantee of order for the subdomains though.
It's also important to mention that no expansion magic is performed on
our side. It means that if 'example.com' is set it does *not* stand for
all its subdomains DNS wise (like 'foo.example.com', 'bar.example.com',
etc).
Related:
https://pagure.io/SSSD/sssd/issue/3001
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
66c8e92eb5a4985bb7f64c349a53b08030a000cf |
|
29-Mar-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
CACHE_REQ: Make use of domainResolutionOrder
domainResolutionOrder has been introduced in the previous commits and
allows the admin to set up a specific order which the domains will be
resolved during a lookup and with this patch we can take advantage of
this.
In order to have it working a new structure has been added
(struct domain_resolution_order) to the responder context and will be
used by the cache_req to perform the lookups based on this list.
As the ipaDomainResolutionOrder may be set globally on IPA or per View,
SSSD does respect the following precedence order: View > Globally.
The way the list is built is quite simple, basically having the domains
present on ipaDomainResolutionOrder as the first domains (in that
specific order) and then appending the remaining domains to this list.
The final result is a completely flat list with all the domains
respecting the specified order (it's important to remember that the
domains not specified won't follow any specific order, they're just
"random" based on the domains list present in the responder context.
Related:
https://pagure.io/SSSD/sssd/issue/3001
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
8bb6680637ead03e24a38d15ec5265d11a920a1d |
|
14-Mar-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
CACHE_REQ: Check the caches first
This patch introduces a new configurable option to define whether the
responder should query all domains' caches before querying the Data
Providers.
This new option is called cache_first and, by default, it's disabled,
meaning that, for each provider, the responder may contact the cache and
the data provider in the same iteration.
Co-Author: Pavel Březina <pbrezina@redhat.com>
Related:
https://pagure.io/SSSD/sssd/issue/3001
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
ef268f9e691b0953763fad7e66f0724bed9b3419 |
|
08-Mar-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Wrap up the code to setup the idle timeout
As secrets responder will make use of this very same code in the future,
let's wrap it up into a new function in order to avoid code duplication.
Related:
https://pagure.io/SSSD/sssd/issue/3316
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
c109f063b4469818fd335b8b509f0458e7b33b0a |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDER: Add a responder sbus interface to set domain state
Adds a generic responder s-bus interface that all responders implement.
The interface currently contains methods that make it possible for a sssd
domain to be marked as active or inconsistent by a back end.
In the future, this commit will be superseded by sbus signals.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
560daa14ef013aa14e2aedeea10b07f623d84ec8 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Change how client timeout is calculated
Taking Pavel Březina's suggestion, let's avoid always re-creating the
idle timer and go for a simpler and not so precise approach where we
store the time of the last operation done and then have a simple
periodic timer that fires each "client_idle_time/2" and there it checks
whether the "current time - last request time > client_idle_time".
As said, it won't be as precise as the way done currently but it will
save us lots of memory operations.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
151a6de4793e0045a7085d4d72b975947662e566 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Shutdown {dbus,socket}-activated responders in case they're idle
This commit introduces a new option for the responders called
responder_idle_timeout, which specifies the number of seconds that the
responder process can be up without being used. The default value is
300 seconds (5 minutes) and can be configured per responder, being 60
seconds the minimum acceptable value.
Is important to note that setting "responder_idle_timeout = 0" disables
the responder timeout, which makes sense for the responders that always
will be running.
The shutdown timeout is activated per responder in case the responder
has been {dbus,socket}-activated. In case of any commnunication with the
responder the timeout is reset thereby ensuring we won't shutdown a
responder that is not idle.
Setting the responder's last request time is done slightly differently
for socket-activated and dbus-activated responders. In both cases it's
updated in any internal communication in sbus_message_handler(), but
for the socket-activated responders it's also updated when the
responder's socket is used.
Currently it works properly with all responders but the secrets one,
which has a different logic and must be treated separately in case some
change is required there.
Is worth to mention that this commit does not affect the responders
explicitly configured in the "services" line of sssd.conf.
Related:
https://fedorahosted.org/sssd/ticket/3245
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
32c76642250b3ba3b173d0576c0d00b0190320a9 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Don't expose client_idle_handler()
It's been only used by reset_client_idle_handler(). So, no need to
expose this function.
Related:
https://fedorahosted.org/sssd/ticket/3245
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
386c7340dae9af9c0bf8b26cfaf9e207138cb7be |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Make clear {reset_,}idle_timer() are related to client
Those public functions dealing with idle_timer are related to the
client's timeout. Let's make it explicit as we will introduce more
timeout handlers (this time, related to the responder itself).
Related:
https://fedorahosted.org/sssd/ticket/3245
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
b46c4c0d3e364636af1b42683cd3229ffa0b77cb |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
SBUS: Add a time_t pointer to the sbus_connection
The idea of this commit is to provide a way to update the time of the
last request coming from/going to the responders through sbus.
For now it's not used anywhere as all the functions that will pass their
time_t to the sbus_connection are currently passing NULL. It will be
used by follow-up patches.
Related:
https://fedorahosted.org/sssd/ticket/3245
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
b1829f05cf9bdc3d89c1058481281198ebc968d0 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDER: Make responders' common code ready for socket activation
Instead of simply setting the unix socket during the process
initialization, let's make it socket-activatable. It's the first step in
order to have socket-activated responders and doesn't introduce any kind
of regression with the current code.
Also, we must avoid setting the responders fds to -1 in all cases as it
may have cause the socket to be unreachable in case the administrator
decides to move back from socket-activation to using the services line
in sssd.conf. With this change, the responders will have to activelly
set their sockets fd to -1 before calling activate_unix_sockets(), which
is already done everyone but in Secrets and in one piece of PAM
responder.
Related:
https://fedorahosted.org/sssd/ticket/2243
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
9e59f73f81612f60c02ec7c23e14db9cebb28e29 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
UTIL: Introduce --dbus-activated cmd option for responders
Similarly to the --socket-activated cmd option, --dbus-activated cmd
option is going to be used for dbus-activated responders in order to
easily setup a timeout to shutdown the idle responder in case it has
been socket activated and is idle.
This option has been encapsulated on is_dbus_activated() function,
which will always return "false" when called on platforms where systemd
is not supported.
For now any of the services are taking advantage of this newly
introduced option/function, but later on in this series it's going to be
used.
In order to use it, just add SSSD_RESPONDER_OPTS to the poptOption
structure.
Related:
https://fedorahosted.org/sssd/ticket/2243
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
41e9e8b60e3bed0159914e755aa05df9a2448470 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
UTIL: Introduce --socket-activated cmdline option for responders
This option is going to be used for socket-activated responders as they
are special in some ways. So, by knowing this option we can:
- skip owning the debug files as it will be done by the responders' unit
files;
- skip "become_user()", as the process will already be started by the
proper user bu the responders' unit files;
- setup a timeout to shutdown the responder in case it has been
socket-activated and is idle.
This option has been encapsulated on is_socket_activated() function,
which will always return "false" when called on platforms where systemd
is not supported.
For any of the services are taking advantage of this newly introduced
option/function, but later on in this series it's going to be used.
In order to use it, just add SSSD_RESPONDER_OPTS to the poptOption
structure.
Related:
https://fedorahosted.org/sssd/ticket/2243
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
eaff953c64678b93e4242b715d2cee47e59f86aa |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
MONITOR: Pass the service type to the RegisterService method
Passing the service type to the RegisterService method will help us in
the future, for socket-activation, as we will need to differentiate
cases where the service being registered is still not in the services'
list but is a valid case and has to be added there as it was
socket-activated.
Related:
https://fedorahosted.org/sssd/ticket/2243
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
a22b0af1993a489c9c0e66fdc1083f43b410d12c |
|
19-Dec-2016 |
Pavel Březina <pbrezina@redhat.com> |
nss: move nss_ctx->global_names to rctx
Global names context is used to parse AD well known SIDs and names
into its opposite. This patch moves definition of this parameter
from nss responder into common responder context so it can be
used also by other responders.
This change will be use to enable looking up well known SIDs and
names directly in cache_req.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
3d5bf48ac5b8b807facbfda225cdebff2f685cb8 |
|
08-Dec-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
RESPONDER: Remove dead assignment to the variable ret
Reviewed-by: Michal Židek <mzidek@redhat.com> |
04e870d99e72aa3160bdb6ab05d986fb4005c3ed |
|
16-Aug-2016 |
Pavel Březina <pbrezina@redhat.com> |
DP: Remove old data provider interface
Reverse data provider interface is moved to a better location in
NSS responder. All responders now can have an sbus interface
defined per data provider connection. The unused old data provider
interface is removed.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
ba3c902014ac0b04ec761296fdb1c3ede747a5f2 |
|
04-Aug-2016 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDERS: Pass errno to strerror() when SELINUX_getpeercon() fails
Currently ret, which is -1, is passed to strerror() instead of errno.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Related:
https://fedorahosted.org/sssd/ticket/3094
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
4b9ee02b1f5252b2a116adf0c0c6c7a4722bb2cf |
|
04-Aug-2016 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDERS: Show a bit more info in case of SELINUX_getpeercon() failure
Be explicit that it may happen when SELinux is disabled and also suggest
to enable SELinux.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Related:
https://fedorahosted.org/sssd/ticket/3094
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
634b6f28ec7d94d0ac418f338d892b4a41da7e3b |
|
04-Aug-2016 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESPONDERS: Decrease debug level for failures in SELINUX_getpeercon()
As this is not FATAL and may happen when SELinux is disabled, let's just
decrease the debug level to MINOR_FAILURE
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Related:
https://fedorahosted.org/sssd/ticket/3094
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
bc7991db97482eb2ac77f7105ee4bb3d329acff7 |
|
25-Jul-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
Amend debug messages after failure of unlink
Some messages did not have errno or name of problematic file.
There was also improper use of negative value.
The function strerror was called with -1 instead of errno
Reviewed-by: Petr Čech <pcech@redhat.com> |
ebbeac5c6b8b87ab478ee5a04ec48fbbba0c9efc |
|
07-Jul-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
SYSDB: Remove useless parameter from sysdb_init()
The function sysdb_init() is never used to allow upgrade, so the
allow_upgrade parameter was pointless.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
a8d1a344e580f29699aed9b88d87fc3c6f5d113b |
|
29-Jun-2016 |
Simo Sorce <simo@redhat.com> |
Secrets: Add initial responder code for secrets service
Start implementing the Secrets Service Reponder core.
This commit implements stratup and basic conenction handling and HTTP
parsing (using the http-parser library).
Signed-off-by: Simo Sorce <simo@redhat.com>
Related:
https://fedorahosted.org/sssd/ticket/2913
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
e5911e72198df96ec7cfe486ff66363c2297a5f7 |
|
29-Jun-2016 |
Simo Sorce <simo@redhat.com> |
Responders: Add support for socket activation
Add helper that uses systemd socket activation if available to accept a
pre-listining socket at startup.
Related:
https://fedorahosted.org/sssd/ticket/2913
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
4f3a9d837a55b49448eca3c713c85a406207e523 |
|
29-Jun-2016 |
Simo Sorce <simo@redhat.com> |
Responders: Make the client context more generic
This is useufl to allow reusing the responder code with other protocols.
Store protocol data and responder state data behind opaque pointers and
use tallog_get_type to check they are of the right type.
This also allows to store per responder state_ctx so that, for example,
the autofs responder does not have to carry useless variables used only
by the nss responder.
Resolves:
https://fedorahosted.org/sssd/ticket/2918
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
f983b400bf4f6fb14a2174d6f58071e06e9ec832 |
|
23-Jun-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
SYSDB: Open a timestamps cache for caching domains
For all domain types, except the local domain, open a connection to a
new ldb file located at /var/lib/sss/db names timestamps_$domain.ldb.
Constructs the ldb file path manually in sysdb_check_upgrade_02() but
that should be acceptable because nobody should be running such an old
cache these days anyway.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
83a79d93035c2d75a1941f3b54426119174044a0 |
|
20-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
RESPONDER: New interface for client registration
This is just a beginning of new responder interface to data provider
and it is just to make the client registration work. It needs further
improvement.
The idea is to take the existing interface and make it work better
with further extensions of data provider. The current interface has
several disadvantages such as it is originally build only for
account requests and doesn't take different set of output parameters.
It also doesn't work well with integration into tevent-made responders.
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
e7ccfb139388c947ec2dee16cfe3005f5643b90d |
|
10-Jun-2016 |
Petr Cech <pcech@redhat.com> |
RESPONDERS: Negative caching of local users
This patch adds new option 'neg_cache_locals_timeout' into section
of NSS responder. It allows negative caching of local groups and
users. Default value is 0 which means no caching.
Resolves:
https://fedorahosted.org/sssd/ticket/2928
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
dd3a000e6c6160ff6c10fdac9e04549eed3fa2de |
|
11-May-2016 |
Petr Cech <pcech@redhat.com> |
RESPONDER: Removing of redudant function
There is redudant function responder_get_neg_timeout_from_confdb().
This patch removes it.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
56c9f8731173eae841a05f31bb03d311076a8485 |
|
11-May-2016 |
Petr Cech <pcech@redhat.com> |
RESPONDERS: Negcache in resp_ctx preparing
Preparation for initialization of negative cache in common responder.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
39d36216a1692eee6cc5359f6c7ccaa7789be76d |
|
11-May-2016 |
Petr Cech <pcech@redhat.com> |
NEGCACHE: Adding timeout to struct sss_nc_ctx
It adds timeout of negative cache to handling
struct sss_nc_ctx.
There is one change in API of negatice cache:
* int sss_ncache_init(TALLOC_CTX *memctx,
uint32_t timeout, <----- new
struct sss_nc_ctx **_ctx);
There is also one new function in common/responder:
* errno_t responder_get_neg_timeout_from_confdb(struct confdb_ctx *cdb,
uint32_t *ncache_timeout);
Resolves:
https://fedorahosted.org/sssd/ticket/2317
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
600e0429c58081c080cc283a0d4619dff920296f |
|
17-Mar-2016 |
Simo Sorce <simo@redhat.com> |
Responders: Fix client destructor
To close a socket associated to an fd event we must set the close
function of the event and not associate a destructor to a parent context.
Otherwise the destructor will close() the socket before the fd event is
freed, and this may cause invalid calls on a closed file descriptor to
poll/epoll/etc.
Discovered by looking at strace output.
Resolves:
https://fedorahosted.org/sssd/ticket/2973
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
6499d0b915209b670f8e337c4fe76a8be9fa6576 |
|
28-Jan-2016 |
Simo Sorce <simo@redhat.com> |
Util: Improve code to get connection credentials
Adds support to get SELINUX context and make code more abstract so
that struct ucred (if availale) can be used w/o redefining uid,gid,pid to
int32. Also gives a layer of indirection that may come handy if we want
to improve the code further in the future.
Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Michal Židek <mzidek@redhat.com> |
877b92e80bde510d5cd9f03dbf01e2bcf73ab072 |
|
23-Oct-2015 |
Michal Židek <mzidek@redhat.com> |
util: Update get_next_domain's interface
Update get next domain to be able to
include disbled domains and change the
interface to accept flags instead of
multiple booleans.
Ticket:
https://fedorahosted.org/sssd/ticket/2673
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
2f6a94e30458df92fb26c3d810f613d1e4cff99b |
|
14-Oct-2015 |
Petr Cech <pcech@redhat.com> |
REFACTOR: SCKT_RSP_UMASK constant in responder code
This patch adds new SCKT_RSP_UMASK constant which stands for 0111. And
it replaces all occurances in responder code.
Resolves:
https://fedorahosted.org/sssd/ticket/2424
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
d9c2a21119a6d04203060ad54fa8d20f17f5c0b7 |
|
14-Oct-2015 |
Petr Cech <pcech@redhat.com> |
REFACTOR: DFL_RSP_UMASK constant in responder code
There is DFL_RSP_UMASK constant for very secure umask in responder
code. This patch replaces occurances of value 0177 with this constant.
Resolves:
https://fedorahosted.org/sssd/ticket/2424
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b5825c74b6bf7a99ae2172392dbecb51179013a6 |
|
21-Sep-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Convert domain->disabled into tri-state with domain states
Required for:
https://fedorahosted.org/sssd/ticket/2637
This is a first step towards making it possible for domain to be around,
but not contacted by Data Provider.
Also explicitly create domains as active, previously we only relied on
talloc_zero marking dom->disabled as false.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
9fa95168d80beba04b333b06edc492ecb8b085a1 |
|
23-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: add new iface via sbus_conn_register_iface()
Rename sbus_conn_add_interface() to sbus_conn_register_iface()
and remove sbus_new_interface() calls since it is just one more
unnecessary call outside the sbus code.
The function sbus_new_interface() is made static and used
directly in sbus_conn_register_iface().
The name was chosen to better describe what the function is
doing. That it registers an interface on a given object path.
The same interface can be used with different paths so it is
not really about adding an interface.
Preparation for:
https://fedorahosted.org/sssd/ticket/2339
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
f3d91181d4ee9da3f8bbf4ddf8782951c0ae46c1 |
|
15-Jan-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Unify the fd_nonblocking implementation
The responder and child_common modules each had their own
implementation. Unify it instead and add a unit test.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
be78629a06442e2e17d479756a94d88fc33a0658 |
|
13-Dec-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDER: Log failures to resolve user names in csv_string_to_uid_array
This patch makes it more discoverable for the admin to find typos in the
various user lists. Typically, the user lists are used to add access to
some feature and printing a syslog message would make sure the admin
sees the mistake.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
cbcb834028794a4c658a85965516113f8c0760c1 |
|
29-Oct-2014 |
Pavel Reichl <preichl@redhat.com> |
RESPONDERS: Don't hard-code umask value in utility function
Resolves:
https://fedorahosted.org/sssd/ticket/2468
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
f3b9a5b3cf62124bdb5fc11ae2fe6a89ff921539 |
|
27-Oct-2014 |
Pavel Reichl <preichl@redhat.com> |
RESPONDERS: refactor create_pipe_fd()
Resolves:
https://fedorahosted.org/sssd/ticket/2470
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
8bccd95e275fae760a991da394235e4e70e57bbd |
|
22-Oct-2014 |
Michal Zidek <mzidek@redhat.com> |
responders: Do not initialize pipe fd if already present
Allow to skip initialization of pipe file descriptor
if the responder context already has one.
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
2ce29e05e62b2702ba4df5f3316eaf250b0ada7f |
|
22-Oct-2014 |
Michal Zidek <mzidek@redhat.com> |
responder_common: Create fd for pipe in helper
Move creating of file descriptor for pipes into
helper function and make this function public.
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
5eda23c28c582b43b2a0a165b1750f3875c0fa84 |
|
22-Oct-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Add a function to convert id_t from a number or a name
We need a custom function that would convert a numeric or string input
into uid_t. The function will be used to drop privileges in servers and
also in the PAC and IFP responders.
Includes a unit test to test all code that changed as well as a fix for
a misnamed attribute in the csv_to_uid_list function synopsis.
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
1925ce32f7c1dc226be31d4301a0a1dbb2448baa |
|
09-Oct-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Do not depend on monitor code
Just moves code around. There should be a way to use the server.c module
without linking the monitor code.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
f3a5ac1a50c1fccd0801023658e42d2093e1a33a |
|
13-Aug-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
Make the space override responder-agnostic
https://fedorahosted.org/sssd/ticket/2397
In order to make the override_space option usable by other responders,
we need to move the override_space option to the generic responder
structure.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
c5a554f46f8ca0fd09afdb1f53dd9e229a68b86f |
|
22-Apr-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDER: Fix a wrong DEBUG message
Another function decides whether the responder is updating the
subdomains or just returning an error code.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
07e941c1bbdc752142bbd3b838c540bc7ecd0ed7 |
|
14-Mar-2014 |
Stef Walter <stefw@redhat.com> |
sbus: Refactor how we export DBus interfaces
Most importantly, stop using per connection private data. This doesn't
scale when you have more than one thing exporting or exported on a
connection.
Remove struct sbus_interface and expand sbus_conn_add_interface()
function. Remove various struct sbus_interface args to connection
initialization functions and make callers use sbus_conn_add_interface()
directly. The old method was optimized for exporting one interface
on a connection. We'll have connections that export zero, one or more
interfaces.
To export an interface on a DBus server, call sbus_conn_add_interface()
from within the sbus_server_conn_init_fn. To export an interface on
a DBus client, call sbus_conn_add_interface() after sbus_new_connection()
returns.
As before struct sbus_interface represents an object exported via DBus.
However it is now talloc allocated. One can set instance data on the
struct sbus_interface. This instance data is passed to the various
handlers and used in their implementation.
However, we now have type safe interface exporting in the various
high level sss_process_init() sss_monitor_init() and so on.
Introspection support was not in use, and is now gone until we
implement it using the metadata (future patch).
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
d9577dbd92555b0755881e37724019ef9c578404 |
|
14-Mar-2014 |
Stef Walter <stefw@gnome.org> |
sbus: Add struct sbus_request to represent a DBus invocation
struct sbus_request represents a request from a dbus client
being handled by a dbus server implementation. The struct
contains the message, connection and method (and in the
future teh property) which is being requested.
In the future it will contain caller information as well.
sbus_request is a talloc memory context, and is a good place to
attach any allocations and memory specific to the request.
Each handler accepts an sbus_request. If a handler returns
EOK, it is assumed that the handler will finish the request.
Any of the sbus_request_*finish() methods can be used to
complete the request and send back a reply.
sbus_request_return_and_finish() uses the same argument
varargs syntax as dbus_message_append_args(), which isn't
a great syntax. Document it a bit, but don't try to redesign:
The marshalling work (will follow this patch set) will remove
the need to use varargs for most DBus implementation code.
This patch migrates the monitor and data provider dbus code
to use sbus_request, but does not try to rework the talloc
context's to use it.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
83bf46f4066e3d5e838a32357c201de9bd6ecdfd |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Update DEBUG* invocations to use new levels
Use a script to update DEBUG* macro invocations, which use literal
numbers for levels, to use bitmask macros instead:
grep -rl --include '*.[hc]' DEBUG . |
while read f; do
mv "$f"{,.orig}
perl -e 'use strict;
use File::Slurp;
my @map=qw"
SSSDBG_FATAL_FAILURE
SSSDBG_CRIT_FAILURE
SSSDBG_OP_FAILURE
SSSDBG_MINOR_FAILURE
SSSDBG_CONF_SETTINGS
SSSDBG_FUNC_DATA
SSSDBG_TRACE_FUNC
SSSDBG_TRACE_LIBS
SSSDBG_TRACE_INTERNAL
SSSDBG_TRACE_ALL
";
my $text=read_file(\*STDIN);
my $repl;
$text=~s/
^
(
.*
\b
(DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM)
\s*
\(\s*
)(
[0-9]
)(
\s*,
)
(
\s*
)
(
.*
)
$
/
$repl = $1.$map[$3].$4.$5.$6,
length($repl) <= 80
? $repl
: $1.$map[$3].$4."\n".(" " x length($1)).$6
/xmge;
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> |
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> |
19b4bb652f5cdc2797b66595eaf8811881aa9873 |
|
22-Oct-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Include external headers with #include <foo.h>
I find it more readable to include headers from outside the sssd tree
with <foo.h>, not "foo.h". The latter should be used for in-tree headers
only. |
10a9ff0c9b4f347ec24dab887a538b37274ee498 |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: rlim_t |
1d4293f36695daab5909b9eaa670e8e23db548aa |
|
15-Jul-2013 |
Michal Zidek <mzidek@redhat.com> |
Missing space in debug message |
7486dea9f5f7b2a6fbbacc6db740a82140b6377c |
|
20-May-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fixing critical format string issues.
--missing arguments.
--format '%s', but argument is integer.
--wrong format string, examle: '%\n' |
498dcbdfdfffa1aee65d53e83c7eafd5e3b084a5 |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
Add responder_get_domain_by_id()
This new call is similar to responder_get_domain() but uses the domain
SID as search parameter. Since the length of the stored domain SID is
used in the comparison, SIDs of users and groups and be used directly
without stripping the RID component.
The functionality is not merged into responder_get_domain() to allow to
calculate the timeout correctly and return a specific error code if the
entry is expired. |
5a6e3cb57cf2d8d4118b58be0574cccea171ca19 |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
responder_get_domain(): remove timeout calculation
The current timout calculation code in responder_get_domain() is flawed
and I think it always was. I removed the related code because
- it currently has no effect, a match is returned even if it is expired
- that callers do not have any code to handle expired domains. |
2648ec1017d37c0840294352b69fc87047da0368 |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
responder_get_domain: do not return disabled domains
Recent refactoring introduced to concept of disabled domains, i.e.
domains which does not exists anymore. responder_get_domain() should not
return disabled domains. |
4668b4765530cf37289235e483f301100cc1ae21 |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
Remove unused TALLOC_CTX from responder_get_domain()
Recent refactoring removed the need to copy the domain info data of
sub-domains because the related objects will not be removed from memory
anymore. |
6f8ae17869f4f8a1496e3f171ae6b5c11af1845c |
|
20-Mar-2013 |
Pavel Březina <pbrezina@redhat.com> |
do not leak memory on failure in *_process_init() |
1a5d83798af7bd88c9d20862c8830ebb5b755e2d |
|
08-Mar-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Move sss_cmd_execute from client to responder code.
I think it logically belongs there and allows to better exercise the
responder commands from unit tests. |
2ba16c5a5c4b6d3cd2a44179186ec60eda828bcd |
|
05-Mar-2013 |
Michal Zidek <mzidek@redhat.com> |
Remove the alt_db_path parameter of sysdb_init
This parameter was never used.
https://fedorahosted.org/sssd/ticket/1765 |
3a5dcd3c50b456c4d85281ec7a0972201e2f9426 |
|
21-Feb-2013 |
Ondrej Kos <okos@redhat.com> |
Fix uninitialized time_t var in responder
https://fedorahosted.org/sssd/ticket/1810 |
4f118e3e6a25762f40a43e6dbefb09f44adbef32 |
|
10-Feb-2013 |
Simo Sorce <simo@redhat.com> |
Introduce IS_SUBDOMAIN() macro
Fixes https://fedorahosted.org/sssd/ticket/1766 |
bba1a5fd62cffcae076d1351df5a83fbc4a6ec17 |
|
10-Feb-2013 |
Simo Sorce <simo@redhat.com> |
Change the way domains are linked.
- Use a double-linked list for domains and subdomains.
- Never remove a subdomain, simply mark it as disabled if it becomes
unused.
- Rework the way subdomains are refreshed.
Now sysdb_update_subdomains() actually updates the current subdomains
and marks as disabled the ones not found in the sysdb or add new ones
found. It never removes them.
Removal of missing domains from sysdb is deferred to the providers,
which will perform it at refresh time, for the ipa provider that is
done by ipa_subdomains_write_mappings() now.
sysdb_update_subdomains() is then used to update the memory hierarchy
of the subdomains.
- Removes sysdb_get_subdomains()
- Removes copy_subdomain()
- Add sysdb_subdomain_delete() |
0232747f04b650796db56fd7b487aee8a96fab03 |
|
10-Feb-2013 |
Simo Sorce <simo@redhat.com> |
Add function get_next_domain()
Use this function instead of explicitly calling domain->next
This function allows to get the next primary domain or to descend into the
subdomains and replaces also get_next_dom_or_subdom() |
72aa8e7b1d234b6b68446d42efa1cff22b70c81b |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Refactor sysdb initialization
Change the way sysdbs are initialized. Make callers responsible for providing
the list of domains.
Remove the returned array of sysdb contexts, it was used only by sss_cache
and not really necessary there either as that tool can easily iterate the
domains.
Make sysdb ctx children of their respective domains.
Neither sysdb context nor domains are ever freed until a program is done so
there shouldn't be any memory hierarchy issue. As plus we simplify the code by
removing a destructor and a setter function. |
04759b59e71c78ab23b84d13dd29d9c6dd680adb |
|
02-Jan-2013 |
Michal Zidek <mzidek@redhat.com> |
failover: Protect against empty host names
Added new parameter to split_on_separator that allows to skip
empty values.
The whole function was rewritten. Unit test case was added to
check the new implementation.
https://fedorahosted.org/sssd/ticket/1484 |
18afc11a02abda49e25450fdcc553a2e8d6d93b4 |
|
05-Dec-2012 |
Simo Sorce <simo@redhat.com> |
Always append rctx as private data
This is used for the new calls back from the data provider. |
4c9a85ab708ec7debecad51e4240e04d8bc6ca4e |
|
19-Nov-2012 |
Ondrej Kos <okos@redhat.com> |
Display more information on DB version mismatch
https://fedorahosted.org/sssd/ticket/1589
Added check for determining, whether database version is higher or
lower than expected. To distinguish it from other errors it uses
following retun values (further used for appropriate error message):
EMEDIUMTYPE for lower version than expected
EUCLEAN for higher version than expected
When SSSD or one of it's tools fails on DB version mismatch, new error
message is showed suggesting how to proceed. |
20ae5925d2963937dfc6a66017c05bb018cedd3f |
|
11-Oct-2012 |
Pavel Březina <pbrezina@redhat.com> |
do not call dp callbacks when responder is shutting down
https://fedorahosted.org/sssd/ticket/1514
We were experiencing crash duting responder shut down. This happened
when there were some unresolved dp request during the shut down.
The memory hierarchy is main_ctx->specific_ctx->rctx, where
specific_ctx may be one of the pam, nss, sudo, etc. contexts.
If we try to call dp request callback as a result of responder
termination, the specific context is already semi freed, which may
cause crash. |
aac3ca699a09090072ae4d68bdda8dec990ae393 |
|
01-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
Use flat name for master domain as well |
1542b85f13d72329685bdd97aa879c36d11f81be |
|
01-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
Add new option default_domain_suffix |
aeb816c6906c741dff6aa3dfe5ebae93cebed8f1 |
|
21-Aug-2012 |
Sumit Bose <sbose@redhat.com> |
accept_fd_handler: add missing return |
bd71f19d41272ea8b6dd92c9dc8e101d24eb7cc9 |
|
10-Jul-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix segfault when using local provider
The name context was not being initialized for local provider
domains because it was handled after skipping over the back-end
initialization routine. This patch moves the name context init
routine to occur earlier.
https://fedorahosted.org/sssd/ticket/1412 |
2d257ccf620ce1b611f89cec8f0a94c88c2f2881 |
|
10-Jul-2012 |
Sumit Bose <sbose@redhat.com> |
pac responder: limit access by checking UIDs
A check for allowed UIDs is added in the common responder code directly
after accept(). If the platform does not support reading the UID of the
peer but allowed UIDs are configured, access is denied.
Currently only the PAC responder sets the allowed UIDs for a socket. The
default is that only root is allowed to access the socket of the PAC
responder.
Fixes: https://fedorahosted.org/sssd/ticket/1382 |
387349ae092f6dbeb8e4bca291a772695836629c |
|
20-Jun-2012 |
Stef Walter <stefw@gnome.org> |
Move some debug lines to new debug log levels
* These are common lines of debug output when starting
up sssd
https://bugzilla.redhat.com/show_bug.cgi?id=811113 |
bb79e7559dae451a14150377099e32d6b5159a6c |
|
18-Jun-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
Make the client idle timeout configurable |
dd94e9c9c586fb2c2a0e7175251c08c2762598b0 |
|
18-Jun-2012 |
Shantanu Goel <sgoel@trade4.test-jc.tower-research.com> |
Add support for terminating idle connections |
3adb3a4ed740aaeb3013020aa8aa9544669197a0 |
|
18-Jun-2012 |
Shantanu Goel <sgoel@trade4.test-jc.tower-research.com> |
Log message if close() fails in destructor. |
3c60433641ce2e86b9b04778c8f8652ef0d097e4 |
|
13-Jun-2012 |
Stef Walter <stefw@gnome.org> |
Make re_expression and full_name_format per domain options
* Allows different user/domain qualified names for different
domains. For example Domain\User or user@domain.
* The global re_expression and full_name_format options remain
as defaults for the domains.
* Subdomains get the re_expression and full_name_format of
their parent domain.
https://bugzilla.redhat.com/show_bug.cgi?id=811663 |
c3f4aaa1a26035d05e60238d3e2df7fb4429ae28 |
|
02-May-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDER: check return value from confdb_get_int
sss_process_init forgot to check return value of confdb_get_int |
6fdde3913a11cd6148627696fa8717c34e8460fc |
|
24-Apr-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Modified responder_get_domain()
Now it checks for subdomains as well as for the domain itself |
c0f9698cd951b7223f251ff2511c4b22a6e4ba60 |
|
24-Apr-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Responder part of the subdomain retrieval work |
65976ea5e9767bfaced81dfb97dc87d59f50b57e |
|
08-Mar-2012 |
Simo Sorce <simo@redhat.com> |
Use the correct hash table for pending requests
The function that handled pending requests on reconnect was checking an
orphaned global variable that was never used, redenring the whole function
uselsess.
This fixes a very nasty bug that was causing requests for which we never
received an answer for (for example because the backend failed and was
restarted) to be never removed and therefore causing a black hole effect for
any other request of the same type.
Fixes: https://fedorahosted.org/sssd/ticket/1229 |
457927f4210a0c41289521d55617b6d6bb6a46e0 |
|
17-Feb-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
RESPONDERS: Make the fd_limit setting configurable
This code will now attempt first to see if it has privilege to set
the value as specified, and if not it will fall back to the
previous behavior. So on systems with the CAP_SYS_RESOURCE
capability granted to SSSD, it will be able to ignore the
limits.conf hard limit.
https://fedorahosted.org/sssd/ticket/1197 |
1a63155b0797c2b1963424e5c0f5d3a62f8cc7cc |
|
17-Feb-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
RESPONDERS: Allow increasing the file-descriptor limit
This patch will increase the file descriptor limit to 8k or the
limits.conf maximum, whichever is lesser.
https://fedorahosted.org/sssd/ticket/1197 |
b3b42c49656e192787a983aaa8b9ec744ba4cb9d |
|
16-Dec-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Use the case sensitivity flag in responders |
247a7056af42fc50bbc896cddb66a60154ca12e9 |
|
16-Dec-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Responders: Split getting domain by name into separate function |
b32159300fea63222d8dd9200ed634087704ea74 |
|
05-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Allow using Glib for UTF8 support |
069a5fe72d38f8e15b4416992453ac41a425ce9a |
|
29-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
RESPONDER: Refactor DP requests into tevent_req style |
872f2d32d979a1dd2145667487f170fec8b5189a |
|
18-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
RESPONDER: Ensure that all input strings are valid UTF-8 |
4f82c11130b0a5d0902798073f9edbf6b3e946a4 |
|
29-Jul-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Converge accept_fd_handler and accept_priv_fd_handler
These two functions were almost identical. Better to maintain them
as a single function. |
324fb26ba803a999bedc29e93c46c84f27abf5b7 |
|
23-May-2011 |
Sumit Bose <sbose@redhat.com> |
Set _GNU_SOURCE globally |
d818283d39d56204ffe710b6c9b83a2cf497f946 |
|
06-May-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Allow changing the log level without restart
We will now re-read the confdb debug_level value when processing
the monitor_common_logrotate() function, which occurs when the
monitor receives a SIGHUP. |
28a410f423bf9bcdf43ed14cd4c50634753b51f3 |
|
06-May-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Create common sss_monitor_init()
This was implemented almost identically for both the responders
and the providers. It is easier to maintain as a single routine.
This patch also adds the ability to provide a private context to
attach to the sbus_connection for later use. |
ca4d33adf80cfbd94ca2ae7620520c128244a6d9 |
|
17-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix unchecked return value in set_nonblocking
Also fixes the same problem with set_close_on_exec
https://fedorahosted.org/sssd/ticket/713 |
133bbb3c5e489f2f6eff711b0f8110ea47cb146f |
|
14-Jun-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Properly null-terminate socket path
https://fedorahosted.org/sssd/ticket/540 |
ea0173fe8ba915960621454168651c62301833cb |
|
16-Apr-2010 |
Sumit Bose <sbose@redhat.com> |
Use SO_PEERCRED on the PAM socket
This is the second attempt to let the PAM client and the PAM responder
exchange their credentials, i.e. uid, gid and pid. Because this approach
does not require any message interchange between the client and the
server the protocol version number is not changed.
On the client side the connection is terminated it the responder is not
run by root. On the server side the effective uid and gid and the pid of
the client are available for future use.
The following additional changes are made by this patch:
- the checks of the ownership and the permissions on the PAM sockets are
enhanced
- internal error codes are introduced on the client side to generate
more specific log messages if an error occurs |
b9923919909cb976ddf42002c56a42b1893e3547 |
|
16-Apr-2010 |
Sumit Bose <sbose@redhat.com> |
Revert "Add better checks on PAM socket"
This reverts commit 5a88e963744e5da453e88b5c36499f04712df097. |
9db5a5140356479a58f2e7212fc5c4ad6135bb7f |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysydb: Finally stop using a common event context
This commit completes the migration to a synchronous sysdb |
cfff837d831b6f4e12dcc87c1d59789fe08597a6 |
|
17-Mar-2010 |
Sumit Bose <sbose@redhat.com> |
Fixes for client communication
- catch all errors of send() and recv(), not only EAGAIN
- check if send() or recv() return EWOULDBLOCK or EINTR
- remove unused parameter from client_send() and client_recv()
- fix a debugging message |
12c6b6683f8a2036578e87c659afa79d3a1d68a9 |
|
15-Mar-2010 |
George McCollister <George.McCollister@gmail.com> |
Fixed buffer alignment in exchange_credentials().
buf needs to be 32 bit aligned on ARM. Also made the fix on the server side.
Signed-off-by: George McCollister <George.McCollister@gmail.com> |
5a88e963744e5da453e88b5c36499f04712df097 |
|
11-Mar-2010 |
Sumit Bose <sbose@redhat.com> |
Add better checks on PAM socket
- check if the public socket belongs to root and has 0666 permissions
- use a SCM_CREDENTIALS message if available |
8f4aaae28c88c707853f8f28d8babc4efe0c1bf6 |
|
04-Mar-2010 |
Martin Nagy <mnagy@redhat.com> |
Add forgotten \n in DEBUG statements
Logs from confdb with missing '\n' in the DEBUG statements annoyed me so
I decided to fix them. I also made a quick grep through the code and
found other places so I fixed them too. |
b81f453b8ade026f9c19bfd557a986cbcf0c9c8c |
|
22-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Remove unnecessary "domain" parameter from DP registration
This was a holdover from when the DP and the providers were unique
processes. The NSS and PAM registrations do not need to send the
domain, as it is not ambiguous which one they are talking to. |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |