1 From 18611335c830d6ea78d79e2376559c8f221db1dc Mon Sep 17 00:00:00 2001 |
|
2 From: Ira Cooper <[email protected]> |
|
3 Date: Tue, 31 Jan 2012 12:15:36 -0800 |
|
4 Subject: [PATCH] Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 |
|
5 and master. |
|
6 |
|
7 Autobuild-User: Jeremy Allison <[email protected]> |
|
8 Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104 |
|
9 (cherry picked from commit a1901b55cfa658f39a33d0ea120641f56453fe4e) |
|
10 --- |
|
11 lib/replace/replace.h | 11 +++++++++++ |
|
12 lib/replace/system/passwd.h | 2 ++ |
|
13 2 files changed, 13 insertions(+), 0 deletions(-) |
|
14 |
|
15 diff --git a/lib/replace/replace.h b/lib/replace/replace.h |
|
16 index c081f23..c47cf1c 100644 |
|
17 --- a/lib/replace/replace.h |
|
18 +++ b/lib/replace/replace.h |
|
19 @@ -802,4 +802,15 @@ int fdatasync(int ); |
|
20 /* prototype is in "system/network.h" */ |
|
21 #endif |
|
22 |
|
23 +#if !defined(getpass) |
|
24 +#ifdef REPLACE_GETPASS |
|
25 +#if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) |
|
26 +#define getpass(prompt) getpassphrase(prompt) |
|
27 +#else |
|
28 +#define getpass(prompt) rep_getpass(prompt) |
|
29 +char *rep_getpass(const char *prompt); |
|
30 +#endif |
|
31 +#endif |
|
32 +#endif |
|
33 + |
|
34 #endif /* _LIBREPLACE_REPLACE_H */ |
|
35 diff --git a/lib/replace/system/passwd.h b/lib/replace/system/passwd.h |
|
36 index aaea9c8..03476b9 100644 |
|
37 --- a/lib/replace/system/passwd.h |
|
38 +++ b/lib/replace/system/passwd.h |
|
39 @@ -67,6 +67,7 @@ |
|
40 #include <compat.h> |
|
41 #endif |
|
42 |
|
43 +#if !defined(getpass) |
|
44 #ifdef REPLACE_GETPASS |
|
45 #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) |
|
46 #define getpass(prompt) getpassphrase(prompt) |
|
47 @@ -75,6 +76,7 @@ |
|
48 char *rep_getpass(const char *prompt); |
|
49 #endif |
|
50 #endif |
|
51 +#endif |
|
52 |
|
53 #ifndef NGROUPS_MAX |
|
54 #define NGROUPS_MAX 32 /* Guess... */ |
|
55 -- |
|
56 1.7.7.3 |
|
57 |
|