History log of /freebsd-current/bin/ed/io.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# d83db3fb 04-Nov-2018 Conrad Meyer <cem@FreeBSD.org>

Drop ed(1) "crypto"

You should not be using DES. You should not have been using DES for the
past 30 years.

The ed DES-CBC scheme lacked several desirable properties of a sealed
document system, even ignoring DES itself. In particular, it did not
provide the "integrity" cryptographic property (detection of tampering), and
it treated ASCII passwords as 64-bit keys (instead of using a KDF like
scrypt or PBKDF2).

Some general approaches ed(1) users might consider to replace the removed
DES mode:

1. Full disk encryption with something like AES-XTS. This is easy to
conceptualize, design, and implement, and it provides confidentiality for
data at rest. Like CBC, it lacks tampering protection. Examples include
GELI, LUKS, FileVault2.

2. Encrypted overlay ("stackable") filesystems (EncFS, PEFS?, CryptoFS,
others).

3. Native encryption at the filesystem layer. Ext4/F2FS, ZFS, APFS, and
NTFS all have some flavor of this.

4. Storing your files unencrypted. It's not like DES was doing you much
good.

If you have DES-CBC scrambled files produced by ed(1) prior to this change,
you may decrypt them with:

openssl des-cbc -d -iv 0 -K <key in hex> -in <inputfile> -out <plaintext>

Reviewed by: allanjude, bapt, emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D17829


# 92a58a92 25-May-2016 Don Lewis <truckman@FreeBSD.org>

Close the input FILE * in read_file() and the output FILE * in write_file()
if read_stream() or write_stream() fails to avoid leaking the FILE.

Reported by: Coverity
CID: 977702
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6554


# bf70bece 19-Oct-2012 Ed Schouten <ed@FreeBSD.org>

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


# ae824d80 18-Oct-2012 Ed Schouten <ed@FreeBSD.org>

Fix warnings found by -Wmising-variable-declarations.

This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.


# 4bfc2007 16-Dec-2011 Dimitry Andric <dim@FreeBSD.org>

Fix some obtuse fprintf tricks in bin/ed.

MFC after: 1 week


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 9d5abbdd 01-Jan-2003 Jens Schweikhardt <schweikh@FreeBSD.org>

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


# 5eb43ac2 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use __FBSDID


# 7669d0fc 01-Feb-2002 Warner Losh <imp@FreeBSD.org>

o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
o gc some #ifdef sun ... #endif code

Approved by: arch@, new style(9)


# a4616748 06-Aug-2001 Mike Barcroft <mike@FreeBSD.org>

o Correctly define rcsid.
o Add consts where appropriate.
o Rename some variables that were shadowing global declarations.
o Remove register storage-classes.
o Make errmsg a const, so we can just set error messages instead
of using sprintf/strcpy.
o Set WARNS=2

Reviewed by: bde, des


# 2a456239 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 5967604a 07-Aug-1997 Steve Price <steve@FreeBSD.org>

sccsid -> rcsid and fix some minor nits.


# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 78b09ffe 13-Dec-1996 Steve Price <steve@FreeBSD.org>

-Wall cleaning.


# de64b714 23-May-1996 Thomas Gellekum <tg@FreeBSD.org>

Output line count to stdout. Complies to POSIX.2.

Reviewed by: joerg


# 0fd510b7 19-Mar-1995 Joerg Wunsch <joerg@FreeBSD.org>

You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory.

I (Joerg) finished most of Philippe's cleanup. /bin/sh will still
need *allot* of work, however.

Submitted by: charnier@lirmm.fr (Philippe Charnier)


# 89730b29 23-Sep-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# d165d4ac 22-Mar-1994 Andrew Moore <alm@FreeBSD.org>

use umask 077 for buffer file


# 95e6217e 31-Jan-1994 Andrew Moore <alm@FreeBSD.org>

Fixed range address bug: 1,2, == 2,2 not 2,.
Overhauled the name space, reworked some modules and removed the
obsolescent Addison-Wesley copyright.