summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2009-05-16 07:01:37 +0000
committerArthur de Jong <arthur@arthurdejong.org>2009-05-16 07:01:37 +0000
commit461eced318409779bd7ce80ed6232ce627377f77 (patch)
tree022116980d5c2567d0e95a621e6822bc295125cc
parent1389c21c04330d50afec29c3ca2f17a00d4b6d1e (diff)
quick fix for building PAM module
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@885 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nss/common.h17
-rw-r--r--pam/pam.c3
2 files changed, 15 insertions, 5 deletions
diff --git a/nss/common.h b/nss/common.h
index 3d2de88..01fce97 100644
--- a/nss/common.h
+++ b/nss/common.h
@@ -108,6 +108,17 @@ TFILE *nslcd_client_open(void)
bodies. These functions have very common code so this can
easily be reused. */
+#ifndef SKIP_BUFCHECK
+#define NSS_BUFCHECK \
+ if ((buffer==NULL)||(buflen<=0)) \
+ { \
+ *errnop=EINVAL; \
+ return NSS_STATUS_UNAVAIL; \
+ }
+#else /* SKIP_BUFCHECK */
+#define NSS_BUFCHECK /* empty */
+#endif /* SKIP_BUFCHECK */
+
/* This is a generic get..by..() generation macro. The action
parameter is the NSLCD_ACTION_.. action, the param is the
operation for writing the parameter and readfn is the function
@@ -121,11 +132,7 @@ TFILE *nslcd_client_open(void)
int32_t tmpint32; \
enum nss_status retv; \
/* check that we have a valid buffer */ \
- if ((buffer==NULL)||(buflen<=0)) \
- { \
- *errnop=EINVAL; \
- return NSS_STATUS_UNAVAIL; \
- } \
+ NSS_BUFCHECK \
/* open socket and write request */ \
OPEN_SOCK(fp); \
WRITE_REQUEST(fp,action); \
diff --git a/pam/pam.c b/pam/pam.c
index 89e6ca0..21f0e89 100644
--- a/pam/pam.c
+++ b/pam/pam.c
@@ -32,6 +32,9 @@
#include <errno.h>
#include <syslog.h>
+/* really ugly workaround */
+#define SKIP_BUFCHECK 1
+
#include "nss/common.h"
#include "compat/attrs.h"