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)
committerKarolin Seeger <kseeger@samba.org>
Fri, 3 Feb 2012 19:26:53 +0000 (20:26 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104
(cherry picked from commit a1901b55cfa658f39a33d0ea120641f56453fe4e)

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 aaea9c8344e75b0dc02c972ffc83dd1ec8273ae6..ee9354bb4c79652f02d1c5f8c98ba0f32e98f377 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... */