[csw-devel] SF.net SVN: gar:[18875] csw/mgar/pkg/git/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Mon Jul 30 18:57:22 CEST 2012


Revision: 18875
          http://gar.svn.sourceforge.net/gar/?rev=18875&view=rev
Author:   bdwalton
Date:     2012-07-30 16:57:22 +0000 (Mon, 30 Jul 2012)
Log Message:
-----------
git/trunk: patch around limitation in getpass(); mantis 4943

Modified Paths:
--------------
    csw/mgar/pkg/git/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/git/trunk/files/0011-Use-getpassphrase-instead-of-getpass-when-prompting-.patch

Modified: csw/mgar/pkg/git/trunk/Makefile
===================================================================
--- csw/mgar/pkg/git/trunk/Makefile	2012-07-30 11:32:28 UTC (rev 18874)
+++ csw/mgar/pkg/git/trunk/Makefile	2012-07-30 16:57:22 UTC (rev 18875)
@@ -9,6 +9,10 @@
 
 VENDOR_URL = http://git-scm.org/
 
+# the getpassphrase patch is a non-build-related fix; mantis 4943
+# polish for upstream, but local for now
+VERSION_FLAG_PATCH = 1
+
 NO_SVN_TESTS=YesPlease
 GIT_TEST_OPTS=-i -v -d
 EXTRA_TEST_EXPORTS = NO_SVN_TESTS GIT_TEST_OPTS
@@ -120,6 +124,7 @@
 PATCHFILES += 0007-on-solaris-we-need-to-use-lintl-to-allow-the-new-i18.patch
 PATCHFILES += 0009-Makefile-Set-EXTRA_CPPFLAGS-during-the-compilation-o.patch
 PATCHFILES += 0010-t1304-improve-setfacl-prerequisite-setup.patch
+PATCHFILES += 0011-Use-getpassphrase-instead-of-getpass-when-prompting-.patch
 
 fdirs = $(bindir_install) $(mandir) $(libexecdir_install)
 define _git_files

Added: csw/mgar/pkg/git/trunk/files/0011-Use-getpassphrase-instead-of-getpass-when-prompting-.patch
===================================================================
--- csw/mgar/pkg/git/trunk/files/0011-Use-getpassphrase-instead-of-getpass-when-prompting-.patch	                        (rev 0)
+++ csw/mgar/pkg/git/trunk/files/0011-Use-getpassphrase-instead-of-getpass-when-prompting-.patch	2012-07-30 16:57:22 UTC (rev 18875)
@@ -0,0 +1,33 @@
+From fe054b8cbe161d01a66637976c1cabad0ce1c973 Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at opencsw.org>
+Date: Mon, 30 Jul 2012 18:13:23 +0200
+Subject: [PATCH] Use getpassphrase instead of getpass when prompting for
+ passwords
+
+The legacy getpass function returns at most 9 characters, including
+null termination which means an 8-character password.  Instead, use
+getpassphrase which allows up to 257 characters.
+
+Mantis ID 4943
+
+Signed-off-by: Ben Walton <bwalton at opencsw.org>
+---
+ compat/terminal.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compat/terminal.c b/compat/terminal.c
+index 6d16c8f..2585436 100644
+--- a/compat/terminal.c
++++ b/compat/terminal.c
+@@ -75,7 +75,7 @@ char *git_terminal_prompt(const char *prompt, int echo)
+ 
+ char *git_terminal_prompt(const char *prompt, int echo)
+ {
+-	return getpass(prompt);
++	return getpassphrase(prompt);
+ }
+ 
+ #endif
+-- 
+1.7.10.3
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list