summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Ensure consistancy between prototypes and functionsEzra Peisach2007-02-191-1/+1
| | | | | | | | | | | | I am using an older compiler that is complaining that prototypes do not match the functions they reference. The issue is that a number of prototypes are using "const int foo" while the function is "int foo". From a caller sense it makes no difference - but the compiler is correct they are different. All is now consistant. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19169 dc483132-0cff-0310-8789-dd5450dbe970
* rename krb5_server_decrypt_ticket_keyblock() toTom Yu2007-02-131-1/+1
| | | | | | | | krb5int_server_decrypt_ticket_keyblock() ticket: 5349 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19159 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_kt_default_name should take an unsized lengthEzra Peisach2007-02-051-1/+1
| | | | | | | | | | The internal code to krb5_kt_default_name was casting the length to size_t. Change prototype to take an unsigned - which makes sense in how the code uses it. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19144 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_kt_get_type should return const char *. Ezra Peisach2007-02-051-1/+1
| | | | | | | | | | | | The code returns a pointer to static structures. Just to enforce the assumption that users can not change the returned data. Change prototype of krb5_kt_get_type to return const char *. The other changes are to clean up warnings - no change in code - usage assumed const. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19143 dc483132-0cff-0310-8789-dd5450dbe970
* update def-check to look at preauth_plugin.hTom Yu2007-01-301-2/+5
| | | | | | | ticket: 5420 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19128 dc483132-0cff-0310-8789-dd5450dbe970
* get_init_creds_opt extensibilityTom Yu2007-01-303-7/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r18922@cathode-dark-space: coffman | 2006-12-04 18:30:15 -0500 First cut at making the get_init_creds_opt structure extendable and adding library functions to set options for preauthentication plugins. This does *not* include a compatibility function to work like Heimdal's krb5_get_init_creds_opt_set_pkinit() function. Hopefully, the test code that doesn't belong in kinit.c is obvious. r18929@cathode-dark-space: coffman | 2006-12-07 10:01:20 -0500 Remove extra "user_id" parameter. Add function which duplicates the Heimdal interface (if we can agree on what the matching attribute names should be). r18934@cathode-dark-space: coffman | 2006-12-08 15:28:03 -0500 Update to use the simplified interface for krb5_get_init_creds_opt_set_pa() Add code in kinit to process "-X" options as preauth options and pass them along. r18936@cathode-dark-space: coffman | 2006-12-11 12:04:26 -0500 Move prototypes for get_init_creds_opt_get_pa() and krb5_get_init_creds_opt_free_pa() into the preauth_plugin.h header rather than krb5.hin. ticket: new status: open component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19127 dc483132-0cff-0310-8789-dd5450dbe970
* Microsoft Windows Visual Studio does not define ssize_tJeffrey Altman2007-01-301-0/+8
| | | | | | | | | | | | | | Microsoft defines size_t but not ssize_t. Provide a definition in win-mac.h that follows the style used by Microsoft providing a preprocessor macro SSIZE_T_DEFINED which can be used for conditional definition and testing in case Microsoft decides to add it later. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19123 dc483132-0cff-0310-8789-dd5450dbe970
* Change second argument to krb5_cc_register to take a const krb5_cc_ops *. MakesEzra Peisach2007-01-231-1/+1
| | | | | | | sense - when krb5_Xcc_ops currently defined as such - and assignment of value assumes same. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19106 dc483132-0cff-0310-8789-dd5450dbe970
* Use intermediate target to prevent parallel invocations of 'make includes' ↵Ken Raeburn2007-01-201-1/+2
| | | | | | in lib/krb4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19099 dc483132-0cff-0310-8789-dd5450dbe970
* Use move-if-changed and a timestamp file to avoid re-running commands andKen Raeburn2007-01-201-7/+10
| | | | | | updating krb5.h when there are no textual changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19098 dc483132-0cff-0310-8789-dd5450dbe970
* Build krb5.h using the _err.h files from the error_tables directory, notKen Raeburn2007-01-201-10/+9
| | | | | | additional copies of them. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19095 dc483132-0cff-0310-8789-dd5450dbe970
* Mark as C source for Emacs mode selectionKen Raeburn2007-01-201-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19093 dc483132-0cff-0310-8789-dd5450dbe970
* Move osconf input file to include directory instead of keeping it in its ownKen Raeburn2007-01-202-3/+3
| | | | | | subdirectory. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19092 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (osconf.h): Use move-if-changed scriptKen Raeburn2007-01-201-3/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19091 dc483132-0cff-0310-8789-dd5450dbe970
* Include stdarg.h, and don't conditionalize declarations of functions withKen Raeburn2007-01-201-5/+1
| | | | | | va_list arguments. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19087 dc483132-0cff-0310-8789-dd5450dbe970
* Mark as C source for Emacs mode selectionKen Raeburn2007-01-201-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19084 dc483132-0cff-0310-8789-dd5450dbe970
* Don't define KRB5_PRIVATE, since it's not tested any moreKen Raeburn2007-01-201-4/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19083 dc483132-0cff-0310-8789-dd5450dbe970
* Move all KRB5_PRIVATE declarations from krb5.h(in) to k5-int.h, and drop theKen Raeburn2007-01-202-376/+305
| | | | | | KRB5_PRIVATE preprocessor test. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19082 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (private-and-public-decls): New target file, created fromKen Raeburn2007-01-201-3/+5
| | | | | | | | k5-int.h and krb5.h. (verify-calling-conventions-krb5): Use it instead of krb5.h. (clean-unix): Get rid of it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19081 dc483132-0cff-0310-8789-dd5450dbe970
* Fix typo in checked-in versionKen Raeburn2007-01-161-1/+1
| | | | | | ticket: 5349 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19063 dc483132-0cff-0310-8789-dd5450dbe970
* This commit adds two new functions, krb5_server_decrypt_ticket_keyblock Jeffrey Altman2007-01-161-0/+12
| | | | | | | | | | | | | | | | | (private) and krb5_server_decrypt_ticket_keytab (public). These functions take a krb5_ticket as input and decrypt it using the provided key data. The public function is useful for higher level application protocols such a TLS-KRB5 and AFS RX-KRB5 which exchange a service but do not use the AP-REQ/AP-REP messages. This commit also adds new functionality to kvno which permits kvno when provided a keytab as input to verify whether or not the keytab contains a key that can successfully decrypt the obtains service ticket. ticket: 5349 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19062 dc483132-0cff-0310-8789-dd5450dbe970
* * lib/krb5/krb/copy_creds.c (krb5int_copy_creds_contents): New function, splitKen Raeburn2006-12-281-0/+3
| | | | | | | | out from krb5_copy_creds. (krb5_copy_creds): Call it. * include/k5-int.h (krb5int_copy_creds_contents): Declare. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19017 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_is_referral_realm now takes a pointer to const krb5_data, since it doesn'tKen Raeburn2006-12-191-1/+1
| | | | | | | | | modify it. ticket: 5121 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18974 dc483132-0cff-0310-8789-dd5450dbe970
* (k5_mutex_lock_update_stats) [!DEBUG_THREADS_STATS && __GNUC__]: DeclareKen Raeburn2006-12-191-2/+3
| | | | | | | arguments with "unused" attribute. (k5_pthread_mutex_lock) [DEBUG_THREADS && __GNUC__]: Use __extension__. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18972 dc483132-0cff-0310-8789-dd5450dbe970
* build the trunk on Windows (again)Jeffrey Altman2006-12-082-5/+1
| | | | | | | | | | This revision corrects a number of missing or extraneous KRB5_CALLCONV symbols; exposes symbols for _WIN32; and avoids including headers that don't exist ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18932 dc483132-0cff-0310-8789-dd5450dbe970
* Modifications to support the generation and embedding Jeffrey Altman2006-12-071-2/+5
| | | | | | | | | | | | of library manifests into generated EXEs and DLLs. Manifests are required for Windows XP and above when applications are built with Microsoft Visual Studio 2005 (aka VS8) or above. ticket: 3642 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18930 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_cc_remove should work for the CCAPIAlexandra Ellwood2006-12-051-0/+5
| | | | | | | | | | | | | | Implemented a working krb5_cc_remove for the CCAPI cache type. Added a private support function krb5_creds_compare() which checks if two krb5_creds are identical. This function should be needed by implementations of krb5_cc_remove for other ccache types. ticket: new owner: tlyu target_version: 1.6 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18923 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unused prototype for krb5_find_config_filesEzra Peisach2006-12-031-2/+0
| | | | | | | | | The prototype for krb5_find_config_files() no longer is necessary as the function does not exist in the source tree anymore. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18914 dc483132-0cff-0310-8789-dd5450dbe970
* send a new request with the new padata returned by krb5_do_preauth_tryagain()Kevin Coffman2006-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Send another request containing the padata obtained from tryagain. * src/include/k5-int.h Update prototype * src/lib/krb5/krb/get_in_tkt.c Send pointer to the request.padata so krb5_do_preauth_tryagain() can update the request to be sent. * src/lib/krb5/krb/preauth2.c If a module returns modified padata, add it to the return_padata and return. ticket: new Component: krb5-libs Target_Version: 1.6 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18896 dc483132-0cff-0310-8789-dd5450dbe970
* * src/lib/krb5/ccache/ccbase.c (krb5int_cc_getops): InternalTom Yu2006-11-181-0/+6
| | | | | | | | | | | | | | | | function to fetch ops vector given ccache prefix string. (krb5_cc_new_unique): New function to generate a new unique ccache of a given type. * src/include/krb5/krb5.hin: Prototype for krb5_cc_new_unique(). * src/lib/krb5/libkrb5.exports: * src/lib/krb5_32.def: Add krb5_cc_new_unique(). ticket: 3091 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18857 dc483132-0cff-0310-8789-dd5450dbe970
* Didn't include header changes in the previous commitKevin Coffman2006-11-171-2/+7
| | | | | | | | ticket: 4799 Target_Version: 1.6 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18837 dc483132-0cff-0310-8789-dd5450dbe970
* fix warning in preauth_plugin.h headerKen Raeburn2006-11-161-1/+1
| | | | | | | | | * preauth_plugin.h (enum krb5plugin_preauth_client_request_type): Omit trailing comma. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18814 dc483132-0cff-0310-8789-dd5450dbe970
* Add macros for __attribute__((deprecated)) for krb4 and des APIsAlexandra Ellwood2006-11-152-125/+304
| | | | | | | | | | Added KRB5INT_KRB4_DEPRECATED and KRB5INT_DES_DEPRECATED. ticket: new target_version: 1.6 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18811 dc483132-0cff-0310-8789-dd5450dbe970
* allow server preauth plugin verify_padata function to return e-dataKevin Coffman2006-11-131-1/+2
| | | | | | | | | | | | | | | | | Change server-side preauth plugin interface to allow the plugin's verify_padata function to return e-data to be returned to the client. (Patch from Nalin Dahyabhai <nalin@redhat.com>) Update sample plugins to return e-data to exercise the code. Fix memory leak in the wpse plugin. ticket: new Component: krb5-kdc Target_Version: 1.6 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18801 dc483132-0cff-0310-8789-dd5450dbe970
* correct client preauth plugin request_contextKevin Coffman2006-11-131-2/+6
| | | | | | | | | | | | Correctly share the same request_context between all modules within a single client preauth plugin. ticket: new Component: krb5-libs Target_Version: 1.6 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18800 dc483132-0cff-0310-8789-dd5450dbe970
* Install gssapi.h in includedir that includes gssapi/gssapi.h so that eitherRuss Allbery2006-11-092-0/+6
| | | | | | | | | | | | form of #include will work. Provides better compatibility with Heimdal. ticket: 2240 Component: krb5-libs Version_Reported: 1.3.2 Target_Version: 1.6 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18791 dc483132-0cff-0310-8789-dd5450dbe970