Blame SOURCES/cvs-1.11.23-cvspass.patch

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