CVS commit: src/usr.bin/msgs

2021-11-30 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov 30 12:03:38 UTC 2021

Modified Files:
src/usr.bin/msgs: pathnames.h

Log Message:
msgs(1): avoid executing /usr/bin/Mail, it no longer exists.

https://groups.google.com/g/comp.unix.bsd.netbsd.misc/c/Yni35VNCXOY


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/msgs/pathnames.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/msgs/pathnames.h
diff -u src/usr.bin/msgs/pathnames.h:1.4 src/usr.bin/msgs/pathnames.h:1.5
--- src/usr.bin/msgs/pathnames.h:1.4	Thu Aug  7 11:15:18 2003
+++ src/usr.bin/msgs/pathnames.h	Tue Nov 30 12:03:38 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pathnames.h,v 1.4 2003/08/07 11:15:18 agc Exp $	*/
+/*	$NetBSD: pathnames.h,v 1.5 2021/11/30 12:03:38 nia Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -32,7 +32,7 @@
  */
 
 #define	_PATH_MSGS	"/var/msgs"
-#define	_PATH_MAIL	"/usr/bin/Mail -f %s"
+#define	_PATH_MAIL	"/usr/bin/mailx -f %s"
 #define	_PATH_PAGER	"/usr/bin/more -%d"
 #undef _PATH_TMP
 #define	_PATH_TMP	"/tmp/msgXX"



CVS commit: src/usr.bin/msgs

2021-11-30 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov 30 12:03:38 UTC 2021

Modified Files:
src/usr.bin/msgs: pathnames.h

Log Message:
msgs(1): avoid executing /usr/bin/Mail, it no longer exists.

https://groups.google.com/g/comp.unix.bsd.netbsd.misc/c/Yni35VNCXOY


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/msgs/pathnames.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/msgs

2015-12-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Dec 31 01:16:47 UTC 2015

Modified Files:
src/usr.bin/msgs: msgs.c

Log Message:
Avoid leaking a file handle on error opening the next file. From
David Binderman in PR 50577.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/msgs/msgs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/msgs/msgs.c
diff -u src/usr.bin/msgs/msgs.c:1.23 src/usr.bin/msgs/msgs.c:1.24
--- src/usr.bin/msgs/msgs.c:1.23	Fri Oct 18 20:47:06 2013
+++ src/usr.bin/msgs/msgs.c	Thu Dec 31 01:16:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: msgs.c,v 1.23 2013/10/18 20:47:06 christos Exp $	*/
+/*	$NetBSD: msgs.c,v 1.24 2015/12/31 01:16:47 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)msgs.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: msgs.c,v 1.23 2013/10/18 20:47:06 christos Exp $");
+__RCSID("$NetBSD: msgs.c,v 1.24 2015/12/31 01:16:47 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -800,6 +800,7 @@ ask(const char *prompt)
 			perror(fname);
 			mailing = NO;
 			fseek(newmsg, oldpos, 0);
+			fclose(cpfrom);
 			ask(prompt);
 			return;
 		}



CVS commit: src/usr.bin/msgs

2015-12-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Dec 31 01:16:47 UTC 2015

Modified Files:
src/usr.bin/msgs: msgs.c

Log Message:
Avoid leaking a file handle on error opening the next file. From
David Binderman in PR 50577.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/msgs/msgs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/msgs

2013-11-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Nov 24 19:49:22 UTC 2013

Modified Files:
src/usr.bin/msgs: msgs.1

Log Message:
Fix documentation of how to expire old messages. For some reason the
expiration period must be given as a negative number, indicating how
many days ago to place the expire threshold.

PR 48404 from Martin Neitzel.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/msgs/msgs.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/msgs/msgs.1
diff -u src/usr.bin/msgs/msgs.1:1.18 src/usr.bin/msgs/msgs.1:1.19
--- src/usr.bin/msgs/msgs.1:1.18	Thu Mar 22 07:58:19 2012
+++ src/usr.bin/msgs/msgs.1	Sun Nov 24 19:49:22 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: msgs.1,v 1.18 2012/03/22 07:58:19 wiz Exp $
+.\	$NetBSD: msgs.1,v 1.19 2013/11/24 19:49:22 dholland Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -43,7 +43,7 @@
 .Nm
 .Op Fl s
 .Nm
-.Op Fl c Op Ar days
+.Op Fl c Op Ar \-days
 .Sh DESCRIPTION
 .Nm
 is used to read system messages.
@@ -149,6 +149,10 @@ to run every night.
 This will remove all messages over 21 days old.
 A different expiration may be specified on the command line to override
 the default.
+This number must be negative and indicates the number of days before
+the present whose messages should be kept; that is, use
+.Fl c Ar \-3
+to remove messages more than three days old.
 .Pp
 Options when reading messages include:
 .Bl -tag -width Fl