Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.
authorIra Cooper <samba@ira.wakeful.net>
Tue, 31 Jan 2012 20:15:36 +0000 (12:15 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 31 Jan 2012 22:28:09 +0000 (23:28 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104

lib/replace/replace.h
lib/replace/system/passwd.h

index c081f23c266ca49e30d92996ae6db594ba7b3d10..c47cf1c1b10a57c06ba6da5fefe30c29b0d57370 100644 (file)
@@ -802,4 +802,15 @@ int fdatasync(int );
 /* prototype is in "system/network.h" */
 #endif
 
+#if !defined(getpass)
+#ifdef REPLACE_GETPASS
+#if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
+#define getpass(prompt) getpassphrase(prompt)
+#else
+#define getpass(prompt) rep_getpass(prompt)
+char *rep_getpass(const char *prompt);
+#endif
+#endif
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */
index f630012f00081d37352ee72deccae18ec52f9617..223324c4b4670cd2b9f2ef85fd9afb8d9b07ec24 100644 (file)
@@ -67,6 +67,7 @@
 #include <compat.h>
 #endif
 
+#if !defined(getpass)
 #ifdef REPLACE_GETPASS
 #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
 #define getpass(prompt) getpassphrase(prompt)
@@ -75,6 +76,7 @@
 char *rep_getpass(const char *prompt);
 #endif
 #endif
+#endif 
 
 #ifndef NGROUPS_MAX
 #define NGROUPS_MAX 32 /* Guess... */