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> |
95fd82a4d7b50e64fed6906bc5345f271e8247d9 |
|
06-Dec-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
RESP: Expose DP method getAccountDomain() to responders
Adds a tevent request that calls the getAccountDomain DP method.
This request will be used by responders to locate an object's domain.
At the moment, only looking up UIDs and GIDs is supported.
Internally, until we switch to the rdp_ interface everywhere, this
interface hooks into the sss_dp_issue_request(). When we switch to
the rdp_ interface, we'll be able to provide a nicer method parameters
as well.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com> |
c33fa33065b1211dba5ea2909bac62843a72e8b5 |
|
25-Sep-2017 |
AmitKumar <amitkuma@redhat.com> |
Print a warning when enumeration is requested but disabled
Add an explanatory message to be logged once, at the start-up,
mentioning that in case enumeration is not enabled, getent passwd won't
return all users by design.
The debug level chosen to show the message is SSS_LOG_NOTICE.
Resolves:
https://pagure.io/SSSD/sssd/issue/2301
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@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> |
9759333b3dd404c6787ef0186984c5d4256eb5bb |
|
27-Jul-2017 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
NSS: Move nss_get_shell_override to responder utils
Move nss_get_shell_override to common responder utils and rename it to
sss_resp_get_shell_override to make it available to other responders. In
particular let PAM responder use it to provide original shell when it is
overriden for session recording.
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> |
1b3ca692bb8f93b87703447904bda80d45a75835 |
|
11-Jul-2017 |
Sumit Bose <sbose@redhat.com> |
PAM: make sure the files provider uses the right auth provider
Only the 'local' provider will use the 'local' auth provider, for all
other id providers the configured auth provider in the backend should
be checked.
Resolves https://pagure.io/SSSD/sssd/issue/3447
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
ed15b405ff95e521df3028fc40360a1547ba84bd |
|
31-May-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
RESP: Provide a reusable request to fully resolve incomplete groups
After initgroups, the group objects might not be complete, but just
stubs that contain the SID and the GID. If the caller needs to know the
group names as well, this request allows them to iterate over the list
of the groups and resolve them one-by-one.
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> |
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> |
26866484a985adbc7edf2e79a1e95b3bb6b8624c |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDER: Include the files provider in NEEDS_CHECK_PROVIDER
It makes no sense to contact the Data Provider with the files provider
except when the files provider is updating itself.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
53c31b83e4d06ea4c2813eec2f1e647a613b4a2b |
|
08-Feb-2017 |
Pavel Březina <pbrezina@redhat.com> |
cache_req: add host by name search
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
2b5704cd96a085b99d3b0d4f80f4414adc134750 |
|
08-Feb-2017 |
Pavel Březina <pbrezina@redhat.com> |
sss_parse_inp_send: provide default_domain as parameter
It is not always desirable to consider default_domain from configuration
but expect none instead. For example when we search host certificates.
This is currently not used in this patch since host lookups parse
name directly with sss_parse_name but it will be used in the next
patch.
Reviewed-by: Jakub Hrozek <jhrozek@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> |
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> |
0713b92ec9f10b6dd913dc56cbc7845d1b025ccb |
|
19-Dec-2016 |
Pavel Březina <pbrezina@redhat.com> |
responders: unify usage of sss_cmd_send_empty and _error
Originally sss_cmd_send_empty() called also sss_cmd_done() to send
an empty reply packet to the cliant where as sss_cmd_send_error()
did not invoke this call and required the caller to call it manually.
For this reason, a possible error in users_find_by_cert_done() was not
send to the caller.
This patch unifies the usage of those two functions in a way that both
of them only creates the reply packet but do not send it. Another
sss_cmd_done() call is required to send the reply.
Because sss_cmd_done() is now always called, unit tests needed to be
changed to always mock a value for __wrap_sss_cmd_done.
Resolves:
https://fedorahosted.org/sssd/ticket/3151
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
e4b147ed01c8476d36ce356ee53899870d84351d |
|
19-Dec-2016 |
Pavel Březina <pbrezina@redhat.com> |
setent_notify: remove unused private context
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> |
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> |
78f9a9d4a2725f1b2cb6e582c965b5e6f7bdff7d |
|
07-Jul-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDER: Add a helper function sss_resp_create_fqname
When looking up entries in the responders that have not been yet
converted to the cache_req API, we need to perform some common
operations all the time. These include converting the name to the right
case, reverse-replacing whitespace and converting the name to the qualified
format for that domain.
This patch adds a function that performs these steps to avoid code
duplication.
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> |
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> |
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> |
f6c337c6256879d47356cd099bb00aafba2650f0 |
|
14-Mar-2016 |
Pavel Březina <pbrezina@redhat.com> |
cache_req: improve debugging
Each debug message is matched to a specific request, this way it
will be easier to follow the request flow especially when paralel
request are running.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Sumit Bose <sbose@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> |
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> |
cdc44abdf944b0de541fe93ecd77df4d09c856b1 |
|
15-Jul-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
DP: Add DP_WILDCARD and SSS_DP_WILDCARD_USER/SSS_DP_WILDCARD_GROUP
Related:
https://fedorahosted.org/sssd/ticket/2553
Extends the Data Provider interface and the responder<->Data provider
interface with wildcard lookups.
The patch uses a new "wildcard" prefix rather than reusing the existing
user/group prefixes.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
827a016a07d5f911cc4195be89896a376fd71f59 |
|
19-Jun-2015 |
Sumit Bose <sbose@redhat.com> |
IFP: add FindByCertificate method for User objects
Related to https://fedorahosted.org/sssd/ticket/2596
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
0528fdec17d0031996e919fcd852459e86592c35 |
|
09-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
responders: reset ncache after domains are discovered during startup
After responders start, they add a lookup operation that discovers the
subdomains so that qualifying users works. After this operation is
finishes, we need to reset negcache to allow users to be added into the
newly discovered domains.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
115de6d50f0d0bdd5745a5d8eb0d067be9128528 |
|
05-Nov-2014 |
Sumit Bose <sbose@redhat.com> |
Add parse_attr_list_ex() helper function
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
458f5245dd5130d12666cce6faf8ef1ec7f80169 |
|
29-Oct-2014 |
Pavel Reichl <preichl@redhat.com> |
RESPONDERS: Set default value for umask
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> |
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> |
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926 |
|
22-Apr-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDERS: Add a new request sss_parse_inp_send
The responders were copying code to parse input and on encountering an
uknown domain, send the discover subdomain request. This patch adds a
reusable request that can always be called in responders and in case the
name can be parsed, just shortcut.
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> |
9de5878d247b77b8f520a57727cd55f42e179caa |
|
22-Oct-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Move sss_parse_name_for_domains declaration to util.h |
a573d112013e44373f03b98f653fede0feee9fdc |
|
22-Oct-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Remove duplicate declaration |
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. |
909a86af4eb99f5d311d7136cab78dca535ae304 |
|
04-Jun-2013 |
Sumit Bose <sbose@redhat.com> |
Lookup domains at startup
To make sure that e.g. the short/NetBIOS domain name is available this
patch make sure that the responders send a get_domains request to their
backends at startup the collect the domain information or read it from
the cache if the backend is offline.
For completeness I added this to all responders even if they do not need
the information at the moment.
Fixes https://fedorahosted.org/sssd/ticket/1951 |
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. |
f0944fdd627bd684ff36c9670dc857ffdedc343f |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
Add two new request types to the data-provider interface
The patch adds two new request types for SID related requests. The first
one is used if a SID is given and the corresponding object should be
found. The second one can be used if the SID for an object is requested
but it is not clear if the object is a user or a group. |
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. |
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. |
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. |
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. |
1542b85f13d72329685bdd97aa879c36d11f81be |
|
01-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
Add new option default_domain_suffix |
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 |
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 |
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 |
b42b5d5aaf4da165582e73ad985fdff6e34e61e4 |
|
03-May-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
SSH: Add dp_get_host_send to common responder code
Instead of using account_info request, creates a new ssh specific
request. This improves code readability and will make the code more
flexible in the future.
https://fedorahosted.org/sssd/ticket/1176 |
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 |
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 |
2cba1c86f48db866fc72738a32eecbbdcdf3dbdb |
|
13-Feb-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Remove setent structure when callback is called |
bd3cf7d6414171fcd605d9f831965be107e411d7 |
|
07-Feb-2012 |
Jan Cholasta <jcholast@redhat.com> |
DP: Add support for hosts in sss_dp_get_account
Host requests are directed to the host info handler. |
9e80079370ff3b943832adc3c5ef430e64be0a0c |
|
06-Feb-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
AUTOFS: responder |
e24a0656252c167e644b4758e5e53afe69be02e1 |
|
06-Feb-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Split the logic to check cache expiration into separate function |
98076cabc2a8b8f71dc3bc1263519827f71a5fcc |
|
06-Feb-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDERS: Refactor setent_req_list
Makes the setent_add_ref() and setent_notify_*() functions more generic
to be reusable by the autofs responder. |
405a06682b3772b70bb06d3adba780a062959641 |
|
03-Feb-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
RESPONDERS: Provide a common sss_cmd_send_error function
The common function could be reused in new responders |
ab68008f87504ace9451c14ba2a7e8dfec435779 |
|
01-Feb-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Refactor nss_cmd_send_empty |
cd5525d7dcde6ffbf162608706c502aa33951789 |
|
27-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
NSS: Add service enumeration support to NSS provider |
990b7ebaf67b6d4cc982c805a8ec1126111bd4b4 |
|
27-Jan-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
DP: Refactor responder_dp_req so it's reusable by other responders
* the internal request is now more generic and is decoupled from
account-specific data. There is a new sss_dp_issue_request() wrapper
that issues a BE request or registers a callback
* the public requests all use struct sss_dp_req_state as the tevent_req
state data. This allows to report back data from the internal request
even if the caller is just a callback notifier
* each specific request now uses an _info structure that contains all
the data necessary to construct a DBusMessage passed to provider
* each specific request now defines a sss_dp_get_$data_msg callback that
is called from the sss_dp_issue_request() common wraper. The purpose
of the wrapper is to construct a DBusMessage and bind it to a DBus
method so the message can be just sent over to back end
The miscellanous changes include:
* change SSS_DP_ constants to an enum. This way, a switch() would error
if a value is not handled.
* rename sss_dp_get_account_int_send() to sss_dp_internal_get_send()
request because the internal request is going to handle more than just
account data
* the DBus return values were renamed from err_maj, err_min to dp_err
and dp_ret respectively |
6748486d61680426e8739bb5e7db7dd8409ef44c |
|
27-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
DP: Add support for services in dp requests |
0c7aa697991ea9df960fae14fd567ebdda3b4ff4 |
|
21-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
RESPONDER: Extend sss_dp_account_send() to include extra data
Some NSS maps such as 'services' require more values to be passed
to the data provider than just the name or ID. In these cases, we
will amend an optional component to filter value to pass to the
data provider backend. |
d844aab866ae237844360cea70e2dccdc90c783d |
|
20-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
PAM: make initgroups timeout work across multiple clients
Instead of timing out the initgroups lookup on a per-cctx basis,
we will maintain a hash table of recently-seen users and use this
instead. This will allow SSSD to handle user's logging into
multiple services simultaneously more graciously, as well as
playing nicer with SSH (which makes calls to PAM both before and
after a fork).
https://fedorahosted.org/sssd/ticket/1063 |
247a7056af42fc50bbc896cddb66a60154ca12e9 |
|
16-Dec-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Responders: Split getting domain by name into separate function |
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 |
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. |
c71ff1e4615ec8560b90ca7d4827d99424ad0355 |
|
22-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Update the ID cache for any PAM request
Also adds an option to limit how often we check the ID provider,
so that conversations with multiple PAM requests won't update the
cache multiple times.
https://fedorahosted.org/sssd/ticket/749 |
4967fe0bc52580f7e96974e30d3cf2f33fadaabe |
|
26-Oct-2010 |
Sumit Bose <sbose@redhat.com> |
Remove all nss requests after a reconnect
Currently we do not handle the open nss request after a reconnect and
wait until they timeout (which is a couple of minutes!). This patch adds
a handler that terminates all requests after a reconnect. Then responder
will return matching cache entries or nothing. |
ef39c0adcb61b16f9edc7beb4cdc8f3b0d5a8f15 |
|
13-Oct-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Add netgroup support to the NSS responder |
c53ed27b33ecc7fcce62d4b3a3e55ce9cda1ca7c |
|
08-Sep-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Handle multiple simultaneous enumeration requests
Previously, if a second enumeration request arrived while one was
already being processed, each process would receive only a subset
of the total number of available users or groups. This is because
we were maintaining the response object as a global value in the
NSS responder. The second request would come in, see that the data
set was already populated, and start reading from wherever the
cursor was currently pointed.
With this patch, we now move the cursor to the client context
instead of the global NSS context.
Additionally, this patch completely rewrites the approach to
enumerations in the tevent_req style. This makes it much easier to
follow in the code.
In order to ensure that a slow or malicious client cannot hold
onto a reference for the setent result object indefinitely, we
set an expiration on the object. We use the enum_cache_timeout
here, since that is an appropriate value.
If the timeout fires during the normal operation of the get*ent()
loop of a client program, we will save the current values of the
read index so that we can resume as soon as the object has been
refreshed by an implicit setent call.
Instead of deleting the enumeration result object immediately
after the last in-progress client has read it, we'll keep the
object around for the lifetime of enum_cache_timeout. This way,
additional clients making enumeration requests can still access
the results in-memory. |
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. |
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 |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |