aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/write
Commit message (Collapse)AuthorAgeFilesLines
* Remove extraneous setutxent() calls in write(1).Mark Johnston2019-01-231-2/+0
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=343354
* capsicum: use a new capsicum helpers in toolsMariusz Zaborski2018-11-041-10/+10
| | | | | | | Use caph_{rights,ioctls,fcntls}_limit to simplify the code. Notes: svn path=/head/; revision=340138
* Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.Mariusz Zaborski2018-06-191-1/+1
| | | | | | | No functional change intended. Notes: svn path=/head/; revision=335395
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=314436
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2016-11-131-0/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=308606
* write(1): CapsicumifyConrad Meyer2016-10-061-33/+81
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=306761
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
|/ | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* Fix write(1) to support wide characters.Gleb Smirnoff2012-02-132-28/+17
| | | | | | | | Submitted by: amdmi3 PR: bin/164317 Notes: svn path=/head/; revision=231586
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-112-8/+0
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=216370
* Perform all trivial ports to utmpx for usr.bin/.Ed Schouten2010-01-132-5/+1
| | | | | | | | They were already converted to use libulog, so it's easy to convert them to utmpx. Notes: svn path=/head/; revision=202200
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-2/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Let wall(1) use utmpx.Ed Schouten2009-12-052-27/+28
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=200160
* write(1) needs to strip off the leading /dev/ from the tty name for theJohn Baldwin2007-11-121-3/+2
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=173572
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-05-211-1/+1
| | | | Notes: svn path=/head/; revision=146466
* Expand contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141851
* Fix a typo in comment.Olivier Houchard2005-01-051-1/+1
| | | | | | | Reviewed by: mux (mentor) Notes: svn path=/head/; revision=139718
* Mention in the BUGS section that write and wall bogusly use the sender'sTim J. Robbins2004-07-171-1/+8
| | | | | | | | LC_CTYPE setting instead of the receiver's when determining which characters are printable. Notes: svn path=/head/; revision=132278
* Document missing multibyte character support in utilities specifiedTim J. Robbins2004-07-031-1/+5
| | | | | | | by POSIX. Notes: svn path=/head/; revision=131511
* ANSIify function definitions.David Malone2002-09-041-21/+9
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=102944
* Use getopt() to reject any options and skip "--" arguments.Tim J. Robbins2002-05-291-10/+15
| | | | Notes: svn path=/head/; revision=97454
* Use `The .Nm utility'Philippe Charnier2002-04-201-2/+3
| | | | Notes: svn path=/head/; revision=95124
* remove __PWarner Losh2002-03-221-7/+7
| | | | Notes: svn path=/head/; revision=92922
* 1) Move FreeBSD tag to after vendor ID, #if 0 vendor ID.David Malone2002-02-271-5/+7
| | | | | | | 2) Add missing include of stdlib.h for exit(), spotted by gcc3. Notes: svn path=/head/; revision=91378
* WARNS=2 fixes, use __FBSDID(), kill register keyword.Mark Murray2001-12-111-10/+11
| | | | Notes: svn path=/head/; revision=87682
* Add xref to wall(1).Ruslan Ermilov2001-11-201-0/+1
| | | | | | | | PR: docs/32128 Submitted by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> (partially) Notes: svn path=/head/; revision=86672
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-1/+1
| | | | Notes: svn path=/head/; revision=68963
* $Id$ -> $FreeBSD$Peter Wemm1999-08-282-2/+2
| | | | Notes: svn path=/head/; revision=50477
* Clean up some ambiguous nested if/elses.Bill Fumerola1999-07-041-2/+3
| | | | Notes: svn path=/head/; revision=48566
* Allow backspace tooAndrey A. Chernov1997-09-151-2/+3
| | | | Notes: svn path=/head/; revision=29433
* Oops, fix upper controls testAndrey A. Chernov1997-09-151-2/+3
| | | | Notes: svn path=/head/; revision=29431
* Localize it. High controls disabled in any case.Andrey A. Chernov1997-09-151-5/+11
| | | | | | | | Shut compiler warning about signal argument. PR: 4466 Notes: svn path=/head/; revision=29430
* Use err(3). Add usage() and prototypes.Philippe Charnier1997-08-262-67/+60
| | | | Notes: svn path=/head/; revision=28794
* Remove the text that says nroff and pr automatically disableMike Pritchard1997-03-221-6/+1
| | | | | | | writing to the tty while they are running because they don't. Notes: svn path=/head/; revision=24110
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Replace hardcoded length of "/dev/" with strlen(_PATH_DEV).Alexander Langer1996-10-261-1/+1
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=19193
* sprintf --> snprintfAlexander Langer1996-10-261-3/+4
| | | | | | | | | Use _PATH_DEV instead of hard coded "/dev/" Obtained from: OpenBSD, Jason Downs <downsj@OpenBSD.ORG> Notes: svn path=/head/; revision=19190
* [HISTORY] command appeared in Version 1 AT&T UNIXWolfram Schneider1996-08-291-1/+2
| | | | | | | Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41 Notes: svn path=/head/; revision=17891
* Do unctrl in right wayAndrey A. Chernov1995-11-051-6/+12
| | | | | | | Handle '\377' properly Notes: svn path=/head/; revision=12097
* Remove char->int promotion.Andrey A. Chernov1995-10-291-6/+4
| | | | | | | Fix uncontrol function for 8bit chars. Notes: svn path=/head/; revision=11916
* Now works with 8bit chars...Andrey A. Chernov1995-10-281-1/+1
| | | | Notes: svn path=/head/; revision=11898
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-273-0/+441
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590