Blame SOURCES/cvs-1.11.23-cvspass.patch

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