blob: 28e0d50f56b39b4c2c2bf4c58e1c922fb59be58b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
--- input.c.orig Thu Jan 14 03:19:14 1999
+++ input.c Fri Feb 28 13:48:38 2003
@@ -60,11 +60,27 @@
#error "Shadow and PAM don't mix!"
#endif
+#if (__FreeBSD__ == 0) /* 1.0 did not define __FreeBSD__ */
+#define __FreeBSD_version 199401
+#elsif __FreeBSD__ == 1 /* 1.1 defined it to be 1 */
+#define __FreeBSD_version 199405
+#else /* 2.0 and higher define it to be 2 */
+#include <osreldate.h> /* and this works */
+#endif
+
#include <security/pam_appl.h>
+#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030)
+#include <security/openpam.h>
+#else
#include <security/pam_misc.h>
+#endif
static struct pam_conv PAM_conversation = {
+#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030)
+ openpam_ttyconv,
+#else
&misc_conv,
+#endif
NULL
};
@@ -291,7 +307,7 @@
setuid(getuid());
setgid(getgid());
- sprintf(prompt, "%s's password: ", username);
+ snprintf(prompt, 99, "%s's password: ", username);
#endif /* !USE_PAM */
}
|