summaryrefslogtreecommitdiff
path: root/pam_pwdfile.c
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2013-05-10 21:27:56 +0200
committerTimo Weingärtner <timo@tiwe.de>2013-05-12 18:44:18 +0200
commit88dd2b1a22cd06fc401a8ddadd41114cebe159d5 (patch)
tree8f5e911e36bf06ef96ae33d1b76f61f350baceb6 /pam_pwdfile.c
parent138c589dd4cdf68659bfa643e5659fa1200f6081 (diff)
downloadlibpam-pwdfile-88dd2b1a22cd06fc401a8ddadd41114cebe159d5.tar.gz
include proper headers for crypt()
this also prepares for crypt_r()
Diffstat (limited to 'pam_pwdfile.c')
-rw-r--r--pam_pwdfile.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/pam_pwdfile.c b/pam_pwdfile.c
index 80cd893..34ce78d 100644
--- a/pam_pwdfile.c
+++ b/pam_pwdfile.c
@@ -42,6 +42,18 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef USE_CRYPT_R
+#define _GNU_SOURCE
+#include <crypt.h>
+#else
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 700
+#endif
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+#endif
+
#include <features.h>
#include <syslog.h>
#include <stdio.h>
@@ -62,8 +74,7 @@
#include <security/pam_ext.h>
#include "md5.h"
-extern char *crypt(const char *key, const char *salt);
-extern char *bigcrypt(const char *key, const char *salt);
+#include "bigcrypt.h"
#define CRYPTED_DESPWD_LEN 13
#define CRYPTED_MD5PWD_LEN 34