summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Annotate that 'protocol' in svc_register means an IPPROTO_ valueKen Raeburn2008-06-061-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20367 dc483132-0cff-0310-8789-dd5450dbe970
* Change krb5_context.db_context to point to the real structure type,Ken Raeburn2008-06-021-2/+4
| | | | | | | | and change uses to not cast all the time. Also rename it from db_context to dal_handle, since one of the fields in the pointed-to structure is also called db_context. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20348 dc483132-0cff-0310-8789-dd5450dbe970
* Apple PKINIT patch commitAlexandra Ellwood2008-05-307-0/+760
| | | | | | | | | | | | | Commit of Apple PKINIT patches under "APPLE_PKINIT" preprocessor symbol. Long term goal is to merge these patches with the pkinit preauth plugin which does not currently have support for Mac OS X crypto libraries or the exported functions used by Back To My Mac. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20346 dc483132-0cff-0310-8789-dd5450dbe970
* Move KIM implementation to the krb5 repositoryAlexandra Ellwood2008-05-0710-0/+3581
| | | | | | | | | Moved sources and headers. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20314 dc483132-0cff-0310-8789-dd5450dbe970
* Remove sched_yield usesKen Raeburn2008-04-241-56/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20307 dc483132-0cff-0310-8789-dd5450dbe970
* Make windows debug message line endings match the Mac endings.Kevin Koch2008-01-221-0/+5
| | | | | | | | | | | | Windows needs k5-platform helper function declared explicitly. Change definition of ccs_pipe_t for windows. #define strdup -- it's now deprecated on windows. TargetVersion: 1.7 Component: krb5-libs Ticket: 5594 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20201 dc483132-0cff-0310-8789-dd5450dbe970
* Implement SWAP16 for Mac without compiler warningKen Raeburn2007-12-221-1/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20194 dc483132-0cff-0310-8789-dd5450dbe970
* On Windows, UINT64_MAX isn't defined; define itKevin Koch2007-11-151-0/+4
| | | | | | | | TargetVersion: 1.7 Component: krb5-libs Ticket: 5594 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20166 dc483132-0cff-0310-8789-dd5450dbe970
* On Mac, include TargetConditionals.h and architecture/byte_order.h,Ken Raeburn2007-10-291-0/+28
| | | | | | | | | and use OSSwapInt{16,32,64} for SWAP* macros. Add k5_htonll and k5_ntohll functions. (Implementation assumes the swapping is its own reverse on all platforms we support.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20150 dc483132-0cff-0310-8789-dd5450dbe970
* CredentialsCache.h needs uint32_t and other definitions which aren't in ↵Kevin Koch2007-10-291-0/+1
| | | | | | | | | | | Windows. Get the definitions from win-mac.h TargetVersion: 1.7 Component: krb5-libs Ticket: 5594 Subj: Work on compiling the CCAPI test suite on Windows. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20148 dc483132-0cff-0310-8789-dd5450dbe970
* Set close-on-exec flag in most places where file descriptors areKen Raeburn2007-10-221-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | opened in our libraries (in case another application thread spawns a new process) and in the KDC programs (in case a plugin library spawns a new process). Checked calls to: open fopen THREEPARAMOPEN mkstemp socket accept dup dup2 pipe. In: util lib plugins kdc kadmin/server krb524. The various programs are less critical than the libraries, as any well-written plugin that spawns a new process should close all file descriptors it doesn't need to communicate with the new process. This approach also isn't bulletproof, as the call to set the close-on-exec flag is necessarily a separate call from creating the file descriptor, and the fork call could happen in between them. So plugins should be careful regardless of this patch; it will only reduce the window of potential lossage should a plugin be poorly written. (AFAIK there are currently no plugins that spawn processes where this would be a problem.) Update dependencies. ticket: 5561 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20143 dc483132-0cff-0310-8789-dd5450dbe970
* Run the script to verify all Windows-exported krb5 functions have theKen Raeburn2007-10-101-1/+5
| | | | | | | right calling convention markers in the header files, on Windows. Always, for lack of a separate "maintainer mode" like we have on UNIX. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20110 dc483132-0cff-0310-8789-dd5450dbe970
* Add documentation for error codes used for flow controlAlexandra Ellwood2007-10-031-12/+22
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20084 dc483132-0cff-0310-8789-dd5450dbe970
* Make config.status itself update the timestamp file associated withKen Raeburn2007-09-171-1/+1
| | | | | | | autoconf.h, so that we don't need a redundant invocation of config.status during the first build. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19937 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed macro for cc_ccache_unlock and updated documentationAlexandra Ellwood2007-09-101-2/+2
| | | | | | ticket: 4644 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19930 dc483132-0cff-0310-8789-dd5450dbe970
* bump accessor version numberTom Yu2007-09-041-1/+1
| | | | | | ticket: 3334 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19911 dc483132-0cff-0310-8789-dd5450dbe970
* Implement KRB5_ATTR_DEPRECATED for WindowsKen Raeburn2007-08-281-0/+2
| | | | | | ticket: 2836 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19890 dc483132-0cff-0310-8789-dd5450dbe970
* Remove macros and associated comments that appear to be forKen Raeburn2007-08-281-65/+0
| | | | | | | | | | | multiple-inclusion protection of only sub-portions of k5-int.h, presumably from a time when those portions were separate files. Since the entire file is now protected against multiple inclusions, these other macros aren't needed. A few are left, mostly because they also appear in other files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19889 dc483132-0cff-0310-8789-dd5450dbe970
* For gcc 4.x, add sentinel attribute to krb5_build_principalKen Raeburn2007-08-271-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19888 dc483132-0cff-0310-8789-dd5450dbe970
* Define KRB5_ATTR_DEPRECATED (and undef at end of file) and attach itKen Raeburn2007-08-271-7/+15
| | | | | | | | | | | | to the function declarations enabled by KRB5_DEPRECATED. Definition depends on having GCC version 3.2.3 or later. (Earlier versions may have supported it, but that's what I found docs for. Windows compiler support coming later, based on Jeff's suggestions.) ticket: 2836 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19887 dc483132-0cff-0310-8789-dd5450dbe970
* Add documentation for CCAPIAlexandra Ellwood2007-08-231-128/+1161
| | | | | | | | | Added Doxygen-based documentation to CredentialsCache.h and checked in a copy of the html output of that documentation. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19849 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_preauth_context ftable should be Jeffrey Altman2007-08-081-1/+1
| | | | | | | | | | struct krb5plugin_preauth_client_ftable_v1 * instead of struct krb5plugin_preauth_client_ftable_v0 * ticket: 5617 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19759 dc483132-0cff-0310-8789-dd5450dbe970
* KRB5_CALLCONV must be specified inside parens Jeffrey Altman2007-08-061-1/+1
| | | | | | | | | | | When declaring a function pointer, the function type modifiers must be inside the parentheses. return-type (modifers * function-name) (parameters) ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19754 dc483132-0cff-0310-8789-dd5450dbe970
* Add PKINIT supportKevin Coffman2007-08-014-172/+645
| | | | | | | | | | | | | | | | Pull up PKINIT support onto the trunk. Changes from the version in branch users/coffman/pkinit are: - Update the preauth plugin interface version to avoid conflict with any existing plugins. - Add a pkcs11.h locally to the pkinit code rather than depending on opensc being installed. ticket: new Target_Version: 1.6.3 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19745 dc483132-0cff-0310-8789-dd5450dbe970
* Define snprintf along with vsnprintf for WindowsKen Raeburn2007-08-011-0/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19742 dc483132-0cff-0310-8789-dd5450dbe970
* Debugged version of patch worked up with LukeKen Raeburn2007-07-271-2/+10
| | | | | | | | | | | | Adds a callback to krb5int_sendto to examine the response and indicate whether to quit the loop or not. For sendto_kdc, keep going if the returned error is "service unavailable". Updated all other callers to pass a null function pointer, which means to always break out of the loop on any response (the old behavior). ticket: 3334 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19738 dc483132-0cff-0310-8789-dd5450dbe970
* Provide {,v}asprintf prototypes if neededKen Raeburn2007-07-271-0/+15
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19735 dc483132-0cff-0310-8789-dd5450dbe970
* Updated API version to 7 because we added the wait_for_change functionsAlexandra Ellwood2007-07-251-3/+4
| | | | | | | ticket: 4644 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19732 dc483132-0cff-0310-8789-dd5450dbe970
* Pull out code for looking up the current time, comparing the offset ofKen Raeburn2007-07-201-0/+1
| | | | | | | a supplied timestamp against the configured maximum clock skew, and possibly generating an error message, into a separate routine. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19722 dc483132-0cff-0310-8789-dd5450dbe970
* Add a new per-thread datum for error message info in gssapi krb5 mechKen Raeburn2007-07-041-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19668 dc483132-0cff-0310-8789-dd5450dbe970
* Under gcc, declare k5_v?asprintf with format attributeKen Raeburn2007-06-291-0/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19654 dc483132-0cff-0310-8789-dd5450dbe970
* Attach format attributes to declarations of various message-formattingKen Raeburn2007-06-293-8/+28
| | | | | | | | | | | | | routines under gcc. In a couple of routines, hard-code the preference for using the vsnprintf paths instead of list-of-int-arguments hacks now that we're assuming vsnprintf is available in other places. Installed headers affected: com_err.h (com_err, com_err_va) ss.h (ss_error) krb5.h (krb5_set_error_message, krb5_vset_error_message) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19653 dc483132-0cff-0310-8789-dd5450dbe970
* For Win32 environment, define CAN_COPY_VA_LIST, and define an inlineKen Raeburn2007-06-271-1/+21
| | | | | | | version of vsnprintf using the MS versions. (Apparently no need for plain snprintf just yet.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19644 dc483132-0cff-0310-8789-dd5450dbe970
* If mkstemp is missing, define the mkstemp macro is k5-platform.h, not autoconf.hKen Raeburn2007-06-271-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19643 dc483132-0cff-0310-8789-dd5450dbe970
* Add the libdb2 type-existence tests to the top-level configure script.Ken Raeburn2007-06-201-0/+1
| | | | | | | | | | | Replace the generated header files in db2 with static ones that include autoconf.h and make decisions based on the macros defined there. Omit some tests that test for things we assume now, like "const" working and "size_t" being defined. Update dependencies. The libdb2 configure script now generates no header files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19605 dc483132-0cff-0310-8789-dd5450dbe970
* Move (BSD-licensed) mkstemp from libdb2 to libkrb5support, and renameKen Raeburn2007-06-201-0/+3
| | | | | | | | | | | | | the function to krb5int_mkstemp. Generate the symbol export list for libkrb5support at build time. Declare krb5int_mkstemp in k5-platform.h. Change cc_file.c to use mkstemp unconditionally. Make libdb2.so (built for testing only) link against the libkrb5support, and use krb5int_mkstemp if mkstemp is not available. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19600 dc483132-0cff-0310-8789-dd5450dbe970
* provide asprintf functionality for internal useKen Raeburn2007-06-201-3/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I plan to use asprintf in some gssapi error-message management routines, so let's make sure we have the functionality available, implementing it locally if necessary. This implementation assumes vsnprintf is available, an assumption that the support library is already making at the moment. Since this implementation requires calling vsnprintf potentially multiple times with the same va_list, use va_copy if it's available, or provide a hack version (which should work okay if va_list is a scalar or array type that requires no other special handling, and if va_end does nothing interesting, which is usually the case) if the compiler doesn't provide it. I also changed a couple bits of code to use asprintf, to make sure we exercise our implementation in testing. (C99 requires vsnprintf and va_copy; vasprintf is a GNU/BSD extension, but an oh so useful one....) * configure.in: Check for va_copy, or if va_list objects can be simply assigned. Define HAS_VA_COPY and CAN_COPY_VA_LIST as appropriate. * include/k5-platform.h: Define a va_copy macro if the compiler doesn't provide it. * include/k5-platform.h: If vsnprintf isn't available from the OS, abort compilation. If vasprintf isn't available from the OS, provide k5_{v,}asprintf based on vsnprintf and define {v,}asprintf macros. * lib/krb5/keytab/t_keytab.c (do_test): Use asprintf. * util/support/errors.c (krb5int_vset_error): Use asprintf unconditionally. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19595 dc483132-0cff-0310-8789-dd5450dbe970
* don't include time.h in CredentialsCache.h if it's not neededAlexandra Ellwood2007-06-141-3/+1
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19576 dc483132-0cff-0310-8789-dd5450dbe970
* The #if _WIN32 block threw an error with Visual Studio 2005. Bumped the ↵Kevin Koch2007-06-051-1/+1
| | | | | | | | | | | _MSC_VER threshold by 100 TargetVersion: 1.7 Component: krb5-libs Ticket: new Subj: Tweaks for 1.7 build on Windows. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19569 dc483132-0cff-0310-8789-dd5450dbe970
* Move CCAPI sources to krb5 repositoryAlexandra Ellwood2007-05-312-0/+878
| | | | | | | ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19564 dc483132-0cff-0310-8789-dd5450dbe970
* On Solaris 10, define NO_WEAK_PTHREADS for the build. When that symbol isKen Raeburn2007-05-231-5/+9
| | | | | | | | | defined, skip the weak and conditional references in k5-thread.h and always use the real pthread functions. ticket: 5560 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19556 dc483132-0cff-0310-8789-dd5450dbe970
* Change struct _krb5_context.os_context into a single element instead of array[1]Ken Raeburn2007-05-211-10/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19554 dc483132-0cff-0310-8789-dd5450dbe970
* Simplify UNIX krb5int_zap_data a little. Omit volatile cast, just call memset,Ken Raeburn2007-05-211-10/+6
| | | | | | | but for gcc, use a volatile asm afterwards to make the memory appear to be referenced and deter optimizations that would remove the memset. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19553 dc483132-0cff-0310-8789-dd5450dbe970
* Define and use some inline helper functions for comparing data and authdata ↵Ken Raeburn2007-05-101-1/+38
| | | | | | | | structures, instead of open-coding checks of multiple fields everywhere. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19544 dc483132-0cff-0310-8789-dd5450dbe970
* k5-int.h, gic_opt.cJeffrey Altman2007-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The krb5_get_init_creds_password() and krb5_get_init_creds_keytab() functions permit the gic_opts parameter to be NULL. This is not taken into account when testing the value with the macros krb5_gic_opt_is_extended() and krb5_gic_opt_is_shadowed(). Nor is it taken into account within krb5int_gic_opte_copy() which is called by krb5int_gic_opt_to_opte() when the input parameter is not a krb5_gic_opt_ext structure. This commit makes two changes: (1) it modifies the macros to ensure that the value is non-NULL before evaluation. (2) it modifies krb5int_gic_opte_copy() to avoid copying the original values with memcpy() when the input is NULL. In addition, the code was audited to ensure that the flag KRB5_GET_INIT_CREDS_OPT_SHADOWED is properly set and that when it is set, that the allocated krb5_gic_opt_ext structure is freed by krb5_get_init_creds_password() and krb5_get_init_creds_keytab(). ticket: 5552 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19537 dc483132-0cff-0310-8789-dd5450dbe970
* Add a few comments on k5_mutex_t handlingKen Raeburn2007-04-131-1/+18
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19460 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unused scc_default_format field from krb5_contextKen Raeburn2007-03-261-1/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19287 dc483132-0cff-0310-8789-dd5450dbe970
* Use "unsigned __int{16,32}" types for Windows in load_{16,32}_n, per KevinKen Raeburn2007-03-141-0/+8
| | | | | | ticket: 5425 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19227 dc483132-0cff-0310-8789-dd5450dbe970
* * include/k5-platform.h: Add load_{16,32,64}_n for loading values fromKen Raeburn2007-03-141-0/+24
| | | | | | | | | | | (possibly unaligned) memory in native order. * lib/krb5/krb/get_in_tkt.c (krb5_get_init_creds): Fetch four random bytes from the crypto library and generate a 31-bit (non-negative) nonce, instead of using the timestamp. ticket: 5425 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19223 dc483132-0cff-0310-8789-dd5450dbe970
* Windows - some apps define ssize_t as a preprocessor symbolJeffrey Altman2007-02-281-0/+3
| | | | | | | | ticket: new component: krb5-libs tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19190 dc483132-0cff-0310-8789-dd5450dbe970