diff options
author | Russ Allbery <rra@stanford.edu> | 2010-02-09 16:00:04 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2010-02-09 16:00:04 -0800 |
commit | d05f66dbff10b525d37f60ee01d5b9f94bf5192e (patch) | |
tree | 36657983c619cfb7260781b2607ead4afc3ad866 /util/messages-krb5.h | |
parent | ccf1cd7efa90bdcbe834e0d4ca144289cca97fd7 (diff) |
Update util code and import Kerberos portability glue
Use the Kerberos portability layer from rra-c-util 3.0 and avoid
Kerberos API calls deprecated on Heimdal. Break util/util.h into
separate header files and update all source files accordingly.
The test suite is not yet updated. That will come in subsequent
commits.
Diffstat (limited to 'util/messages-krb5.h')
-rw-r--r-- | util/messages-krb5.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/util/messages-krb5.h b/util/messages-krb5.h new file mode 100644 index 0000000..3b763c8 --- /dev/null +++ b/util/messages-krb5.h @@ -0,0 +1,39 @@ +/* + * Prototypes for error handling for Kerberos. + * + * Written by Russ Allbery <rra@stanford.edu> + * Copyright 2006, 2007, 2008, 2009, 2010 + * Board of Trustees, Leland Stanford Jr. University + * + * See LICENSE for licensing terms. + */ + +#ifndef UTIL_MESSAGES_KRB5_H +#define UTIL_MESSAGES_KRB5_H 1 + +#include <config.h> +#include <portable/macros.h> + +#include <krb5.h> +#include <sys/types.h> + +BEGIN_DECLS + +/* Default to a hidden visibility for all util functions. */ +#pragma GCC visibility push(hidden) + +/* + * The Kerberos versions of the reporting functions. These take a context and + * an error code to get the Kerberos error. + */ +void die_krb5(krb5_context, krb5_error_code, const char *, ...) + __attribute__((__nonnull__, __noreturn__, __format__(printf, 3, 4))); +void warn_krb5(krb5_context, krb5_error_code, const char *, ...) + __attribute__((__nonnull__, __format__(printf, 3, 4))); + +/* Undo default visibility change. */ +#pragma GCC visibility pop + +END_DECLS + +#endif /* UTIL_MESSAGES_KRB5_H */ |