summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-08-10 14:15:00 +0000
committermarkm <markm@FreeBSD.org>2001-08-10 14:15:00 +0000
commit9768c83960fe88626b6f94cf79422469982a2b41 (patch)
tree11f0164a99d28c7642b05252ec30cc78e681127c /lib
parent7b1059217e3c0b55bca7a5400827cf044cc7d853 (diff)
downloadFreeBSD-src-9768c83960fe88626b6f94cf79422469982a2b41.zip
FreeBSD-src-9768c83960fe88626b6f94cf79422469982a2b41.tar.gz
Declare the new user-error reporting macro.
This is a macro to allow use of the __FILE__ and __FUNCTION__ macros.
Diffstat (limited to 'lib')
-rw-r--r--lib/libpam/libpam/pam_mod_misc.h12
-rw-r--r--lib/libpam/libpam/security/pam_mod_misc.h12
2 files changed, 18 insertions, 6 deletions
diff --git a/lib/libpam/libpam/pam_mod_misc.h b/lib/libpam/libpam/pam_mod_misc.h
index 5d80dd6..5e7b01f 100644
--- a/lib/libpam/libpam/pam_mod_misc.h
+++ b/lib/libpam/libpam/pam_mod_misc.h
@@ -46,6 +46,7 @@ struct opttab {
struct options {
struct {
+ const char *name;
int bool;
char *arg;
} opt[PAM_MAX_OPTIONS];
@@ -60,15 +61,20 @@ void pam_set_option(struct options *, enum opt);
void pam_clear_option(struct options *, enum opt);
void _pam_log(struct options *, const char *, const char *, const char *, ...);
void _pam_log_retval(struct options *, const char *, const char *, int);
+void _pam_verbose_error(pam_handle_t *, struct options *, const char *,
+ const char *, const char *, ...);
__END_DECLS
-#define PAM_LOG(args...) \
+#define PAM_LOG(args...) \
_pam_log(&options, __FILE__, __FUNCTION__, ##args)
#define PAM_RETURN(arg) \
do { \
- _pam_log_retval(&options, __FILE__, __FUNCTION__, arg); \
- return arg; \
+ _pam_log_retval(&options, __FILE__, __FUNCTION__, arg); \
+ return arg; \
} while (0)
+#define PAM_VERBOSE_ERROR(args...) \
+ _pam_verbose_error(pamh, &options, __FILE__, __FUNCTION__, ##args)
+
#endif
diff --git a/lib/libpam/libpam/security/pam_mod_misc.h b/lib/libpam/libpam/security/pam_mod_misc.h
index 5d80dd6..5e7b01f 100644
--- a/lib/libpam/libpam/security/pam_mod_misc.h
+++ b/lib/libpam/libpam/security/pam_mod_misc.h
@@ -46,6 +46,7 @@ struct opttab {
struct options {
struct {
+ const char *name;
int bool;
char *arg;
} opt[PAM_MAX_OPTIONS];
@@ -60,15 +61,20 @@ void pam_set_option(struct options *, enum opt);
void pam_clear_option(struct options *, enum opt);
void _pam_log(struct options *, const char *, const char *, const char *, ...);
void _pam_log_retval(struct options *, const char *, const char *, int);
+void _pam_verbose_error(pam_handle_t *, struct options *, const char *,
+ const char *, const char *, ...);
__END_DECLS
-#define PAM_LOG(args...) \
+#define PAM_LOG(args...) \
_pam_log(&options, __FILE__, __FUNCTION__, ##args)
#define PAM_RETURN(arg) \
do { \
- _pam_log_retval(&options, __FILE__, __FUNCTION__, arg); \
- return arg; \
+ _pam_log_retval(&options, __FILE__, __FUNCTION__, arg); \
+ return arg; \
} while (0)
+#define PAM_VERBOSE_ERROR(args...) \
+ _pam_verbose_error(pamh, &options, __FILE__, __FUNCTION__, ##args)
+
#endif
OpenPOWER on IntegriCloud