History log of /freebsd-current/usr.bin/write/write.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

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


# cccdaf50 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# 27ed53c3 23-Jan-2019 Mark Johnston <markj@FreeBSD.org>

Remove extraneous setutxent() calls in write(1).

We already call setutxent() once during initialization. Furthermore,
the subsequent calls occur after the process has entered capability
mode, so they fail, and attempts to fetch database entries fail as
a result.

PR: 235096
Submitted by: fullermd@over-yonder.net
MFC after: 3 days


# 377421df 04-Nov-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

capsicum: use a new capsicum helpers in tools

Use caph_{rights,ioctls,fcntls}_limit to simplify the code.


# 7672a014 19-Jun-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.

No functional change intended.


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 38adbfe6 06-Oct-2016 Conrad Meyer <cem@FreeBSD.org>

write(1): Capsicumify

Enter Capsicum capability sandbox pretty early in this setuid program.

Some minor modifications were needed to cache directory fds and use
relative lookups.

Rights restriction of the stdio descriptors is unfortunately pretty messy
because we need an ioctl capability not present in the current libcapsicum
helpers (FIODGNAME).

Reviewed by: ed
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7999


# 0de6400b 13-Feb-2012 Gleb Smirnoff <glebius@FreeBSD.org>

Fix write(1) to support wide characters.

Submitted by: amdmi3
PR: bin/164317


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 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.


# ab90a4d1 13-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Perform all trivial ports to utmpx for usr.bin/.

They were already converted to use libulog, so it's easy to convert them
to utmpx.


# 50950530 05-Dec-2009 Ed Schouten <ed@FreeBSD.org>

Let wall(1) use utmpx.

Because our implementation guarantees the strings inside struct utmpx to
be null terminated, we don't need to copy everything out, which makes
the code nicer to read.

Also set WARNS to 6 and add $FreeBSD$ to keep SVN happy.


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

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


# a4cc298a 12-Nov-2007 John Baldwin <jhb@FreeBSD.org>

write(1) needs to strip off the leading /dev/ from the tty name for the
current tty as returned from ttyname(3) so it can try to avoid writing to
the current tty if possible. Previously, it did this by trimming off any
leading directory (effectively performing a basename(3) on the path
returned from ttyname(3)). However, this chopped off too much of the path
for ttys who have directories in their name such as pts(4). Instead, just
strip off the leading /dev/ from the path returned by ttyname(3). This
fixes write(1) when using pts(4).

MFC after: 1 week
Reported by: rwatson


# e4bac6b8 05-Jan-2005 Olivier Houchard <cognet@FreeBSD.org>

Fix a typo in comment.

Reviewed by: mux (mentor)


# f4ac32de 04-Sep-2002 David Malone <dwmalone@FreeBSD.org>

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


# 759484ba 29-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Use getopt() to reject any options and skip "--" arguments.


# 3f330d7d 21-Mar-2002 Warner Losh <imp@FreeBSD.org>

remove __P


# 421dfbcf 27-Feb-2002 David Malone <dwmalone@FreeBSD.org>

1) Move FreeBSD tag to after vendor ID, #if 0 vendor ID.
2) Add missing include of stdlib.h for exit(), spotted by gcc3.


# 9ba3a235 11-Dec-2001 Mark Murray <markm@FreeBSD.org>

WARNS=2 fixes, use __FBSDID(), kill register keyword.


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

$Id$ -> $FreeBSD$


# 9ef5c48b 04-Jul-1999 Bill Fumerola <billf@FreeBSD.org>

Clean up some ambiguous nested if/elses.


# fe38e2f8 14-Sep-1997 Andrey A. Chernov <ache@FreeBSD.org>

Allow backspace too


# 07484d1f 14-Sep-1997 Andrey A. Chernov <ache@FreeBSD.org>

Oops, fix upper controls test


# 77caf211 14-Sep-1997 Andrey A. Chernov <ache@FreeBSD.org>

Localize it. High controls disabled in any case.
Shut compiler warning about signal argument.
PR: 4466


# 29909ffe 26-Aug-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3). Add usage() and prototypes.


# c44252b6 06-Jul-1997 Bruce Evans <bde@FreeBSD.org>

Finish importing Lite2's src/usr.bin, except for ex, diff, grep, mail,
pascal and vmstat.sparc. All changed files on the vendor branch should
already have been imported.


# 0adcbd83 26-Oct-1996 Alexander Langer <alex@FreeBSD.org>

Replace hardcoded length of "/dev/" with strlen(_PATH_DEV).

Pointed out by: bde


# 2d754ac8 25-Oct-1996 Alexander Langer <alex@FreeBSD.org>

sprintf --> snprintf

Use _PATH_DEV instead of hard coded "/dev/"

Obtained from: OpenBSD, Jason Downs <downsj@OpenBSD.ORG>


# dbc57b8d 05-Nov-1995 Andrey A. Chernov <ache@FreeBSD.org>

Do unctrl in right way
Handle '\377' properly


# b6c671c7 29-Oct-1995 Andrey A. Chernov <ache@FreeBSD.org>

Remove char->int promotion.
Fix uncontrol function for 8bit chars.


# ee15822a 28-Oct-1995 Andrey A. Chernov <ache@FreeBSD.org>

Now works with 8bit chars...


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources