From 0373bb10920a5ea0f5b9f7a33033398132d2bd85 Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Tue, 1 May 2001 04:27:37 +0000 Subject: Relevant BUGIDs: 420270 Purpose of commit: bugfix Commit summary: --------------- Allow C++ compilation when using pam_misc.h and pam_client.h. --- CHANGELOG | 2 ++ libpam_misc/include/security/pam_misc.h | 11 ++++++++--- libpamc/include/security/pam_client.h | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3fd82275..02a679b8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,8 @@ bug report - outstanding bugs are listed here: 0.76: please submit patches for this section with actual code/doc patches! +* c++ header fixes for pam_misc.h and pam_client.h - from Alexandre + Sagala (Bug 420270 - agmorgan) * pam_access fixes - looks out for trailing '.' - from Carlo Marcelo Arenas Belon (Bug 419631 - agmorgan) * don't zero out password strings during pam_unix's password changing diff --git a/libpam_misc/include/security/pam_misc.h b/libpam_misc/include/security/pam_misc.h index b1ae03d0..0ec2fdd1 100644 --- a/libpam_misc/include/security/pam_misc.h +++ b/libpam_misc/include/security/pam_misc.h @@ -6,6 +6,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* include some useful macros */ #include @@ -51,7 +55,8 @@ extern char **pam_misc_drop_env(char **env); extern int pam_misc_setenv(pam_handle_t *pamh, const char *name , const char *value, int readonly); -#endif +#ifdef __cplusplus +} +#endif /* def __cplusplus */ - - +#endif /* ndef __PAMMISC_H */ diff --git a/libpamc/include/security/pam_client.h b/libpamc/include/security/pam_client.h index 90040fbe..16a2c1b1 100644 --- a/libpamc/include/security/pam_client.h +++ b/libpamc/include/security/pam_client.h @@ -9,6 +9,10 @@ #ifndef PAM_CLIENT_H #define PAM_CLIENT_H +#ifdef __cplusplus +extern "C" { +#endif /* def __cplusplus */ + #include #include #include @@ -186,5 +190,8 @@ do { \ (((prompt)->control <= PAM_BPC_FAIL && (prompt)->control >= PAM_BPC_OK) \ ? PAM_BPC_TRUE:PAM_BPC_FALSE) +#ifdef __cplusplus +} +#endif /* def __cplusplus */ #endif /* PAM_CLIENT_H */ -- cgit v1.2.1