| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Directly use stdint.h names for integer types in preference to the
various internal names we have made up for them.
|
|
|
|
|
|
|
| |
Make unconditional use of <stdint.h> and fixed-width types such as
uint32_t. k5-plugin.h doesn't use any special integer types, so
remove the conditional include block there. Nothing uses
INT64_FMT/UINT64_FMT, so leave those out of k5-platform.h for now.
|
|
|
|
|
|
|
|
|
| |
We never check its return value (causing clang to emit warnings),
and its use is primarily in cases where we should continue processing
in the event of failure. Just ignore errors from the underlying
fcntl() call (if present) and treat this operation as best-effort.
The #if 0 code should probably be removed.
|
|
|
|
|
|
|
| |
k5_bcmp acts similarly to the deprecated Unix bcmp() function,
returning zero if two memory regions are equal and nonzero if they are
not. It is implemented such that it should take the same amount of
time regardless of how many bytes are equal within the memory regions.
|
|
|
|
|
|
|
|
|
|
| |
Catch up to the split of preauth_plugin.h into client and
kdc specific portions. While here, use copy's /y flag to suppress
an override-confirmation prompt (though we do not list any dependencies
for this target at the moment, so no such prompt will be generated).
Do not disable library finalizers for windows, erroneously disabled
in 4538146e1452e0966164119cefb0804993ce6bbb.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a build with static libraries, functions tagged with
__attribute__((destructor)) may be executed in any order, not in a
topologically sorted order as they are in shared libraries. This
could result in libcom_err functions being invoked (from another
library's finalizer) after libcom_err has been finalized, which would
(at minimum) result in using a mutex after it is destroyed. To
prevent this kind of problem, disable finalizers in the static build
regardless of whether we have compiler or linker support for them.
Reported by Mihai Serban <mihai.serban@gmail.com>.
|
|
|
|
| |
Add JSON support based loosely on Heimdal's heimbase code.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if configure did not detect dgettext(), we disabled
anything that smelled like localization, inadvertently including
setlocale(). Now that we use setlocale(LC_ALL, ""), we have
localized dates available as well as messages, so we should not
disable calls to setlocale() any more.
Since the routines from locale.h are only used in a relatively
small number of places, just include the header directly in those
files and remove it from k5-platform.h.
|
|
|
|
|
|
|
| |
r25857 (#7128) uses ngettext, which means we need a no-op macro for it
when we're building without NLS support.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25859 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Windows _vsnprintf does not terminate its output buffer in the
overflow case. Make sure we do that in the wrapper. Reported by
Chris Hecker.
(Not an issue for KfW 3.2 since we weren't using snprintf in 1.6.x
except in Unix-specific code.)
ticket: 6980
target_version: 1.10
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25367 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
Microsecond accuracy on _WIN32, but only one second accuracy on other,
AFAIK purely hypothetical, platforms that lack native gettimeofday.
Shamelessly cribbed from Heimdal.
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25310 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25153 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
Signed-off-by: Sam Hartman <hartmans@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25080 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
k5_path_split separates a path into dirname and basename.
k5_path_join joins two paths.
k5_path_isabs determines if a path is absolute.
All three functions follow the Python path function semantics.
Currently the test module doesn't run in the Windows build, but the
Windows path semantics are tested in the Unix build using specially
built objects.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25074 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
Adds build system logic, translation macros in k5-platform.h, and
bindtextdomain calls in libkrb5 initialization.
ticket: 6918
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24959 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
and license comments.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24695 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23741 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
functions don't need excessive conditionals internally.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23437 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23431 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
Use a function call into libkrb5support instead, since that's hard to
inline.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23339 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
Exclude include/gssrpc due to its Sun origin and k5-platform.h due to
macros too hairy for emacs c-mode to handle.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23180 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
make reindent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: 6565
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22766 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
In fallback code, check ia64 platforms for hpux vs everything else;
HP-UX uses big-endian mode.
ticket: 6565
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22761 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
of the macros defined there, as well as in many source files which do
not themselves include <assert.h>. Report and fix by Rainer Weikusat.
ticket: 6533
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22475 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
inline" work, so remove the comment which says it does.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22425 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21956 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
so do the gcc unaligned-struct trick only for C, not C++.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21917 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21902 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If HAVE_VASPRINTF is not defined, make sure krb5int_{,v}asprintf
functions always get declared, applying the preprocessor conditional
test only to the GCC format attribute. If HAVE_VASPRINTF is defined,
don't declare them at all.
This fixes a bunch of function-not-declared warnings under Sun cc.
ticket: 6364
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21888 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
routines to take void pointers, so they can operate on both plain and
unsigned char buffers, or other types.
Remove some now-unneeded casts.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21793 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
not provide it natively.
ticket: 6200
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20916 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
ticket: 6200
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20912 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
library, use that for the [v]asprintf replacement functions when needed.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20871 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
success return path out of guts of loop
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20703 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20465 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20194 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20166 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19742 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19735 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19654 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19643 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
ticket: 5425
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19227 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|