summaryrefslogtreecommitdiffstats
path: root/src/sss_client/common.c
Commit message (Collapse)AuthorAgeFilesLines
* PAC client: add basic support in common client codeSumit Bose2012-06-211-0/+33
|
* Do not send SIGPIPE on disconnectionShantanu Goel2012-06-181-6/+21
| | | | | | | | Note we set MSG_NOSIGNAL to avoid having to fiddle with signal masks but also do not want to die in case SIGPIPE gets raised and the application does not handle it.
* Set return errno to the value prior to calling close().Shantanu Goel2012-06-181-2/+2
|
* SSH: Common client codeJan Cholasta2012-02-071-0/+19
|
* AUTOFS: a client libraryJakub Hrozek2012-02-051-0/+20
| | | | | | | | | | | | | | | This is the library the autofs client is using. automounter dlopen()s the library so there is no header file, no pkgconfig file and the library is in the libsss_autofs package, not in -devel. The library provides the following interface: * _sss_setautomntent() - select the map for processing * _sss_getautomntent_r() - iterates through key/value pairs in the selected map. The key is usually the mount point, the value is mount information (server:/export) * _sss_getautomntbyname_r() - returns value for a specific key. * _sss_endautomntent() deselect a map, clean up
* NSS: Add sss_readrep_copy_stringStephen Gallagher2012-01-181-0/+30
| | | | | | | There were many places in the client code where we were duplicating a loop to copy data in from the response buffer. This patch turns those loops into a function for easier maintenance and easier-to-read *readrep() routines.
* SUDO integration - client common interfacePavel Březina2011-12-161-0/+18
|
* Fixed implicit declaration of function 'time' in src/sss_client/common.c.Pavel Březina2011-08-081-0/+1
|
* sss_client: avoid leaking file descriptorsSimo Sorce2011-07-291-0/+3
| | | | | | | | | | If a pam or nss module is dlcolse()d and unloaded we were leaking the file descriptor used to communicate to sssd in the process. Make sure the fucntion used to close the socket file descriptor is called on dlclose() Silence autoconf 2.28 warnings (Patch by Jakub Hrozek)
* Set _GNU_SOURCE globallySumit Bose2011-05-231-3/+1
|
* clients: use poll instead of selectSimo Sorce2011-05-031-9/+6
| | | | | | | select is limited to fd numbers up to 1024, we need to use poll() here to avoid causing memory corruption in the calling process. Fixes: https://fedorahosted.org/sssd/ticket/861
* Use neutral name for functions used by both pam and nssSimo Sorce2011-02-111-48/+62
|
* Check that the socket is really ours before attempting to close it.Simo Sorce2011-02-081-13/+42
| | | | Fixes: https://fedorahosted.org/sssd/ticket/790
* Fix another possible memory leak in sss_nss_recv_rep()Sumit Bose2010-12-151-8/+19
| | | | https://fedorahosted.org/sssd/ticket/723
* Fix possible memory leak in sss_nss_recv_rep()Sumit Bose2010-12-141-8/+13
| | | | https://fedorahosted.org/sssd/ticket/723
* sss_client: make code thread-safeSimo Sorce2010-11-221-8/+60
| | | | | | | | | | Add mutexes around nss operations and serialize them. This is necessary because nss operations may have global state. For pam it is sufficient to protect socket operations instead. As pam functions use only the provided pam handler. Fixes: https://fedorahosted.org/sssd/ticket/640
* Fix incorrect type comparisonStephen Gallagher2010-11-151-1/+1
| | | | https://fedorahosted.org/sssd/ticket/657
* Add utility function sss_strnlen()Stephen Gallagher2010-10-131-0/+29
| | | | This is useful for guaranteeing the size of an input buffer.
* Allow sssd clients to reconnectSumit Bose2010-07-231-4/+3
| | | | | | | Currently the PAM and NSS client just return an error if there are problems on an open socket. This will lead to problems in long running programs like gdm if sssd is restarted, e.g. during an update. With this patch the socket is closed and reopened.
* Properly handle read() and write() throughout the SSSDStephen Gallagher2010-06-101-0/+16
| | | | | | | 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.
* Use SO_PEERCRED on the PAM socketSumit Bose2010-04-161-1/+80
| | | | | | | | | | | | | | | | | 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
* Revert "Add better checks on PAM socket"Sumit Bose2010-04-161-122/+4
| | | | This reverts commit 5a88e963744e5da453e88b5c36499f04712df097.
* Fixed buffer alignment in exchange_credentials().George McCollister2010-03-151-5/+9
| | | | | | buf needs to be 32 bit aligned on ARM. Also made the fix on the server side. Signed-off-by: George McCollister <George.McCollister@gmail.com>
* Add better checks on PAM socketSumit Bose2010-03-111-4/+118
| | | | | - check if the public socket belongs to root and has 0666 permissions - use a SCM_CREDENTIALS message if available
* Rename server/ directory to src/Stephen Gallagher2010-02-181-0/+669
Also update BUILD.txt