summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Kill off another MAXPATHLENGravatar Karl Ramm2012-02-05
|
* Retool our use of configure such that we track it like everyone else doesGravatar Karl Ramm2011-10-23
| | | | | i.e. don't keep generated or foreign stuff in our source tree. As a side effect, this lets us use a libtool, etc. from this century
* _actually_ make the code work with heimdal.Gravatar Karl Ramm2011-02-21
|
* Use different flags for krb5_cc_retrieve_cred if not using MIT Kerberos.Gravatar Karl Ramm2011-02-21
| | | | | | | The fact that the Heimdal and MIT APIs are subtly different strikes again. I am honestly starting to wonder if they make it look this similar just to frustrate people; I only don't believe it because neither team seems like that sort of person. Fixes #74.
* It is still not the 80s anymore -- remove all caddr_tsGravatar Karl Ramm2011-02-02
|
* make -DZ_DEBUG workGravatar Karl Ramm2011-02-02
|
* Explicitly define ZNotice_Kind constants + actually define the promised stringsGravatar Karl Ramm2011-02-02
| | | | | | | | | Since these are constants used in the protocol be explicit about what values the C compiler is assigning them, and that they can't be arbitrarily rearranged. Also, since we were promising strings for describing them in zephyr.h actually define the array.
* ZOpenPort stashes the port number, no need to getsockname againGravatar Karl Ramm2011-02-02
|
* use system MINGravatar Karl Ramm2011-02-02
|
* In the expired tickets case, authent->length is probably gibberish;Gravatar Karl Ramm2010-12-11
| | | | notice->z_authent_authent_len will be zero.
* Apparently, on Linux at least, if you have an open UDP listening socketGravatar Karl Ramm2010-12-04
| | | | | | with SO_REUSADDR set on a given port, other people can also open listening sockets with SO_REUSEADDR set, so turn SO_REUSADDR back off after we've bound our port.
* No output, ever! We have com_err for a reasonGravatar Karl Ramm2010-12-04
|
* check the return code from krb5_get_default_realm _before_ dereferencingGravatar Karl Ramm2010-11-08
| | | | the pointer
* Restate error table dependencies such that make -j doesn't trip over itselfGravatar Karl Ramm2010-11-06
| | | | (thanks to wthrowe@mit.edu)
* Have the makefiles support explicit target directories properly, courtesy ↵Gravatar Karl Ramm2010-11-06
| | | | wthrowe@mit.edu
* utmp.h doesn't appear to be used for anything in Zinternal.cGravatar Karl Ramm2010-11-06
| | | | and it breaks the build when there isn't a utmp.h
* stop using MAXHOSTNAMELEN in a variety of places. Also ↵Gravatar Karl Ramm2010-08-24
| | | | nuke-trailing-whitespace.
* Typo.Gravatar Karl Ramm2010-08-22
|
* rewrite ZMakeZcodeRealmAuthentication to be less ugly and shorterGravatar Karl Ramm2010-08-22
| | | | | | | | | | | I am becoming increasingly enamored with the fall-through on error clean-up-everything-at-the-end style of C error handling and resource management. Also remove some misleading/useless/wrong comments. (also fix a problem in the tickets expired case where it was using the wrong (possibly undefined) authenticator lengh)
* tweak find_or_replace_uid storage algorithmGravatar Karl Ramm2010-08-22
| | | | | | | | | | | | | | | | | | | | | Per Nelson Elhage: find_or_insert_uid sorts 'buffer' by the uid, which is a remotely-provided field. However, in order to expire uids, it does: while (num && (now - buffer[start % size].t) > CLOCK_SKEW) start++, num--; start %= size; i.e. starts from the start of the queue and goes until it finds something sufficiently new. Since the queue ordering is attacker-controlled, we can send an arbitrarily-long sequence of decreasing uids, consuming memory and forcing the client into an ever-growing quadratic loop to insert them at the beginning. -- Solve this by not keeping the buffer sorted; just tack the incoming uids on the end. This way an attacker can make us keep five minutes worth of UIDs, but only five minutes, and also anecdotally a client under attack spends all of its CPU sort uids.
* fixes for krb5 being more careful about ticket expirationGravatar Karl Ramm2010-08-22
| | | | | | | | | | | | krb5 actually checks in mk_req and fails if the ticks are expired, rather than giving you an authenticator that would fail and, handing you the session key that you'd already negotiated. This causes (meh) sending auth to fail as opposed to just ending up unauthentic and (poor) verifiable messages to look unauthentic or forged. So get the session key from the ccache without checking the expiration time, and have the cert routine skip making an authenticator if krb5_mk_req_extended says the ticket is expired.
* Note for posterity that this is an external-facing functionGravatar Karl Ramm2010-08-22
|
* Make sure broken packets get timed out from the queue.Gravatar Karl Ramm2010-08-22
| | | | | | | (The time used to be set before the bounds check, so one could potentially get an accumulation of packets in the queue without timestamps that could never be assembled into a full notice; thanks to nelhage@mit.edu for noticing.)
* properly set the hostmanager address back if sending an ACK failsGravatar Karl Ramm2010-08-22
| | | | (thanks to nelhage@mit.edu for noticing this)
* multinotice values should just never be negativeGravatar Karl Ramm2010-08-22
|
* fix an allocation-size braino and rearrange for readabilityGravatar Karl Ramm2010-08-22
|
* roleplay accordingly with sin_len and sin6_len values on BSD systemsGravatar Karl Ramm2009-12-18
|
* Print only some fields of ZGetDestAddr to dodge sin_lenGravatar Karl Ramm2009-10-12
| | | | | | | | | Print only the fields of ZGetDestAddr we care about checking -- the address family and address. We can't just print the whole structure and selectively examine fields, because we can't easily determine whether sin_len will be present or not. (from Ken Raeburn)
* Print more info for certain test failures.Gravatar Karl Ramm2009-10-12
| | | | (from Ken Raeburn)
* simplify error handlingGravatar Karl Ramm2009-10-08
|
* when setting location, wait for SERVACKs _and_ SERVNAKSGravatar Karl Ramm2009-08-11
|
* Slightly more robust guess at what the noauth ZExpandRealm doesGravatar Karl Ramm2009-08-01
|
* Further refactor the library locater, and make the doctests use itGravatar Karl Ramm2009-08-01
|
* More explicitly print the test results, and exit 1 if there was a failureGravatar Karl Ramm2009-08-01
| | | | so that make check will fail.
* actually look search for the shared library, and hopefully also find it onGravatar Karl Ramm2009-08-01
| | | | a mac
* Remove the chock wedging things into DES mode and hopefully redo the ↵Gravatar Karl Ramm2009-07-26
| | | | | | keyusage stuff such that it actually works.
* corrections for style and prototypes for inet_ntoa to pass -Wall -WerrorGravatar Karl Ramm2009-07-26
| | | | (and probably not SEGV on a LP64 system)
* redo packet parsing error handlingGravatar Karl Ramm2009-07-26
|
* Factor the python library stuff out of the test suite and stickGravatar Karl Ramm2009-07-15
| | | | | it in it's own file. And then put it in a debian package.
* Build on solarisGravatar Karl Ramm2009-07-14
|
* if we're reencoding a packet, don't blindly claim to have Z_NUMFIELDSGravatar Karl Ramm2009-07-13
|
* Check that we don't reformat a zephyr that started with fewer fields, so ↵Gravatar Karl Ramm2009-07-12
| | | | | | | that we don't inadvertantly alter the checksum.
* Don't assume that we can guess the canonical name of localhostGravatar Karl Ramm2009-06-20
|
* add safety net for non-svn users.Gravatar Mark W. Eichin2009-05-02
| | | | | | (really once I pull the duplicate tests out of here there's no reason for this to be runnable anyway...)
* fix some conditional-compilation issues that trip -Wunreachable-codeGravatar Karl Ramm2009-04-30
|
* Set up a local UDP socket to drive testingGravatar Karl Ramm2009-04-27
| | | | | | | | | | | | | Using socketpair doesn't work because you end up with an AF_UNIX socket, and it even if you _can_ use sendto with anonymous unix-domain sockets (which the documentation is mute on and it doesn't seem worth experimenting on), the zephyr library doesn't allocate enough storage for a sockaddr_un, and although I'm not above fixing that, I determined that for structural reasons it's too annoying right now. (But once we have a test suite...) Anyway, cons up a udp socket, and extract a port number from the library, and use the python socket interface to send the zephyr packet.
* It turns out that sockpair /does/ work with AF_UNIX, SOCK_DGRAM, just notGravatar Karl Ramm2009-04-27
| | | | | | | | AF_INET, which is not terribly surprising now that I think about it. However, ZPending() still returns -1, and I don't know how to debug why at the moment.
* draft packet tests - using pipe trick turns out not to work, though.Gravatar Mark W. Eichin2009-04-26
|
* take ZGetDestAddr off the listGravatar Mark W. Eichin2009-04-24
|
* test that the file descriptor ZGetFD returns is actually a socketGravatar Mark W. Eichin2009-04-24
|