Blame SOURCES/cvs-1.11.23-cvspass.patch

da0b77
From e4a25dba948af9211ffea6b27293fe15c4b3ba07 Mon Sep 17 00:00:00 2001
da0b77
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
da0b77
Date: Wed, 4 Dec 2013 08:37:24 +0100
da0b77
Subject: [PATCH] Create ~/.cvspass at login if it does not exists
da0b77
MIME-Version: 1.0
da0b77
Content-Type: text/plain; charset=UTF-8
da0b77
Content-Transfer-Encoding: 8bit
da0b77
da0b77
<https://bugzilla.redhat.com/show_bug.cgi?id=47457>
da0b77
da0b77
Signed-off-by: Petr Písař <ppisar@redhat.com>
da0b77
---
da0b77
 src/login.c   | 9 +++++++++
da0b77
 src/logmsg.c  | 2 +-
da0b77
 src/sanity.sh | 7 ++++++-
da0b77
 3 files changed, 16 insertions(+), 2 deletions(-)
da0b77
da0b77
diff --git a/src/login.c b/src/login.c
da0b77
index 50b292b..75dc53a 100644
da0b77
--- a/src/login.c
da0b77
+++ b/src/login.c
da0b77
@@ -315,6 +315,15 @@ internal error: can only call password_entry_operation with pserver method");
814382
     fp = CVS_FOPEN (passfile, "r");
814382
     if (fp == NULL)
814382
     {
814382
+       fp = CVS_FOPEN (passfile, "w");
814382
+       if (fp != NULL)
814382
+       {
814382
+           fclose (fp);
814382
+           fp = CVS_FOPEN (passfile, "r");
814382
+       }
814382
+    }
814382
+    if (fp == NULL)
814382
+    {
814382
 	error (0, errno, "warning: failed to open %s for reading", passfile);
814382
 	goto process;
814382
     }
da0b77
diff --git a/src/logmsg.c b/src/logmsg.c
da0b77
index 741231b..0d4d6a2 100644
da0b77
--- a/src/logmsg.c
da0b77
+++ b/src/logmsg.c
da0b77
@@ -269,7 +269,7 @@ do_editor (dir, messagep, repository, changes)
814382
     }
814382
 
814382
     (void) fprintf (fp,
814382
-  "%s----------------------------------------------------------------------\n",
814382
+  "\n%s----------------------------------------------------------------------\n",
814382
 		    CVSEDITPREFIX);
814382
     (void) fprintf (fp,
814382
   "%sEnter Log.  Lines beginning with `%.*s' are removed automatically\n%s\n",
da0b77
diff --git a/src/sanity.sh b/src/sanity.sh
da0b77
index dbcae19..f119840 100755
da0b77
--- a/src/sanity.sh
da0b77
+++ b/src/sanity.sh
da0b77
@@ -4195,7 +4195,6 @@ ${PROG} commit: Rebuilding administrative file database"
da0b77
 "$PROG logout: WARNING: Ignoring method options found in CVSROOT: \`proxy=localhost;proxyport=8080'\.
da0b77
 $PROG logout: Use CVS version 1\.12\.7 or later to handle method options\.
da0b77
 Logging out of :pserver:$username@localhost:2401/dev/null
da0b77
-$PROG logout: warning: failed to open $HOME/\.cvspass for reading: No such file or directory
da0b77
 $PROG logout: Entry not found\."
da0b77
 	  fi
da0b77
 
da0b77
@@ -15552,6 +15551,7 @@ description:
da0b77
 revision 1\.1
da0b77
 date: [0-9/]* [0-9:]*;  author: ${username};  state: Exp;
da0b77
 branches:  1\.1\.2;
da0b77
+x
da0b77
 xCVS: ----------------------------------------------------------------------
da0b77
 xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
da0b77
 xCVS:
da0b77
@@ -15563,6 +15563,7 @@ xCVS: ----------------------------------------------------------------------
da0b77
 ----------------------------
da0b77
 revision 1\.1\.2\.1
da0b77
 date: [0-9/]* [0-9:]*;  author: ${username};  state: Exp;  lines: ${PLUS}1 -0
da0b77
+x
da0b77
 xCVS: ----------------------------------------------------------------------
da0b77
 xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
da0b77
 xCVS:
da0b77
@@ -15590,6 +15591,7 @@ description:
814382
 revision 1\.1
814382
 date: [0-9/]* [0-9:]*;  author: ${username};  state: Exp;
814382
 branches:  1\.1\.2;
814382
+x
814382
 xCVS: ----------------------------------------------------------------------
814382
 xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
814382
 xCVS:
da0b77
@@ -15601,6 +15603,7 @@ xCVS: ----------------------------------------------------------------------
814382
 ----------------------------
814382
 revision 1\.1\.2\.1
814382
 date: [0-9/]* [0-9:]*;  author: ${username};  state: Exp;  lines: ${PLUS}1 -0
814382
+x
814382
 xCVS: ----------------------------------------------------------------------
814382
 xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
814382
 xCVS:
da0b77
@@ -15622,6 +15625,7 @@ description:
814382
 revision 1\.1
814382
 date: [0-9/]* [0-9:]*;  author: ${username};  state: Exp;
814382
 branches:  1\.1\.2;
814382
+x
814382
 xCVS: ----------------------------------------------------------------------
814382
 xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
814382
 xCVS:
da0b77
@@ -15633,6 +15637,7 @@ xCVS: ----------------------------------------------------------------------
814382
 ----------------------------
814382
 revision 1\.1\.2\.1
814382
 date: [0-9/]* [0-9:]*;  author: ${username};  state: Exp;  lines: ${PLUS}1 -0
814382
+x
814382
 xCVS: ----------------------------------------------------------------------
814382
 xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
814382
 xCVS:
da0b77
-- 
da0b77
1.8.3.1
da0b77