diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2009-05-16 07:01:37 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2009-05-16 07:01:37 +0000 |
commit | 461eced318409779bd7ce80ed6232ce627377f77 (patch) | |
tree | 022116980d5c2567d0e95a621e6822bc295125cc | |
parent | 1389c21c04330d50afec29c3ca2f17a00d4b6d1e (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.h | 17 | ||||
-rw-r--r-- | pam/pam.c | 3 |
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); \ @@ -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" |