b34ffbf33729c557c3d1aebf4707ad0ffe4f1904 |
|
22-Sep-2016 |
Petr Čech <pcech@redhat.com> |
KRB5: Fixing FQ name of user in krb5_setup()
This patch fixes creation of FQ username if krb5_map_user option
ise used.
Resolves:
https://fedorahosted.org/sssd/ticket/3188
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
fedfb7c62b4efa89d18d0d3a7895a2a34ec4ce42 |
|
08-Sep-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Send the output username, not internal fqname to krb5_child
krb5_child calls krb5_kuserok() during the access phase which checks if
a particular user is allowed to authenticate as a particular principal.
We used to pass the internal fqname to krb5_kuserok() which broke the
functionality and all users were denied access.
This patch changes that to send the 'output' username to krb5_child,
because that's the username the system receives through getpwnam() or
getpwuid() anyway. The patch also adds a new structure member fo the
krb5child_req structure to avoid reusing the pd->user variable but have
an explicit one that serves as the input for the child process.
Resolves:
https://fedorahosted.org/sssd/ticket/3172
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
dea636af4d1902a081ee891f1b19ee2f8729d759 |
|
20-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
DP: Switch to new interface
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
c3d2f8cd25021a120161505914f8c2a0cdfa8d25 |
|
19-Apr-2016 |
Sumit Bose <sbose@redhat.com> |
krb5_auth_store_creds: silence spurious debug message
During a pre-authentication request there are always messages like:
... [krb5_auth_store_creds] (0x0010): unsupported PAM command [249].
... [krb5_auth_store_creds] (0x0010): password not available, offline auth may not work.
This patch removes them.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
19e44537c28f6d5f011cd7ac885c74c1e892605f |
|
14-Jan-2016 |
Simo Sorce <simo@redhat.com> |
Krb5/PAM: Fix account lockout error handling
The krb5 provider was mapping KRB5KDC_ERR_CLIENT_REVOKED as
ERR_ACCOUNT_EXPIRED. This is incorrect as KRB5KDC_ERR_CLIENT_REVOKED is
returned by the KDC when an account lockout is in effect. When an account is
expired the kdc returns KRB5KDC_ERR_NAME_EXP.
Fix the mapping by adding a new ERR_ACCOUNT_LOCKOUT sssd_error code.
Resolves:
https://fedorahosted.org/sssd/ticket/2924
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
54189e0a2f24a2951d95a2ec5da3125a52e2f5ed |
|
07-Dec-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Handle preauth request timeout more gracefully
The error itself doesn't matter that much, because pam_sss.so handles
all preauth errors gracefully already, but the issue triggered a loud
and confusing debug message in the logs.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
10c07e188323a2f9824b5e34379f3b1a9b37759e |
|
23-Oct-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
FO: Use refcount to keep track of servers returned to callers
Resolves:
https://fedorahosted.org/sssd/ticket/2829
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
dd0a21738e1b71940bba11134734b5999e9fd8e9 |
|
21-Sep-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Offline operation with disabled domain
https://fedorahosted.org/sssd/ticket/2637
If a subdomain is in the disabled state, switch krb5_child operation
into offline mode.
Similarly, instead of marking the whole back end as offline, mark just
the domain as offline -- depending on the domain type, this would mark
the whole back end or just inactivate subdomain.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
67c68b563e1afc409aeadbcc828f9bdf33c57c84 |
|
05-Aug-2015 |
Sumit Bose <sbose@redhat.com> |
krb5: assume online state if KDC proxy is configured
If a KDC proxy is configured a request in the KRB5 provider will assume
online state even if the backend is offline without changing the state
of the backend.
Resolves https://fedorahosted.org/sssd/ticket/2700
Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b698a04b37ad33e3de5bee82edc6e0e7b5ba2cfe |
|
29-Jul-2015 |
Sumit Bose <sbose@redhat.com> |
krb5: do not send SSS_OTP if two factors were used
Resolves https://fedorahosted.org/sssd/ticket/2729
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
61015cf524973595d96a6d6a4502014922e56a74 |
|
22-Jul-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Use the right domain for case-sensitive flag
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
01ec08efd0e166ac6f390f8627c6d08dcc63ccc4 |
|
06-Jul-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Add and use krb5_auth_queue_send to queue requests by default
Resolves:
https://fedorahosted.org/sssd/ticket/2701
Previously, only the krb5 provides used to queue requests, which
resulted in concurrent authentication requests stepping on one another.
This patch queues requests by default.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
aa8a8318aaa3270e9d9957d0c22dec6342360a37 |
|
28-May-2015 |
Pavel Reichl <preichl@redhat.com> |
krb5: new option krb5_map_user
New option `krb5_map_user` providing mapping of ID provider names to
Kerberos principals.
Resolves:
https://fedorahosted.org/sssd/ticket/2509
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
9696ce0c9ff737c873ddbf54fab91355d71e8698 |
|
14-May-2015 |
Pavel Reichl <preichl@redhat.com> |
krb5: remove field run_as_user
run_as_user is set set but never read.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
2d0e7658198d1aa6e3926bf967ff683660249114 |
|
08-May-2015 |
Sumit Bose <sbose@redhat.com> |
krb5: try delayed online authentication only for single factor auth
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
c5ae04b2da970a3991f21173acae3e892198ce0c |
|
08-May-2015 |
Sumit Bose <sbose@redhat.com> |
krb5: save hash of the first authentication factor to the cache
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
4b1b2e60d0764fed289eada9a7afbfd1993cadcd |
|
08-May-2015 |
Sumit Bose <sbose@redhat.com> |
krb5-child: add preauth and split 2fa token support
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
fb045f6e5a9a7f8936ad6f89c28862dcd035a4fe |
|
08-May-2015 |
Sumit Bose <sbose@redhat.com> |
Add pre-auth request
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
2d40bf0ad9f03e345228cba4563091c91eb02f5b |
|
13-Dec-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
Skip CHAUTHTOK_PRELIM when using OTPs
https://fedorahosted.org/sssd/ticket/2484
When OTPs are used, we can only used each authtoken at most once. When
it comes to Kerberos password changes, this was only working previously
by accident, because the old authtoken was first used to verify the old
password is valid and not expired and then also to acquire a chpass
principal.
This patch looks at the user object in LDAP to check if the user has any
OTPs enabled. If he does, the CHAUTHTOK_PRELIM step is skipped
completely so that the OTP can be used to acquire the chpass ticket
later.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
61d2ccf1dae3f1e7fc987ae98cb5c493cc73a782 |
|
02-Dec-2014 |
Sumit Bose <sbose@redhat.com> |
krb5: make krb5 provider view aware
https://fedorahosted.org/sssd/ticket/2510
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
2745b0156f12df7a7eb93d57716233243658e4d9 |
|
18-Nov-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Move all ccache operations to krb5_child.c
The credential cache operations must be now performed by the krb5_child
completely, because the sssd_be process might be running as the sssd
user who doesn't have access to the ccaches.
src/providers/krb5/krb5_ccache.c is still linked against libsss_krb5
until we fix Kerberos ticket renewal as non-root.
Also includes a new error code that indicates that the back end should
remove the old ccache attribute -- the child can't do that if it's
running as the user.
Related:
https://fedorahosted.org/sssd/ticket/2370
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
7c5cd2e7711621af9163a41393e88896a91ac33b |
|
18-Nov-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Move checking for illegal RE to krb5_utils.c
Otherwise we would have to link krb5_child with pcre and transfer the
regex, which would be cumbersome. Check for illegal patterns when
expanding the template instead.
Related:
https://fedorahosted.org/sssd/ticket/2370
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
45aeb924ec3ac448bb8d174a5cc061ed98b147c7 |
|
18-Nov-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Move ccache-related functions to krb5_ccache.c
Add a new module krb5_ccache.c that contains all ccache-related
operations. The only user of this module shall be krb5_child.c as the
other modules will run unprivileged and accessing the ccache requires
either privileges of root or the ccache owner.
Related:
https://fedorahosted.org/sssd/ticket/2370
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
2368a0fc19bcd56581eccd8397289e4513a383a5 |
|
07-Nov-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
PAM: Remove authtok from PAM stack with OTP
We remove the password from the PAM stack when OTP is used to make sure
that other pam modules (pam-gnome-keyring, pam_mount) cannot use it anymore
and have to request a password on their own.
Resolves:
https://fedorahosted.org/sssd/ticket/2287
Reviewed-by: Nathaniel McCallum <npmccallum@redhat.com> |
3983d81f461a4f17736a516eb595f54df4bf4336 |
|
26-Mar-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Do not attempt to get a TGT after a password change using OTP
https://fedorahosted.org/sssd/ticket/2271
The current krb5_child code attempts to get a TGT for the convenience of
the user using the new password after a password change operation.
However, an OTP should never be used twice, which means we can't perform
the kinit operation after chpass is finished. Instead, we only print a
PAM information instructing the user to log out and back in manually.
Reviewed-by: Alexander Bokovoy <abokovoy@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> |
8ff4a9281cf2f22f506ade20b20f2ac55ec9be32 |
|
27-Nov-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Remove unused parameter from krb5_auth_store_creds |
a8fe2c7b26b81f7d0418e656c843749523eb0187 |
|
27-Nov-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Remove unused parameter from krb5_auth_cache_creds |
d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb |
|
15-Nov-2013 |
Michal Zidek <mzidek@redhat.com> |
SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2) |
4c08db0fb0dda3d27b1184248ca5c800d7ce23f0 |
|
15-Nov-2013 |
Michal Zidek <mzidek@redhat.com> |
SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 1) |
b3292840ebaa747a9fd596ff47cc5d18198361d0 |
|
15-Nov-2013 |
Michal Zidek <mzidek@redhat.com> |
SYSDB: Drop the sysdb_ctx parameter from the sysdb_search module |
5e57b8aadebb0f83450829c8178d897227bfe99a |
|
29-Oct-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Handle ERR_CHPASS_FAILED
The Kerberos provider didn't handle ERR_CHPASS_FAILED at all, which
resulted in the default return code (System Error) to be returned if
password change failed for pretty much any reason, including password
too recent etc. |
2105a6a63cb74bf009fb6e723e74f6ec075e1238 |
|
17-Oct-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Return PAM_ACCT_EXPIRED when logging in as expired AD user
If an expired AD user logs in, the SSSD receives
KRB5KDC_ERR_CLIENT_REVOKED from the KDC. This error code was not handled
by the SSSD which resulted in System Error being returned to the PAM
stack. |
047ed117f80c0fcc7710d930123af4f21233c369 |
|
07-Oct-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Remove ability to create public directories
Setting up public directories is the job of the admin, and
current sssd syntax can't express the actual intention of the admin with
regrads to which parts of the path should be public or private.
Resolves:
https://fedorahosted.org/sssd/ticket/2071 |
e2f37d4488c45921e87f07d8a911ac7dd5b94f53 |
|
27-Sep-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Use the correct domain when authenticating with cached password |
8c844405a785a03864b85295c604d0dc23b0e244 |
|
25-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Be more lenient on failures for old ccache
Fix a check for an error return code that can be returned when
the ccache is not found.
Even in case of other errors still do not fail authentication
but allow it to proceed using a new ccache file if necessary.
Related:
https://fedorahosted.org/sssd/ticket/2053 |
764aa04ee92dbbd0d1eca6703294135eb97fda6d |
|
23-Sep-2013 |
Sumit Bose <sbose@redhat.com> |
krb5: save canonical upn to sysdb
If the returned TGT contains a different user principal name (upn) than
used in the request, i.e. the upn was canonicalized, we currently save
it to sysdb into the same attribute where the upn coming from an LDAP
server is stored as well. This means the canonical upn might be
overwritten when the user data is re-read from the LDAP server.
To avoid this this patch add a new attribute to sysdb where the
canonical upn is stored and makes sure it is used when available.
Fixes https://fedorahosted.org/sssd/ticket/2060 |
10bc88ac09ada43256119b8e0654458830f88156 |
|
12-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
KRB: Remove unused function parameters
Parameter "int *dp_err" and parameter "int *pam_status" were unused
in static function krb5_auth_prepare_ccache_name. |
dd7d72ec4e76ae781d739f0139e2ec43af9cf09b |
|
12-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
KRB: Remove unused memory context
mem_ctx was unused in function get_domain_or_subdomain |
14050f35224360883e20ebd810d3eb40f39267cf |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Add file/dir path precheck
Add a precheck on the actual existence at all of the file/dir ccname
targeted (for FILE/DIR types), and bail early if nothing is available.
While testing I found out that without this check, the krb5_cc_resolve()
function we call as user to check old paths would try to create the
directory if it didn't exist.
With a ccname of DIR:/tmp/ccdir_1000 saved in the user entry this would
cause two undesirable side effects:
First it would actually create a directory with the old name, when it
should not.
Second, because for some reason the umask is set to 0127 in sssd_be, it
would create the directory with permission 600 (missing the 'x' traverse
bit on the directory. If the new ccache has the same name it would cause
the krb5_child process to fal to store the credential cache in it.
Related:
https://fedorahosted.org/sssd/ticket/2061 |
d20a5a74666413cadbf64c02eb656a5a3b4bb1de |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Remove unused ccache backend infrastructure
Remove struct sss_krb5_cc_be and the remaining functions that reference
it as they are all unused now.
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
1c022b3556f442f57326c4a3f250128b1bd232ae |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Unify function to create ccache files
Only 2 types (FILE and DIR) need to precreate files or directories
on the file system, and the 2 functions were basically identical.
Consolidate all in one common function and use that function directly
where needed instead of using indirection.
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
84ce563e3f430eec1225a6f8493eb0a6c9a3013a |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Use new function to validate ccaches
This function replaces and combines check_for_valid_tgt() and type specific
functions that checked for ccache existence by using generic krb5 cache
function and executing them as the target user (implicitly validate the
target use rcan properly access the ccache).
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
5dc3b01fd9b2fa244e7c2820ce04602c9f059370 |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: move template check to initializzation
The randomized template check realy only makes sense for the FILE ccache
which is the only one that normally needs to use randomizing chars.
Also it is better to warn the admin early rather than to warn 'when it
is too late'.
So move the check at initialization time when we determine what the
template actually is.
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
bfd32c9e8f302d7722838a68572c6801f5640657 |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Move determination of user being active
The way a user is checked for being active does not depend on the ccache
type so move that check out of the ccache specific functions.
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
1536e39c191a013bc50bb6fd4b8eaef11cf0d436 |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Replace type-specific ccache/principal check
Instead of having duplicate functions that are type custom use a signle common
function that also performs access to the cache as the user owner, implicitly
validating correctness of ownership.
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
a70e88f62e8ba48c5042b881f20ed6586cb135a8 |
|
09-Sep-2013 |
Simo Sorce <simo@redhat.com> |
krb5: Use krb5_cc_destroy to remove old ccaches
This completely replaces the per-ccache-type custom code to remove old cacches
and instead uses libkrb5 base doperations (krb5_cc_destroy) and operating as
the user owner.
Resolves:
https://fedorahosted.org/sssd/ticket/2061 |
dcc6877aa2e2dd63a9dc9c411a9c58feaeb36b9a |
|
28-Aug-2013 |
Stephen Gallagher <sgallagh@redhat.com> |
krb5: Fetch ccname template from krb5.conf
In order to use the same defaults in all system daemons that needs to know how
to generate or search for ccaches we introduce ode here to take advantage of
the new option called default_ccache_name provided by libkrb5.
If set this variable we establish the same default for all programs that surce
it out of krb5.conf therefore providing a consistent experience across the
system.
Related:
https://fedorahosted.org/sssd/ticket/2036 |
e5d5a93ab88e5313a11056130060662c97285336 |
|
18-Jul-2013 |
Ondrej Kos <okos@redhat.com> |
KRB: Replace multiple calls with variable
Instead of multiple calls of sss_authtok_get_type, perform the call just
once and store into variable. |
feece80b0f52ebe883d8e211cfe8faa93bd991f7 |
|
18-Jul-2013 |
Ondrej Kos <okos@redhat.com> |
KRB: Handle empty password gracefully
https://fedorahosted.org/sssd/ticket/1814
Return authentication error when empty password is passed. |
80a874555d8b2737827bb150133ba70a83c65bb7 |
|
27-Jun-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: guess UPN for subdomain users |
6bfbfefd65a7875a1fb28631d581eec11a758975 |
|
24-Jun-2013 |
Sumit Bose <sbose@redhat.com> |
KRB5: use the right authtok type for renewals |
22a21e910fd216ec1468fe769dcc29f1621a52a4 |
|
14-Jun-2013 |
Ondrej Kos <okos@redhat.com> |
KRB: Handle preauthentication error correctly
https://fedorahosted.org/sssd/ticket/1873
KRB preauthentication error was later mishandled like authentication error. |
b2d781036956bb984c3403267e797afd3594762c |
|
14-May-2013 |
Sumit Bose <sbose@redhat.com> |
Always update cached upn if enterprise principals are used
Instead of continuing to use the initial upn if enterprise principals
are used if should always be replaced. The enterprise principal
is stored in the credential cache and without knowing it the
ccache_for_princ() calls to determine the location of the credential
cache will fail.
Fixes https://fedorahosted.org/sssd/ticket/1921 |
42084c0f500ba849393b0e87477cd1af397ddecb |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Only check UPN if enterprise principals are not used
If enterprise principals are enabled (which is the default in the AD
provider), then the returned UPN might be slightly different from
the one SSSD constructs before attempting the login. This patch makes
SSSD only check if the principal is the same when the enterprise
principals are disabled. |
9d890186ec2b511aa30a9574543f29e1ef56e0e8 |
|
12-Apr-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix krbcc dir creation issue with MIT krb5 1.11
In krb5-libs >= 1.11, function krb5_cc_resolve verify if credential cache dir
exists. If it doesn't exist, than it will be created with process permissions
and not user permissions.
Function cc_residual_is_used has already checked for non existing
directory, but it wasn't considered to be a failure and therefore next call
of krb5_init_context will create directory with wrong permissions.
Now if directory doesn't exist, it will be handled like there was not ccache
attribute in sysdb cache. We also check if "primary" file in ccache directory
has right permissions. But we ignore missing "primary" file.
https://fedorahosted.org/sssd/ticket/1822 |
1b171c456ff901ab622e44bcfd213f7de86fd787 |
|
03-Apr-2013 |
Ariel Barria <olivares73@hotmail.com> |
Allow setting krb5_renew_interval with a delimiter
https://fedorahosted.org/sssd/ticket/902
changed the data type the krb5_renew_interval to string.
function krb5_string_to_deltat is used to convert and allow delimiters |
9acfb09f7969a69f58bd45c856b01700541853ca |
|
02-Apr-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Making the authtok structure really opaque.
Definition of structure sss_auth_token was removed from header file
authtok.h and there left only declaration of this structure.
Therefore only way how to use this structure is to use accessory function from
same header file.
To creating new empty authotok can only be used newly created function
sss_authtok_new(). TALLOC context was removed from copy and setter functions,
because pointer to stuct sss_auth_token is used as a memory context.
All declaration of struct sss_auth_token variables was replaced with
pointer to this structure and related changes was made in source code.
Function copy_pam_data can copy from argument src which was dynamically
allocated with function create_pam_data() or zero initialized struct pam_data
allocated on stack.
https://fedorahosted.org/sssd/ticket/1830 |
aced7f5305d34d8c29cc2c282982e1e8f0953530 |
|
18-Mar-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Retry the correct service on krb5 child timeout |
b40583c6d52b72e41bf01106534535e54b4fba4f |
|
08-Mar-2013 |
Nathaniel McCallum <npmccallum@redhat.com> |
Add support for krb5 1.11's responder callback.
krb5 1.11 adds support for a new method for responding to
structured data queries. This method, called the responder,
provides an alternative to the prompter interface.
This patch adds support for this method. It takes the password
and provides it via a responder instead of the prompter. In the
case of OTP authentication, it also disables the caching of
credentials (since the credentials are one-time only). |
c6872e79e8496fd075e20aec0343ade99cca725c |
|
04-Mar-2013 |
Simo Sorce <simo@redhat.com> |
Cleanup error message handling for krb5 child
Use the new internal SSSD errors, to simplify error handling.
Instead of using up to 3 different error types (system, krb5 and
pam_status), collapse all error reporting into one error type mapped
on errno_t.
The returned error can contain either SSSD internal errors, kerberos
errors or system errors, they all use different number spaces so there
is no overlap and they can be safely merged.
This means that errors being sent from the child to the parent are not
pam status error messages anymore.
The callers have been changed to properly deal with that.
Also note that this patch removes returning SSS_PAM_SYSTEM_INFO from
the krb5_child for kerberos errors as all it was doing was simply to
make the parent emit the same debug log already emitted by the child,
and the code is simpler if we do not do that. |
cbaba2f47da96c4191971bce86f03afb3f88864a |
|
21-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add be_req_get_data() helper funciton.
In preparation for making struct be_req opaque. |
03abdaa21ecf562b714f204ca42379ff08626f75 |
|
21-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add be_req_get_be_ctx() helper.
In preparation for making be_req opaque |
8e5549e453558d4bebdec333a93e215d5d6ffaec |
|
21-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Introduce be_req_terminate() helper
Call it everywhere instead of directly dereferencing be_req->fn
This is in preparation of making be_req opaque. |
df0596ec12bc5091608371e2977f3111241e8caf |
|
21-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Remove sysdb as a be context structure member
The sysdb context is already available through the 'domain' structure. |
74ac1c2834cd8961ed9e7cadcfe28b113bffe4de |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_cache_auth() |
777f5bc1fb5f2ba4267de83843beee51090eb8d5 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_cache_password() |
3f94d6718d44185137e13b6d326dfd63e8dc61c6 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_set_user_attr() |
5d78919c955c945e78865f322726aac075c71203 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_get_user_attr() |
64af76e2bef2565caa9738f675c108a4b3789237 |
|
10-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Change pam data auth tokens.
Use the new authtok abstraction and interfaces throught the code. |
c83e409297711e6012a164cc929c758a3f38e9b9 |
|
10-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Code can only check for cached passwords
Make it clear to the API users that we can not take arbitrary auth tokens.
We can only take a password for now so simplify and clarify the interface. |
8914b982dd70e1a68d7b7fd55951b854ce9abc9b |
|
10-Dec-2012 |
Pavel Březina <pbrezina@redhat.com> |
let krb5_kpasswd failover work
https://fedorahosted.org/sssd/ticket/1680
There were two errors:
1. kr->kpasswd_srv was never set
2. bad service name (KERBEROS) was provided when setting port status,
thus the port status never changed |
7baccb545ac9829b7e1990f45ff6f70e2de55c2a |
|
04-Dec-2012 |
Simo Sorce <simo@redhat.com> |
Fix tevent_req style for krb5_auth
No functionality changes,
just make the code respect the tevent_req style and naming conventions
and enhance readability by adding some helper functions. |
6c7584a32899bf573f62cf8c3fb37410a8ec05bb |
|
12-Nov-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Do not always return PAM_SYSTEM_ERR when offline krb5 authentication fails |
7c4845bd0efb1dcb44b5be52923c539316725693 |
|
26-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
krb5_auth: update with correct UPN if needed
The Active Directory KDC handles request case in-sensitive and it might
not always to possible to guess the UPN with the correct case. We check
if the returned principal has a different case then the one used in the
request and updates the principal if needed. This will help using calls
from the Kerberos client libraries later on which would otherwise fail
because the principal is handled case sensitive by those libraries. |
964628ab89229e9266adc5f4f8a26222734788b7 |
|
26-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
Use find_or_guess_upn() where needed |
cac29dc2ece94180de33b52c113865bbab49b252 |
|
26-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
krb5_mod_ccname: replace wrong memory context |
83f24636ef8d3d2b9c5be46272781ed5e0497ca7 |
|
26-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
krb5_auth: check if principal belongs to a different realm
Add a flag if the principal used for authentication does not belong
to our realm. This can be used to act differently for users from other
realms. |
d29e91321d175dce94d87c23a44ced40d265de2c |
|
26-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
krb5_auth_send: check for sub-domains
If there is an authentication request for a user from a sub-domain a
temporary sysdb context is generated to allow lookups in the
corresponding sub-tree in the cache. |
8fe574521b7f8b14e17aea1d9afb471b80761b83 |
|
04-Oct-2012 |
Ondrej Kos <okos@redhat.com> |
Log possibly non-randomizable ccache file template
fixes https://fedorahosted.org/sssd/ticket/1533
ccache file template is now checked for appended XXXXXX for use with
mkstemp. When those characters are not present, warning is written to log. |
d25e7c659361ebd794ef011dc9305543f266e8c4 |
|
13-Sep-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
FO: Check server validity before setting status
The list of resolved servers is allocated on the back end context and
kept in the fo_service structure. However, a single request often
resolves a server and keeps a pointer until the end of a request and
only then gives feedback about the server based on the request result.
This presents a big race condition in case the SRV resolution is used.
When there are requests coming in in parallel, it is possible that an
incoming request will invalidate a server until another request that
holds a pointer to the original server is able to give a feedback.
This patch simply checks if a server is in the list of servers
maintained by a service before reading its status.
https://fedorahosted.org/sssd/ticket/1364 |
3f5016f66ae1351e9884157a13192f97849a5c05 |
|
10-Sep-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Add a missing string argument |
6b758f3a86da4e7a1924d46eebda0f3144c8c979 |
|
10-Sep-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: cancel the sysdb transaction on one place only
https://fedorahosted.org/sssd/ticket/1516
If sysdb_set_user_attr failed, we would cancel the transaction, then go
to the error handler and attempt to close it again. |
21d485184df986e1a123f70c689517386e51a5ce |
|
23-Aug-2012 |
Michal Zidek <mzidek@redhat.com> |
Unify usage of sysdb transactions
Removing bad examples of usage of sysdb_transaction_start/commit/end
functions and making it more consistent (all files except of
src/db/sysdb_*.c). |
819bb0b77780fc9009608f48ad353a2cb58fa9ac |
|
15-Aug-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
KRB5: Only return PAM error for unreachable kpasswd when performing chpass
https://fedorahosted.org/sssd/ticket/1452 |
e48780b854ac32b0fe35b607446d733486765fbe |
|
29-Jun-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
KRB5: Initialize the credential cache type properly
We weren't guaranteeing that the cctype-specific callbacks were
initialized before using them.
This bug only presented itself for users who were logging in
without a ccacheFile attribute in the LDB (for example, first-time
logins). |
fd8595874aa06c8057740001ec465ba76b4af142 |
|
14-Jun-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Add a credential cache back end structure
To be able to add support for new credential cache types easily, this
patch creates a new structure sss_krb5_cc_be that defines common
operations with a credential cache, such as create, check if used or remove. |
7b14a9e64fd248103149eb1cb422ee752d91ba58 |
|
14-Jun-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Split parse_krb5_child_response so it can be reused
krb5-child-test will be another consumer. It also makes the code more
readable by splitting a huge function. |
4e3b55b5f6be51b03c8c51f764aa71677d184847 |
|
07-May-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Only reset kpasswd server status when performing a chpass operation
https://fedorahosted.org/sssd/ticket/1316 |
bf8cce77a35cb0a3cdb0d21fb9c39b7b6372bc11 |
|
04-May-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Modify behavior of pam_pwd_expiration_warning
New option pwd_expiration_warning is introduced which can be set per
domain and can override the value specified by the original
pam_pwd_expiration_warning.
If the value of expiration warning is set to zero, the filter isn't
apllied at all - if backend server returns the warning, it will be
automatically displayed.
Default value for Kerberos: 7 days
Default value for LDAP: don't apply the filter
Technical note: default value when creating the domain is -1. This is
important so we can distinguish between "no value set" and 0. Without
this possibility it would be impossible to set different values for LDAP
and Kerberos provider. |
606d2d03833903f00d40f9810d4dccd04a752e76 |
|
08-Mar-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Detect cycle in the fail over on subsequent resolve requests only |
b300bad539e9a9ad7f3a88dc91253afff0425cb6 |
|
06-Mar-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Only do one cycle when resolving a server
https://fedorahosted.org/sssd/ticket/1214 |
58e75994a4c03057072c0ed54cefe0965a6a4057 |
|
06-Jan-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Do not call krb5_child when changing passwords and provider went offline
https://fedorahosted.org/sssd/ticket/1131 |
85ecf49fdacd910f804caab1be7bf68d23702dc9 |
|
21-Dec-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Honor case sensitive flag when creating the ccname template |
87c07559af5cfcd2752295ef7c425bd3205f426f |
|
19-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Move child_common routines to util |
ac3a1f3da772cf101101c31675c63dc3549b21b5 |
|
22-Nov-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Cleanup: Remove unused parameters |
e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb |
|
15-Aug-2011 |
Jan Zeleny <jzeleny@redhat.com> |
sysdb refactoring: memory context deleted
This patch deletes memory context parameter in those places in sysdb
where it is not necessary. The code using modified functions has been
updated. Tests updated as well. |
8a1738f9379a1b8fb5c95c3df649e014ff5a1434 |
|
15-Aug-2011 |
Jan Zeleny <jzeleny@redhat.com> |
sysdb refactoring: deleted domain variables in sysdb API
The patch also updates code using modified functions. Tests have also
been adjusted. |
9df7cbe4007edeb71477fd5647e26b839f4f5813 |
|
15-Jun-2011 |
Sumit Bose <sbose@redhat.com> |
Fix two typos |
00b53b97208cf35de296a1fa9b9c9052a820036e |
|
15-Jun-2011 |
Sumit Bose <sbose@redhat.com> |
Delete cached ccache file if password is expired |
fffdae81651b460f3d2c119c56d5caa09b4de42a |
|
29-Apr-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix bad password caching when using automatic TGT renewal
Fixes CVE-2011-1758, https://fedorahosted.org/sssd/ticket/856 |
5e88215456689003466c471605139cc41c154eb1 |
|
19-Apr-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Always generate kpasswdinfo file
Previously, we only generated it when performing a password change,
but this didn't play nicely with kpasswd. |
76e46bf6e6a105d0224670db901a9e3910ed6df0 |
|
08-Mar-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Remove unused sysdb_attrs object |
3182049e4af4b79dd231fad83ed041915daa7e31 |
|
21-Dec-2010 |
Sumit Bose <sbose@redhat.com> |
Fix potential NULL-dereference in krb5_auth_done()
https://fedorahosted.org/sssd/ticket/745 |
7d436b1bd6bcca29aa9874adc11bdfb862139cd8 |
|
20-Dec-2010 |
Sumit Bose <sbose@redhat.com> |
Serialize requests of the same user in the krb5 provider |
589dd0f6600515926e4e514442c62366db0a62b3 |
|
20-Dec-2010 |
Sumit Bose <sbose@redhat.com> |
Fixes for automatic ticket renewal
- do not recreate the ccache file when renewing the TGT
- use user principal name as hash key instead of ccfile name
- let krb5_child return Kerberos error codes |
5843ad321944a028f6dee7e1fd4f9381c4953d07 |
|
07-Dec-2010 |
Sumit Bose <sbose@redhat.com> |
Add support for FAST in krb5 provider |
f3f9ce8024d7610439d6c70ddafab1ab025cf8a8 |
|
03-Dec-2010 |
Sumit Bose <sbose@redhat.com> |
Add support for automatic Kerberos ticket renewal |
1709edfb690bb4ffa4b96c64d08853f47390eda3 |
|
03-Dec-2010 |
Sumit Bose <sbose@redhat.com> |
krb5_child returns TGT lifetime |
b87233035e26cee919dcf46adaec29ba7fdaa51e |
|
04-Nov-2010 |
Sumit Bose <sbose@redhat.com> |
Make handle_child_* request public
I took the opportunity to move everything related to the handling of the
krb5_child into a separate file and cleaned the interfaces and related
structures a bit. |
fab9c6a75eaf09e4f5440f4bb530c26009b0ffc7 |
|
04-Nov-2010 |
Sumit Bose <sbose@redhat.com> |
Make krb5_setup() public |
0bbe2065770968c70fd305da4f6eda1a360a3f1b |
|
04-Nov-2010 |
Sumit Bose <sbose@redhat.com> |
Add krb5_get_simple_upn() |
1e29e68388c2e9c5da9cb0afe997bc1b4e6933be |
|
04-Nov-2010 |
Sumit Bose <sbose@redhat.com> |
Add infrastructure for Kerberos access provider |
92836f366dbfafe978f8ab009f20292d68ee55ee |
|
01-Nov-2010 |
Sumit Bose <sbose@redhat.com> |
Fix two return value checks |
b2ef0ef73ead4b9ee42dca3d704df2ce75ddeb63 |
|
01-Nov-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix incorrect free of req in krb5_auth.c |
13901dfa7292540b8e2475065c7d977a80cb2ae2 |
|
02-Sep-2010 |
Jan Zeleny <jzeleny@redhat.com> |
Fixed potential comparison of undefined variable
If the allocation on line 678 failed, the value of ret was undefined
in following comparison. ENOMEM is now assigned before the comparison.
Ticket: #578 |
c2caac87520c2f5a7db764d4827d1ad4cadcb696 |
|
26-May-2010 |
Sumit Bose <sbose@redhat.com> |
Fix handling of ccache file when going offline
The ccache file was removed too early if system is offline but the
backend was not already marked offline. Now we remove the ccache file
only if the successfully got a new one and it is not the same as the old
one. |
02e38eae1b9cb5df2036a707dafd86f6047c17de |
|
26-May-2010 |
Sumit Bose <sbose@redhat.com> |
Add support for delayed kinit if offline
If the configuration option krb5_store_password_if_offline is set to
true and the backend is offline the plain text user password is stored
and used to request a TGT if the backend becomes online. If available
the Linux kernel key retention service is used. |
06c03627c81a5252420931383a68eb67ba551667 |
|
26-May-2010 |
Sumit Bose <sbose@redhat.com> |
Handle Krb5 password expiration warning |
ef3dc7ce13049e6c344850bec1241af69735bfe9 |
|
26-May-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Try all servers during Kerberos auth
The Kerberos backend would previously try only the first server and if
it was unreachable, it immediatelly went offline. |
af971fb6cf853c3a5f41aa00918013903aba1ff3 |
|
16-May-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Properly set up SIGCHLD handlers
Instead of having all-purpose SIGCHLD handlers that try to catch
every occurrence, we instead create a per-PID handler. This will
allow us to specify callbacks to occur when certain children exit. |
5f2593e24f565b202821329f1f9cb103241d80bb |
|
16-May-2010 |
Sumit Bose <sbose@redhat.com> |
Make Kerberos authentication a tevent_req
To allow other providers to include Kerberos authentication the main
part is put into a tevent request. |
bd290f62727b8903d889705a9d129ee6c9d62bc9 |
|
26-Apr-2010 |
Sumit Bose <sbose@redhat.com> |
Display a message if a password reset by root fails |
08d9d10747da6900971cdd8fced05ca66f5111e2 |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: convert sysdb_get_user_attr |
d8d877a5fcde1defdd1a438df020e087339873a0 |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
Remove remaining use of sysdb_transaction_send |
bb0b6b4e39242577f60729fbcbd9e46e7a7af30d |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: convert sysdb_cache_password |
506d34d2e84268c6589f613de0cb3992b8fb87a6 |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: convert sysdb_set_entry/user/group_attr |
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 |
5096bb4c2242b426aa6f5ea2cb82223e0b81a345 |
|
12-Mar-2010 |
Sumit Bose <sbose@redhat.com> |
Add krb5_kpasswd option |
29752834fbf3a19e4e117668abfce4e4c7c48ee4 |
|
11-Mar-2010 |
Sumit Bose <sbose@redhat.com> |
Add expandable sequences to krb5_ccachedir
As with krb5_ccname_template sequences like %u can be used in the
krb5_ccachedir parameter which are expanded at runtime. If the directory
does not exist, it will be created. Depending on the used sequences it
is created as a public or private directory. |
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. |
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. |
953e07b7c43bc9bb7c7616180b1ba1730e22c59a |
|
19-Feb-2010 |
Sumit Bose <sbose@redhat.com> |
Remove unneeded items from struct pam_data |
872f00c1956630ae05a8d956e2a6ff9d12659512 |
|
19-Feb-2010 |
Sumit Bose <sbose@redhat.com> |
Send Kerberos environment after password change |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |