summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
...
* Added some kerberos functions for building on RHEL5Jan Zeleny2011-05-052-5/+188
|
* Override config file debug_level with command-lineStephen Gallagher2011-05-043-9/+16
| | | | | | | | | | | This patch also makes the following changes: 1) The [sssd] debug_level setting no longer acts as a default for all other sections. 2) We will now skip passing the debug argument to the child processes from the master unless the SSSD was run with a command-line argument for the debug level. https://fedorahosted.org/sssd/ticket/764
* Modify principal selection for keytab authenticationJan Zeleny2011-04-252-2/+180
| | | | | | | | | | | | | | | | 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
* Extend and move function for finding principal in keytabJan Zeleny2011-04-252-0/+161
| | | | | | | | The function now supports finding principal in keytab not only based on realm, but based on both realm and primary/instance parts. The function also supports * wildcard at the beginning or at the end of primary principal part. The function for finding principal has been moved to util/sss_krb5.c, so it can be used in other parts of the code.
* Don't pass NULL to printf for TLS errorsJakub Hrozek2011-04-082-0/+33
| | | | https://fedorahosted.org/sssd/ticket/643
* Fix uninitialized value errorSumit Bose2011-01-211-1/+1
|
* NSS obfuscation code cleanupJakub Hrozek2011-01-201-38/+97
| | | | https://fedorahosted.org/sssd/ticket/752
* Add overflow check to SAFEALIGN_COPY_*_CHECK macrosSumit Bose2011-01-111-3/+6
|
* Validate user supplied size of data itemsSumit Bose2011-01-111-0/+5
| | | | | | Specially crafted packages might lead to an integer overflow and the parsing of the input buffer might not continue as expected. This issue was identified by Sebastian Krahmer <krahmer@suse.de>.
* Introduce sss_hash_create_ex()Sumit Bose2010-12-202-6/+29
|
* Fix unchecked return value in sss_krb5_verify_keytab_exStephen Gallagher2010-12-171-1/+8
| | | | https://fedorahosted.org/sssd/ticket/711
* Fix invalid sizeof in pidfileStephen Gallagher2010-12-161-1/+1
| | | | https://fedorahosted.org/sssd/ticket/730
* Add missing break statement to sss_hash_createStephen Gallagher2010-12-141-0/+1
| | | | https://fedorahosted.org/sssd/ticket/720
* Fix build issue with older Kerberos librarySumit Bose2010-12-081-0/+7
|
* Add support for FAST in krb5 providerSumit Bose2010-12-072-0/+62
|
* krb5_child returns TGT lifetimeSumit Bose2010-12-031-0/+6
|
* Add a special filter type to handle enumerationsSumit Bose2010-12-021-0/+2
|
* Make default SIGTERM and SIGINT handlers use teventStephen Gallagher2010-12-021-1/+33
|
* Add missing error codeSumit Bose2010-11-181-0/+1
|
* Add utility function to sanitize LDAP/LDB filtersStephen Gallagher2010-11-152-0/+63
| | | | Also adds a unit test.
* Handle errors during log reopening betterStephen Gallagher2010-11-051-2/+28
|
* Always use uint32_t for UID/GID numbersJakub Hrozek2010-10-262-4/+4
|
* Write log opening failures to the syslogStephen Gallagher2010-10-191-0/+3
| | | | | If there is a problem with reopening the logs, it can be an audit trail issue.
* Use unsigned long for conversion to id_tJakub Hrozek2010-10-181-4/+4
| | | | | | | | We used strtol() on a number of places to convert into uid_t or gid_t from a string representation such as LDAP attribute, but on some platforms, unsigned long might be necessary to store big id_t values. This patch converts to using strtoul() instead.
* Add a missing include fileSumit Bose2010-10-131-0/+1
| | | | | strcasecmp() is defined in strings.h which might not be included under certain conditions.
* Add common hash table setupStephen Gallagher2010-10-082-0/+58
| | | | | sss_hash_create() produces a dhash table living in the talloc hierarchy.
* Use new MIT krb5 API for better password expiration warningsSumit Bose2010-09-232-2/+26
|
* Fix parameter order when initializing decryptionJakub Hrozek2010-09-151-1/+1
|
* Dead assignments cleanup in various places in SSSDJan Zeleny2010-09-081-1/+1
| | | | | | Three assignments deleted, two return code inspection added. Also found and fixed one critical bug caused by dead assignment. Ticket: #590
* Password obfuscation utility functionsJakub Hrozek2010-09-083-0/+510
| | | | | | | Adds two utility functions to obfuscate a password and inverse to extract the cleartext password back. So far, only NSS-based implementation is provided.
* Add safe copy/move macros for uint16_tJakub Hrozek2010-09-081-1/+11
|
* Move crypto functions into its own subdirJakub Hrozek2010-09-085-42/+109
| | | | | | A refactoring patch that creates a common util/crypto subdir with per-implementation subdirectories for each underlying crypto library supported by SSSD.
* Add dup_string_list() utility functionStephen Gallagher2010-08-032-0/+37
|
* Add diff_string_lists utility functionStephen Gallagher2010-08-032-0/+209
| | | | Includes a unit test
* Validate keytab at startupJakub Hrozek2010-08-032-0/+162
| | | | | | | | 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
* Add log notifications for startup and shutdown.Stephen Gallagher2010-07-091-1/+4
|
* Add sss_log() functionStephen Gallagher2010-07-092-0/+81
| | | | | Right now, this log function writes to the syslog. In the future, it could be modified to work with ELAPI or another logging API.
* Resend SIGINT as SIGTERM in servicesJakub Hrozek2010-06-281-0/+3
| | | | Fixes: #462
* Initialize len before looping to read the pidfileStephen Gallagher2010-06-171-1/+1
| | | | https://fedorahosted.org/sssd/ticket/544
* Check closedir call in find_uidJakub Hrozek2010-06-141-4/+9
| | | | Fixes: #503
* get_uid_from_pid should use fstat rather than lstatJakub Hrozek2010-06-141-11/+11
| | | | Fixes: #541
* Fix misuse of errno in find_uid.cStephen Gallagher2010-06-101-17/+26
|
* Properly handle read() and write() throughout the SSSDStephen Gallagher2010-06-103-12/+57
| | | | | | | We need to guarantee at all times that reads and writes complete successfully. This means that they must be checked for returning EINTR and EAGAIN, and all writes must be wrapped in a loop to ensure that they do not truncate their output.
* Move parse_args() to utilSumit Bose2010-05-272-0/+101
|
* Add ldap_krb5_ticket_lifetime optionSumit Bose2010-05-161-0/+5
|
* Clean up kdcinfo and kpasswdinfo files when exitingStephen Gallagher2010-05-072-1/+2
|
* Support SRV servers in failoverJakub Hrozek2010-04-301-0/+16
| | | | | | | | | | | | | | | Adds a new failover API call fo_add_srv_server that allows the caller to specify a server that is later resolved into a list of specific servers using SRV requests. Also adds a new failover option that specifies how often should the servers resolved from SRV query considered valid until we need a refresh. The "real" servers to connect to are returned to the user as usual, using the fo_resolve_service_{send,recv} calls. Make SRV resolution work with c-ares 1.6
* Avoid accessing half-deallocated memory when using talloc_zfree macro.eindenbom2010-04-161-1/+5
| | | | | | The correct memory deallocation sequence is: - clear pointer to memory first - then deallocate memory
* Protect against check-and-open race conditionsStephen Gallagher2010-04-062-28/+77
| | | | | | | | | | | | | | | | | There is a small window between running lstat() on a filename and opening it where it's possible for the file to have been modified. We were protecting against this by saving the stat data from the original file and verifying that it was the same file (by device and inode) when we opened it again, but this is an imperfect solution, as it is still possible for an attacker to modify the permissions during this window. It is much better to simply open the file and test on the active file descriptor. Resolves https://fedorahosted.org/sssd/ticket/425 incidentally, as without the initial lstat, we are implicitly accepting symlinks and only verifying the target file.
* Allow arbitrary-length PAM messagesStephen Gallagher2010-03-251-3/+8
| | | | | | | | | 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