| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
username or UID could not be found, in which case OUT will be set to
NULL. Elsewhere, code assumes that if k5_getpwnam_r or k5_getpwuid_r
returns 0, OUT is non-NULL. Check whether OUT is NULL and adjust the
return value accordingly in the k5_getpw{nam,uid}_r wrappers.
Ticket: 3490
Version_Reported: 1.4.3
Component: krb5-libs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18121 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
functions in k5-platform.h, and use them in kdb encoding/decoding
macros.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17710 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
it's available. Include byteswap.h if available.
(K5_LE, K5_BE): Define based on endianness macros from header files, if
available. Only do the architecture tests if this fails.
(SWAP16, SWAP32, SWAP64): Define if byteswap.h and bswap_16 are available.
({load,store}_{16,32,64}_le): Disable building of little-endian versions, which
aren't currently used.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17239 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stores of values. (E.g., on x86, gcc will emit a word load or store regardless
of alignment; on sparc or alpha, it will do aligned word accesses. The old C
code does byte operations and arithmetic, always.) Tested in crypto code on
x86, sparc, and amd64.
* k5-platform.h (load_*): Change argument type to point to const.
(K5_BE, K5_LE): New macros, defined based on architecture macros for certain
big-endian and little-endian platforms, respectively.
(PUT, GET) [__GNUC__]: New macros. Use GCC's packed-structure support to do
unaligned loads and stores.
(PUTSWAPPED, GETSWAPPED) [__GNUC__]: Similar, but invoke a SWAP<size> macro
(not defined yet) to swap the bytes of the value.
(store_*, load_*): Use these macros when using GCC, depending on endianness and
availability of the SWAP<size> macros.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17232 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, a non-GCC configuration will not optimize during the build. The
Solaris C compiler will always output functions defined as "inline", at least
when not optimizing, even if they're never used. With recent changes on the
trunk, k5_call_init_function will cause the support library to be required on
Solaris by every program that includes k5-platform.h. This patch should fix
that.
* k5-platform.h (MAYBE_DEFINE_CALLINIT_FUNCTION) [DELAY_INITIALIZER]: New
macro. If not __GNUC__, define k5_call_init_function in the expansion;
otherwise, do nothing.
(MAKE_INIT_FUNCTION) [DELAY_INITIALIZER]: Use it.
(k5_call_init_function): Don't define function form at top level.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17230 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getpw{nam,uid}_r, and using the set flags, creates macros providing a
consistent API, and if possible thread safety.
* configure.in: Don't check for getpwnam_r and getpwuid_r with AC_CHECK_FUNCS;
use AC_CHECK_FUNC, and only set shell variables. Run stricter tests on return
types and numbers of arguments, and only define the C macros if these
parameters can actually be determined.
* k5-platform.h (k5_getpwnam_r, k5_getpwuid_r): New macros.
ticket: 2982
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17155 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our somewhat outdated HP-UX support (which was targeted at HP-UX 10, not 11)
does not have support for shared library initialization and finalization
functions, nor for shared library export lists. The former was causing
compilation failures unless shared library support was disabled.
* include/k5-platform.h: Expand on init/fini comments some more.
(MAKE_FINI_FUNCTION): Add an HP-UX specific variant that defines an auxiliary
function fitting the signature of HP-UX 10 library combined
initializer/finalizer functions.
* config/lib.in (hpux10.exports): New target, constructed similar to
osf1.exports but with HP-UX 10.x linker options, no initializers, and "errno"
explicitly added to the export list.
* shlib.conf (*-*-hpux*): Combine PICFLAGS setting with SHLIB_EXPFLAGS and
LDCOMBINE setting. Add linker option "-c hpux10.exports" to LDCOMBINE. Set
SHLIB_EXPORT_FILE_DEP to hpux10.exports. Set use_linker_fini_option.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17153 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
* k5-platform.h (PROGRAM_EXITING) [__GNUC__ && !_WIN32 &&
CONSTRUCTOR_ATTR_WORKS && !DELAY_INITIALIZER]: Define as zero.
ticket: 2916
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17089 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
statement expression so any line number info printed by assertion failures is
useful.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16589 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
* k5-platform.h (inline): Don't define here.
* win-mac.h (inline): Define as __inline.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16536 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
(JOIN__2, JOIN__2_2): Renamed from JOIN2 and JOIN2_2. Insert two underscores
between the tokens supplied. All uses changed to use new macros, and not use
identifiers with leading underscores.
ticket: 2603
status: resolved
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16521 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
the linker-driven version for Windows. The auxinit function definition needs
an argument list.
(MAKE_FINI_FUNCTION): Likewise.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16488 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(CONSTRUCTOR_ATTR_WORKS, DESTRUCTOR_ATTR_WORKS): Don't define.
(USE_LINKER_FINI_OPTION): Don't define.
(MAYBE_DUMMY_INIT): New macro, to optionally produce a dummy initializer for
the linker to reference in the case where other options indicate we don't want
to use it.
(MAKE_INIT_FUNCTION): Use it in some versions. Set the exported function name
to have a __auxinit suffix.
(MAKE_FINI_FUNCTION) [!SHARED]: Declare the function static, and do nothing to
try to cause it to get invoked.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16282 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that the initializer completed successfully. Delay initialization on POSIX
until the first "verification" call. Currently specific to a few platforms,
but should still build on others without thread support enabled.
Use it to finish creating (if necessary) and destroy mutexes, and free some
other storage "permanently" allocated by libraries (currently, libkrb5
cache/keytab type registries only). Change initialization of static mutexes to
a two-step operation, a static "partial" initializer and a "finish_init"
routine called from a thread-safe environment like library initialization is
assumed to be. POSIX will use the former, Windows will use the latter, and the
debug support will check that *both* have been used.
Added init/fini functions to com_err, profile, krb5, and gssapi libraries.
(The profile library one may need to be removed later.) The existing ones, not
thread-safe, are still around.
Use weak symbol support if available to figure out if the pthread library has
been linked in, and avoid calling certain routines if the C library stubs are
known not to exist or work.
Stub declarations for thread-specific data.
Minor bugfixes, whitespace changes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16268 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
define it.
ticket: 2040
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15929 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
64-bit ints to unsigned char fields to avoid warnings
ticket: 1471
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15925 dc483132-0cff-0310-8789-dd5450dbe970
|
|
k5-platform.h. Add 64-bit serializer support. [Not needed for ticket 1471,
but needed for 2040 and annoying to check in separately.]
Add to (internal for now) crypto API a function to get the mandatory checksum
type associated with an enctype.
New support for server-generated subkey, selected via an auth_context flag.
ticket: 1471
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15908 dc483132-0cff-0310-8789-dd5450dbe970
|