summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-05-27 23:15:10 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-06-03 10:01:13 +0200
commit78eae10aa035bc0e0996189b9d11c8db4904a98d (patch)
tree71caa7330b5e6c88f262315dcd148139cffd31d6
parent9e17b0516d2b640d34cbb50933bd065e65bfab9d (diff)
downloadsssd-78eae10aa035bc0e0996189b9d11c8db4904a98d.tar.gz
sssd-78eae10aa035bc0e0996189b9d11c8db4904a98d.tar.xz
sssd-78eae10aa035bc0e0996189b9d11c8db4904a98d.zip
PAM: Use fallback version of some pam macros
The header file security/_pam_macros.h is not available in openapam. This patch copies necessary macros from linux-pam 1.1.8. Reviewed-by: Sumit Bose <sbose@redhat.com>
-rw-r--r--src/sss_client/sss_pam_macros.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/sss_client/sss_pam_macros.h b/src/sss_client/sss_pam_macros.h
index 198633c5a..0a7e26601 100644
--- a/src/sss_client/sss_pam_macros.h
+++ b/src/sss_client/sss_pam_macros.h
@@ -29,7 +29,20 @@
* _pam_overwrite_n(n,x) macro. This implementation is copied from
* the Fedora 11 _pam_macros.h.
*/
-#include <security/_pam_macros.h>
+#ifdef HAVE_SECURITY__PAM_MACROS_H
+# include <security/_pam_macros.h>
+#endif /* HAVE_SECURITY__PAM_MACROS_H */
+
+#ifndef _pam_overwrite
+#define _pam_overwrite(x) \
+do { \
+ register char *__xx__; \
+ if ((__xx__=(x))) \
+ while (*__xx__) \
+ *__xx__++ = '\0'; \
+} while (0)
+#endif /* _pam_overwrite */
+
#ifndef _pam_overwrite_n
#define _pam_overwrite_n(x,n) \
do { \
@@ -41,4 +54,8 @@ do { \
} while (0)
#endif /* _pam_overwrite_n */
+#ifndef D
+#define D(x) do { } while (0)
+#endif /* D */
+
#endif /* _SSS_PAM_MACROS_H */