From 35bcdd437b531072dd587f50cf9e56084974746b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 5 Feb 2018 10:57:36 +0000 Subject: Fixes to headers and INSTALL doc --- INSTALL | 17 +++-------------- configure | 4 ++-- src/include/pamela/common.h | 5 +++++ src/include/pamela/pam.h | 9 ++++++++- src/include/pamela/pamela.h | 18 ++++++++++-------- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/INSTALL b/INSTALL index 0283d17..72b4d2e 100644 --- a/INSTALL +++ b/INSTALL @@ -21,8 +21,9 @@ as well as Linux-PAM. As of February 2018, this means only Linux. ./configure && make && sudo make install will work for most users. - It will install the binaries in /bin and the static libraries in -/usr/lib/pamela. + It will install the pamelad binary in /libexec, +the static library in /usr/lib/pamela, +and the shared library in /lib. Please note that static libraries in /usr/lib/pamela *will not* be found by a default linker invocation: you need -L/usr/lib/pamela. @@ -86,18 +87,6 @@ obtaining the behaviour you want. install to a staging directory. -* Shared libraries - ---------------- - - Software from skarnet.org is small enough that shared libraries are -generally not worth using. Static linking is simpler and incurs less -runtime overhead and less points of failure: so by default, shared -libraries are not built and binaries are linked against the static -versions of the skarnet.org libraries. Nevertheless, you can: - * build shared libraries: --enable-shared - * link binaries against shared libraries: --disable-allstatic - - * Static binaries --------------- diff --git a/configure b/configure index de87b55..f94fcf1 100755 --- a/configure +++ b/configure @@ -36,7 +36,7 @@ Dependencies: /usr/lib/skalibs/sysdeps. Optional features: - --enable-shared build shared libraries [disabled] + --disable-shared do not build shared libraries [enabled] --disable-static do not build static libraries [enabled] --disable-allstatic do not prefer linking against static libraries [enabled] --enable-static-libc make entirely static binaries [disabled] @@ -141,7 +141,7 @@ libdir='$prefix/lib/$package' includedir='$prefix/include' sysdeps='$prefix/lib/skalibs/sysdeps' manualsysdeps=false -shared=false +shared=true static=true allpic=detect slashpackage=false diff --git a/src/include/pamela/common.h b/src/include/pamela/common.h index 5ae689e..cca90a4 100644 --- a/src/include/pamela/common.h +++ b/src/include/pamela/common.h @@ -3,6 +3,10 @@ #ifndef PAMELA_COMMON_H #define PAMELA_COMMON_H + /* + Stuff used by the client library as well as pamelad. + */ + #define PAMELA_BUFSIZE 4096 enum pamela_retcode_e @@ -97,5 +101,6 @@ enum pamela_op_e #define PAMELA_PAM_REINITIALIZE_CRED 0x0008U #define PAMELA_PAM_REFRESH_CRED 0x0010U #define PAMELA_PAM_CHANGE_EXPIRED_AUTHTOK 0x0020U +#define PAMELA_PAM_DATA_SILENT 0x40000000U #endif diff --git a/src/include/pamela/pam.h b/src/include/pamela/pam.h index aab7d7d..e3f0b86 100644 --- a/src/include/pamela/pam.h +++ b/src/include/pamela/pam.h @@ -3,9 +3,12 @@ #ifndef PAMELA_PAM_H #define PAMELA_PAM_H +#ifdef __cplusplus +extern "C" { +#endif + /* This is pamela's client-side PAM library. - */ #include @@ -158,4 +161,8 @@ extern int pam_putenv (pam_handle_t *, char const *) ; extern char const *pam_getenv (pam_handle_t *, char const *) ; extern char **pam_getenvlist (pam_handle_t *) ; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/pamela/pamela.h b/src/include/pamela/pamela.h index ca45124..ce5a971 100644 --- a/src/include/pamela/pamela.h +++ b/src/include/pamela/pamela.h @@ -3,9 +3,11 @@ #ifndef PAMELA_H #define PAMELA_H -#ifdef __cplusplus -extern "C" { -#endif + /* + Declarations for the client library. + This is the internal layer, that does not + depend on the PAM API. + */ #include #include @@ -15,6 +17,11 @@ extern "C" { #include + /* Misc defs */ + +#define PAMELA_BUFSIZE 4096 + + /* pam_fail_delay */ typedef void pamela_pam_delay_func_t (int, unsigned int, void *) ; @@ -72,9 +79,4 @@ extern int pamela_set_item (pamela_t *, unsigned char, char const *) ; extern int pamela_set_itemv (pamela_t *, unsigned char, struct iovec const *, unsigned int) ; extern int pamela_op (pamela_t *, unsigned char, int) ; - -#ifdef __cplusplus -} -#endif - #endif -- cgit v1.2.3