summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-02-05 10:57:36 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-02-05 10:57:36 +0000
commit35bcdd437b531072dd587f50cf9e56084974746b (patch)
treeaad79d5019d567b85ad759d894f617ae6a6ef303
parent03012f54b1bcd31e0b817fc0222a9a47709c4018 (diff)
downloadpamela-35bcdd437b531072dd587f50cf9e56084974746b.tar.xz
Fixes to headers and INSTALL doc
-rw-r--r--INSTALL17
-rwxr-xr-xconfigure4
-rw-r--r--src/include/pamela/common.h5
-rw-r--r--src/include/pamela/pam.h9
-rw-r--r--src/include/pamela/pamela.h18
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 <skalibs/uint64.h>
@@ -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 <sys/types.h>
#include <stdint.h>
@@ -15,6 +17,11 @@ extern "C" {
#include <pamela/common.h>
+ /* 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