4313147ab4214037900cbb3ced8a03e492bff02c |
|
17-Aug-2016 |
Petr Cech <pcech@redhat.com> |
LDAP: Adding support for SIGTERM signal
We add support for handling SIGTERM signal. If ldap_child receives
SIGTERM signal it removes temporary file.
Resolves:
https://fedorahosted.org/sssd/ticket/3106
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
cc2d77d5218c188119fa954c856e858cbde76947 |
|
20-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
Rename dp_backend.h to backend.h
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
9f0bffebd070115ab47a92eadc6890a721c7b78d |
|
31-Aug-2015 |
Michal Židek <mzidek@redhat.com> |
sssd: incorrect checks on length values during packet decoding
https://fedorahosted.org/sssd/ticket/1697
It is safer to isolate the checked (unknown/untrusted)
value on the left hand side in the conditions
to avoid overflows/underflows.
Reviewed-by: Petr Cech <pcech@redhat.com> |
51ae9cb4ed85b60cfe00eaf6d3a4af39ed409ddc |
|
17-Aug-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Use sss_unique_filename in ldap_child
Simplifies the code.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
6ccda8691123bb27f5f2a88a0c80174af3e0fd0a |
|
11-Mar-2015 |
Pavel Reichl <preichl@redhat.com> |
ldap_child: fix coverity warning
In ldap_child_get_tgt_sync() variable 'ret' got overriden in done
section without ever before being read.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
cc0f9a541c5ecdad750a86b2de9baa1f07403e9e |
|
06-Mar-2015 |
Sumit Bose <sbose@redhat.com> |
ldap_child: initialized ccname_file_dummy
ccname_file_dummy is used in the done-block which is called before
ccname_file_dummy is set to a value. This patch initializes
ccname_file_dummy to NULL.
Related to https://fedorahosted.org/sssd/ticket/2592
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
2b20ff2e33ad3993a9cad910c4b4b828513613df |
|
04-Mar-2015 |
Daniel Hjorth <dh@dhjorth.com> |
LDAP: unlink ccname_file_dummy if there is an error
https://fedorahosted.org/sssd/ticket/2592
If there is an error after ccname_file_dummy is created but before it is
renamed then the file isn't removed. This can cause a lot of files to be
created and take up inodes in a filesystem.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com> |
8e44ddfccebe61728d8a2c1dafce36dfa944bc90 |
|
03-Dec-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
sss_atomic_write_s() return value is signed
Reviewed-by: Sumit Bose <sbose@redhat.com> |
75afab247bc9d1a27dce0b1a4b1ca6ebe106b887 |
|
03-Dec-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Remove useless include
Using a PAM include file in an LDAP child is confusing.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
96bdf2906c981fe55b1d9a7b6539f2dd710efbf8 |
|
02-Dec-2014 |
Sumit Bose <sbose@redhat.com> |
ldap_child: copy keytab into memory to drop privileges earlier
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
936940720b1b0e701a2317abc4c2d05a78338f33 |
|
05-Nov-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Drop privileges after kinit in ldap_child
After ldap_child initializes privileges using root-owned keytab, it
drops privileges to the SSSD user, minimizing the amount of code that
runs as root.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
5eef3da14cb34e4cb6356f0b291c066db946f936 |
|
05-Nov-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: read the correct data type from ldap_child's input buffer
The back end wrote uint32_t, the ldap_child process would read int32_t.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
0348c74bad010d35f92400c749a7acc2fea8b2cb |
|
05-Nov-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Move sss_krb5_verify_keytab_ex to ldap_child
The function was called from one place only, so it makes no sense to
keep it in a shared module. Moreover, the function should only be
called from code that runs as root.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
bd981608d8d174cd7309a992f393c43c1334eddd |
|
02-Sep-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Set umask before calling mkstemp
Even though we only call mkstemp to generate a random filename, it's a
good practice to set and re-set umask before and after calling mkstemp.
Silences a warning from Coverity static analyzer.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
5c075562ac687f7102c7c940fec2e82da378bfff |
|
26-Aug-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Use randomized ccname for storing credentials
https://fedorahosted.org/sssd/ticket/2410
If two ldap_child processes attempt to prime the ccache at the same time
for the same domain, the ldap_child might fail with:
[ldap_child_get_tgt_sync] (0x0040): Failed to init ccache: Internal credentials cache error
[main] (0x0020): ldap_child_get_tgt_sync failed.
To avoid the race-condition, the ldap_child process now creates the
ccache randomized and before returning to the caller, renames the
randomized ccache to a permanent one.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
ad9d65039fd15a9b63b5772c0c4cdc29ffac93fa |
|
26-Aug-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Use tmp_ctx in ldap_child for temporary data
Using a global memory context for short-lived private data might lead to
memory growth.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
9a990aa9f7e8c105e0cfeea8d8cbdc776c2d5d7a |
|
09-Jul-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SSSD: Send debug to stderr when running on foreground
https://fedorahosted.org/sssd/ticket/2348
When SSSD is running in interactive mode, we should print DEBUG messages
directly to stderr, not journal.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
bf6f1b3d49e17b1adf0448c0b06e94b1e52ddffd |
|
03-Jun-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
Unify usage of function gethostname
man gethostanme says:
NOTES
SUSv2 guarantees that "Host names are limited to 255 bytes".
POSIX.1-2001 guarantees that "Host names (not including the terminating
null byte) are limited to HOST_NAME_MAX bytes". On Linux,
HOST_NAME_MAX is defined with the value 64, which has been the limit
since Linux 1.0 (earlier kernels imposed a limit of 8 bytes).
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
47bc2d6639c41da1e5bac37eb4af3559bbc0e10e |
|
08-Apr-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
krb5_child: Fix use after free in debug message
debug_prg_name is used in debug_fn and it was allocated under
talloc context "kr". The variable "kr" was removed before the last debug
messages in function main. It is very little change that it will be overridden.
It is possible to see this issue with exported environment variable
TALLOC_FREE_FILL=255
Reviewed-by: Sumit Bose <sbose@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> |
0e65abe5cf2abf5d4b431cf6bd161b419f07901d |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: size_t |
9e2c64c6d4f5560e27207193efea6536a566865e |
|
29-Oct-2012 |
Michal Zidek <mzidek@redhat.com> |
Include talloc log in our debug facility
https://fedorahosted.org/sssd/ticket/1495 |
804b26a0d91d0b551f2f0df11507ef065f8a1f67 |
|
24-Oct-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Return error when principal selection fails
The ldap_child would return a NULL ccache but the error code would still
indicate success.
https://fedorahosted.org/sssd/ticket/1594 |
c5e4d4e9a3f6896f0f3c631ea26bb49a79b5cd8e |
|
12-Oct-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Only call krb5_set_trace_callback on platforms that support it |
e7a24374d97e1d1c32d3e18561a20e8c5e6319ec |
|
12-Oct-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Collect krb5 trace on high debug levels
If the debug level contains SSSDBG_TRACE_ALL, then the logs would also
include tracing information from libkrb5.
https://fedorahosted.org/sssd/ticket/1539 |
115cc768599d7df4b3206426652d3e7a3971d597 |
|
12-Oct-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Two fixes to child processes
There was an unused structure member in the krb5_child.
Declaration of __krb5_error_msg was shadowing the same variable from
sss_krb5.h which is not nice. Also we might actually use the error
context directly instead of passing it as parameter. |
c75bde967be301ba58cfa376778f5cd9daa991f5 |
|
20-Sep-2012 |
Ondrej Kos <okos@redhat.com> |
Add more debuginfo into ldap_child
https://fedorahosted.org/sssd/ticket/1225
krb5_child already updated before. Adding more debuginfo into
ldap_child. Also old debug levels rewritten into new macros. |
aa2c6f469414668e56aa03d5ba5cecde64bc713e |
|
06-Jul-2012 |
Stef Walter <stefw@gnome.org> |
Revert commit 4c157ecedd52602f75574605ef48d0c48e9bfbe8
* This broke corner cases when used with
default_tkt_types = des-cbc-crc
and DES enabled on an AD domain.
* This is fixed in kerberos instead, in a more correct way
and in a way which we cannot replicate. |
5802d9e5a1b83e74699b6a347e33acf3f374d191 |
|
15-Jun-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Fix missing variable in debug message |
3ca7450bc821ac37851e92a256d0a2b89f4f2032 |
|
14-Jun-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Provide more debugging in krb5_child and ldap_child
https://fedorahosted.org/sssd/ticket/1225 |
583f24df86e433589c73a3f112b30676c412b7cd |
|
31-May-2012 |
Nick Guay <nguay@redhat.com> |
added DEBUG messages to krb5_child and ldap_child |
4c157ecedd52602f75574605ef48d0c48e9bfbe8 |
|
07-May-2012 |
Stef Walter <stefw@gnome.org> |
Limit krb5_get_init_creds_keytab() to etypes in keytab
* Load the enctypes for the keys in the keytab and pass
them to krb5_get_init_creds_keytab().
* This fixes the problem where the server offers a enctype
that krb5 supports, but we don't have a key for in the keytab.
https://bugzilla.redhat.com/show_bug.cgi?id=811375 |
4d1a261202d828efc84e3a84d16c30548f29f76d |
|
04-May-2012 |
Stef Walter <stefw@gnome.org> |
If canon'ing principals, write ccache with updated default principal
* When calling krb5_get_init_creds_keytab() with
krb5_get_init_creds_opt_set_canonicalize() the credential
principal can get updated.
* Create the cache file with the correct default credential.
* LDAP GSSAPI SASL would fail due to the mismatched credentials
before this patch.
https://bugzilla.redhat.com/show_bug.cgi?id=811518 |
9d7d4458d94d0aac0a7edf999368eb18f89cb76a |
|
20-Apr-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Convert read and write operations to sss_atomic_read
https://fedorahosted.org/sssd/ticket/1209 |
c87a579a23b27e65ae956bc42cf0a247f2ca0baf |
|
06-Apr-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
Clean up log messages about keytab_name
There were many places where we were printing (null) to the logs
because a NULL keytab name tells libkrb5 to use its configured
default instead of a particular path. This patch should clean up
all uses of this to print "default" in the logs.
https://fedorahosted.org/sssd/ticket/1288 |
ee6e61781536a0ef34491cea74e91c36ee439df9 |
|
06-Mar-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
krb5_child: set debugging sooner |
85d8b2567730b236578a1aaeb0139c38dda23304 |
|
31-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
KRB5: Add syslog messages for Kerberos failures
https://fedorahosted.org/sssd/ticket/1137 |
768591607fc89d3a14fa00c9c8f78e83f3f6b565 |
|
22-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Add compatibility layer for Heimdal Kerberos implementation |
87c07559af5cfcd2752295ef7c425bd3205f426f |
|
19-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Move child_common routines to util |
ed80a7f8ff76089bdcfae7007dbdef42d05e2cc8 |
|
02-Nov-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Support to request canonicalization in LDAP/IPA provider
https://fedorahosted.org/sssd/ticket/957 |
1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1 |
|
08-Sep-2011 |
Pavel Březina <pbrezina@redhat.com> |
DEBUG timestamps offer higher precision
https://fedorahosted.org/sssd/ticket/956
Added: --debug-microseconds=0/1
Added: debug_microseconds to sssd.conf |
89caf5edcc99f5731e89bd51e6ffaad3ec11c304 |
|
25-Aug-2011 |
Pavel Březina <pbrezina@redhat.com> |
New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0
Removed:
SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED)
Added new macro:
CONVERT_AND_SET_DEBUG_LEVEL(new_value)
Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0
so DEBUG macro could be reduced by one condition. Anyway, it has a minor
effect, every time you want to load debug_level from command line parameters,
you have to use following pattern:
/* Set debug level to invalid value so we can deside if -d 0 was used. */
debug_level = SSSDBG_INVALID;
pc = poptGetContext(argv[0], argc, argv, long_options, 0);
while((opt = poptGetNextOpt(pc)) != -1) { ... }
CONVERT_AND_SET_DEBUG_LEVEL(debug_level); |
99dd40a885ed3d42af4bbbde7ee2fc98830544d0 |
|
25-Aug-2011 |
Pavel Březina <pbrezina@redhat.com> |
New DEBUG facility - conversion
https://fedorahosted.org/sssd/ticket/925
Conversion of the old debug_level format to the new one.
(only where it was necessary)
Removed:
SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT) |
e81a816cddab4a62f263d1a0274d5d3f101e8e0f |
|
25-Apr-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Modify principal selection for keytab authentication
Currently we construct the principal as host/fqdn@REALM. The problem
with this is that this principal doesn't have to be in the keytab. In
that case the provider fails to start. It is better to scan the keytab
and find the most suitable principal to use. Only in case no suitable
principal is found the backend should fail to start.
The second issue solved by this patch is that the realm we are
authenticating the machine to can be in general different from the realm
our users are part of (in case of cross Kerberos trust).
The patch adds new configuration option SDAP_SASL_REALM.
https://fedorahosted.org/sssd/ticket/781 |
64783bdc0aff447a356c5169c027dadc05dfb312 |
|
13-Oct-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Make ldap_child report kerberos return code to parent |
80df25198ad743b0b927bafc9c27227db860578a |
|
13-Oct-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Report Kerberos error code from ldap_child_get_tgt_sync |
2f4e8fbdf1d4ba1e00fcab93af91fe4f4f40250d |
|
03-Aug-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Validate keytab at startup
In addition to validating the keytab everytime a TGT is requested, we
also validate the keytab on back end startup to give early warning that
the keytab is not usable.
Fixes: #556 |
13d90c2ae8413317947d392c89fffca10ec83587 |
|
03-Aug-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Fix getting default realm in the ldap child |
8571644422d36fac63d2e351936433f1fb8856c7 |
|
09-Jul-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Add syslog messages for LDAP GSSAPI bind
We will now emit a level 0 debug message on keytab errors, and
also write to the syslog (LOG_DAEMON) |
a2cabe1873c4d01c18ef6617b6b1f10a0ce3560e |
|
09-Jul-2010 |
eindenbom <eindenbom@gmail.com> |
GSSAPI ticket expiry time is returned from ldap_child and stored in sdap_handle for future reference. |
ebb6e30d687a4d6626c735234c85cbb5b06a26aa |
|
16-May-2010 |
Sumit Bose <sbose@redhat.com> |
Add ldap_krb5_ticket_lifetime option |
80c8a4f94d54b23bce206fdd75ff2648977ce271 |
|
25-Mar-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Allow arbitrary-length PAM messages
The PAM standard allows for messages of any length to be returned
to the client. We were discarding all messages of length greater
than 255. This patch dynamically allocates the message buffers so
we can pass the complete message.
This resolves https://fedorahosted.org/sssd/ticket/432 |
6adf5b8a078f2b37f2d3d91cd060b891c2a7efaa |
|
03-Mar-2010 |
Simo Sorce <ssorce@redhat.com> |
Improve safe alignment buffer handling macros
Make the counter optional so that alignment safe macros can be used also where
there is no counter to update.
Change arguments names so that they are not deceiving (ptr normlly identify a
pointer)
Turn the memcpy substitute into an inline function so that passing a pointer to
rp and checking for it doesn't make the compiler spit lots of warnings. |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |