summaryrefslogtreecommitdiffstats
path: root/src/responder/common/responder_packet.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix packet size calculation in sss_packet_newNikolai Kondrashov2016-07-071-1/+1
| | | | | | | | Use division instead of modulo while rounding the created packet size up to a multiple of SSSSRV_PACKET_MEM_SIZE in sss_packet_new. This fixes potentially packet buffer overflows with certain body sizes. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* Add sss_packet_get_status()Sumit Bose2013-11-151-0/+9
| | | | | sss_packet_get_status() will currently only used to test if packets have the right status set.
* responder: Access packet header using SAFEALIGN macros.Michal Zidek2013-11-071-37/+68
| | | | | resolves: https://fedorahosted.org/sssd/ticket/1359
* Include external headers with #include <foo.h>Jakub Hrozek2013-10-221-1/+2
| | | | | | 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.
* sss_packet_grow: correctly pad packet length to 512BPavel Březina2013-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/2059 If len % SSSSRV_PACKET_MEM_SIZE == 0 or some low number, we can end up with totlen < len and return EINVAL. It also does not pad the length, but usually allocates much more memory than is desired. len = 1024 n = 1024 % 512 + 1 = 0 + 1 = 1 totlen = 1 * 512 = 512 => totlen < len len = 511 n = 511 % 512 + 1 = 511 + 1 totlen = 512 * 512 = 262144 totlen is way bigger than it was supposed to be
* RESPONDER: Fix segfault in sss_packet_send()Stephen Gallagher2011-11-021-0/+5
| | | | | | | | | There are several places (all error-handling) where sss_cmd_done() is called with no response packet created. As a short-term solution, we need to check whether the packet is NULL and simply return EINVAL. client_send() (the consumer) will then forcibly disconnect the client (which will return PAM_SYSTEM_ERR to the client).
* Fixes for client communicationSumit Bose2010-03-171-4/+12
| | | | | | | - catch all errors of send() and recv(), not only EAGAIN - check if send() or recv() return EWOULDBLOCK or EINTR - remove unused parameter from client_send() and client_recv() - fix a debugging message
* Rename server/ directory to src/Stephen Gallagher2010-02-181-0/+253
Also update BUILD.txt