[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh ChangeLog h/prototypes.h sbr/ruserpass.c [nmh-1_3-bran
From: |
Peter Maydell |
Subject: |
[Nmh-commits] nmh ChangeLog h/prototypes.h sbr/ruserpass.c [nmh-1_3-branch] |
Date: |
Sun, 04 May 2008 21:00:20 +0000 |
CVSROOT: /sources/nmh
Module name: nmh
Branch: nmh-1_3-branch
Changes by: Peter Maydell <pm215> 08/05/04 21:00:20
Modified files:
. : ChangeLog
h : prototypes.h
sbr : ruserpass.c
Log message:
Port from trunk: bug #23167: sbr/ruserpass.c (ruserpass): make bad
permissions on .netrc be an instantly fatal error. Previously we
returned an
error value; however, no caller was checking it. So now ruserpass() has
a
void return type.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/ChangeLog?cvsroot=nmh&only_with_tag=nmh-1_3-branch&r1=1.254.2.4&r2=1.254.2.5
http://cvs.savannah.gnu.org/viewcvs/nmh/h/prototypes.h?cvsroot=nmh&only_with_tag=nmh-1_3-branch&r1=1.20&r2=1.20.2.1
http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/ruserpass.c?cvsroot=nmh&only_with_tag=nmh-1_3-branch&r1=1.7&r2=1.7.2.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/nmh/nmh/ChangeLog,v
retrieving revision 1.254.2.4
retrieving revision 1.254.2.5
diff -u -b -r1.254.2.4 -r1.254.2.5
--- ChangeLog 4 May 2008 16:22:51 -0000 1.254.2.4
+++ ChangeLog 4 May 2008 21:00:18 -0000 1.254.2.5
@@ -2,6 +2,11 @@
* Fixes ported from trunk:
+ * bug #23167: sbr/ruserpass.c (ruserpass): make bad permissions
+ on .netrc be an instantly fatal error. Previously we returned
+ an error value; however, no caller was checking it. So now
+ ruserpass() has a void return type.
+
* bug #23163: various minor fixes for the benefit of
older Unixes (specifically SunOS 4):
reintroduce strerror() substitute implementation
Index: h/prototypes.h
===================================================================
RCS file: /sources/nmh/nmh/h/prototypes.h,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -b -r1.20 -r1.20.2.1
--- h/prototypes.h 8 Nov 2007 02:28:38 -0000 1.20
+++ h/prototypes.h 4 May 2008 21:00:19 -0000 1.20.2.1
@@ -2,7 +2,7 @@
/*
* prototypes.h -- various prototypes
*
- * $Id: prototypes.h,v 1.20 2007/11/08 02:28:38 jjr Exp $
+ * $Id: prototypes.h,v 1.20.2.1 2008/05/04 21:00:19 pm215 Exp $
*/
/*
@@ -98,7 +98,7 @@
char *r1bindex(char *, int);
void readconfig (struct node **, FILE *, char *, int);
int refile (char **, char *);
-int ruserpass(char *, char **, char **);
+void ruserpass(char *, char **, char **);
int remdir (char *);
int seq_addmsg (struct msgs *, char *, int, int, int);
int seq_addsel (struct msgs *, char *, int, int);
Index: sbr/ruserpass.c
===================================================================
RCS file: /sources/nmh/nmh/sbr/ruserpass.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -b -r1.7 -r1.7.2.1
--- sbr/ruserpass.c 8 Mar 2006 12:14:16 -0000 1.7
+++ sbr/ruserpass.c 4 May 2008 21:00:20 -0000 1.7.2.1
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ruserpass.c,v 1.7 2006/03/08 12:14:16 bress Exp $
+ * $Id: ruserpass.c,v 1.7.2.1 2008/05/04 21:00:20 pm215 Exp $
*/
#include <h/mh.h>
@@ -61,7 +61,7 @@
static int token(void);
-int
+void
ruserpass(char *host, char **aname, char **apass)
{
char *hdir, buf[BUFSIZ];
@@ -108,9 +108,9 @@
case PASSWD:
if (fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
- fprintf(stderr, "Error - .netrc file not correct
mode.\n");
- fprintf(stderr, "Remove password or correct mode.\n");
- goto bad;
+ /* We make this a fatal error to force the user to
correct it */
+ advise(NULL, "Error - ~/.netrc file must not be world
or group readable.");
+ adios(NULL, "Remove password or correct file
permissions.");
}
if (token() && *apass == 0) {
*apass = mh_xmalloc((size_t) strlen(tokval) + 1);
@@ -173,10 +173,6 @@
strcpy (*apass, mypass);
}
- return(0);
-bad:
- fclose(cfile);
- return(-1);
}
static int
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] nmh ChangeLog h/prototypes.h sbr/ruserpass.c [nmh-1_3-branch],
Peter Maydell <=