summaryrefslogtreecommitdiff
path: root/libexec/comsat
AgeCommit message (Collapse)Author
2025-07-28comsat: Don't return from the childDag-Erling Smørgrav
Fixes: 91629228e3df MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51581
2025-07-28comsat: Don't read arbitrary filesDag-Erling Smørgrav
When processing a notification, instead of accepting any file name that doesn't begin with a slash, accept only file names that don't contain any slashes at all. This makes it possible to notify a user about a mailbox that doesn't bear their name, as long as they are permitted to read it, but prevents comsat from reading files outside the mail spool. PR: 270404 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51580
2024-12-02comsat: move uid/gid setting earlierEd Maste
It's good to reduce privilege as early as possible. Suggested by: jlduran Reviewed by: jlduran Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47869
2024-12-01comsat: Use initgroups and setgid not just setuidEd Maste
PR: 270404 Reviewed by: jlduran Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47828
2024-11-28comsat: Improve use of setuid()Ed Maste
Just return from jkfprintf if either (a) user lookup fails (that is, getpwnam fails) or (b) setuid() to the user's uid fails. If comsat is invoked from inetd using the default of tty:tty we will now return due to setuid() failing rather than fopen() failing. PR: 270404 Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47823
2024-07-15Remove residual blank line at start of MakefileWarner Losh
This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
2023-11-26Remove copyright strings ifdef'd outWarner Losh
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
2023-11-26libexec: Remove ancient SCCS tags.Warner Losh
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
2023-09-25Purge more stray embedded $FreeBSD$ stringsJohn Baldwin
These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957
2023-08-16Remove $FreeBSD$: one-line nroff patternWarner Losh
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16Remove $FreeBSD$: one-line sh patternWarner Losh
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-04-18Update/fix Makefile.depend for userlandSimon J. Gerraty
2017-11-20General further adoption of SPDX licensing ID tags.Pedro F. Giffuni
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
2017-10-31DIRDEPS_BUILD: Update dependencies.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
2015-06-13Add META_MODE support.Simon J. Gerraty
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
2015-06-08dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=284172
2014-05-16Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=266219
2014-05-10Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=265802
2014-04-28Merge headSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=265044
2014-02-17Remove the 3rd clause ("advertising clause") of the BSD license asChristian Brueffer
permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp MFC after: 1 week Notes: svn path=/head/; revision=262136
2013-03-11Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=248169
2013-02-16Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=246868
2012-11-04Sync from headSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=242545
2012-09-14Bump date missed in r202756Eitan Adler
PR: docs/171624 Submitted by: bdrewery Approved by: gabor MFC after: 3 days Notes: svn path=/head/; revision=240506
2012-08-22Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar
Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
2011-12-10Make comsat(8) approximately 15% smaller.Ed Schouten
This program only consists of a single C file, so simply mark everything except main() static. Notes: svn path=/head/; revision=228397
2011-06-07Remove a gratuitous newline. This should be a non-functional change.Jaakko Heinonen
PR: bin/153667 Submitted by: Craig Leres MFC after: 1 week Notes: svn path=/head/; revision=222825
2010-01-21Remove stale references to utmp(5) and its corresponding filenames.Ed Schouten
I removed utmp and its manpage, but not other manpages referring to it. Notes: svn path=/head/; revision=202756
2010-01-13Port comsat to utmpx.Ed Schouten
It seems comsat stats the utmpx database each 15 seconds to see whether it has been changed. I am changing this behaviour to look at the utmpx database upon processing. I don't want to allow direct interference with the database files. I also wonder whether this optimization has any measurable performance benefit nowadays. Notes: svn path=/head/; revision=202208
2010-01-02Fix several warnings.Ed Schouten
- Add __unused keywords. - Don't shadow a global variable called cr. - Make the global cr variable const. Notes: svn path=/head/; revision=201379
2009-01-17Fix handling of pts(4) device names in comsat(8). Also catch fork() errors.Ed Schouten
Pseudo-terminals allocated with posix_openpt(2) will have more slashes in their path names than comsat(8) allows, so allow slashes when the character device name starts with "pts/". This patch is loosely based on NetBSD's changes, revision 1.33. Because it also included the changes to fork(), I imported them here as well. Maybe we could import even more fixes from the other BSD's? Original commit message from the NetBSD folks: PR/30170: Markus W Kilbinger: src/libexec/comsat complains about: '/' in "/dev/pts/1" Reported by: Robert Huff <roberthuff rcn com> Notes: svn path=/head/; revision=187366
2005-02-14Fix most cases where the address of an int is passed to a function expecting aStefan Farfeleder
socklen_t * argument. Notes: svn path=/head/; revision=141918
2005-02-13Expand contractions.Ruslan Ermilov
Notes: svn path=/head/; revision=141851
2005-01-18Sort sections.Ruslan Ermilov
Notes: svn path=/head/; revision=140414
2002-08-16Bump document date for the 'beep only' change.Johan Karlsson
Notes: svn path=/head/; revision=101960
2002-08-13mdoc(7) police: tidy up.Ruslan Ermilov
Notes: svn path=/head/; revision=101783
2002-07-09Add ability to only beep when mail arrives.Johan Karlsson
comsat: only send two bell charecters if S_IXGRP is set and S_IXUSR is not. biff: add new option 'b' to set S_IXGRP. PR: 10931 Submitted by: Andrew J. Korty <ajk@purdue.edu> Approved by: sheldonh (mentor) MFC after: 1 month Notes: svn path=/head/; revision=99632
2002-07-06The .Nm utilityPhilippe Charnier
Notes: svn path=/head/; revision=99500
2002-02-03o Eliminate __PWarner Losh
o Use new-style function definitions o remove some !__STDC__ code o eliminate register Notes: svn path=/head/; revision=90148
2001-09-03File positions are off_t nowdays, not long, so:Andrey A. Chernov
atoi -> strtoll fseek -> fseeko NOTE: that fseek not works for >long offsets per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. Fix minor cast too. Notes: svn path=/head/; revision=82851
2001-07-10mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov
Notes: svn path=/head/; revision=79529
2001-03-26- Backout botched attempt to intoduce MANSECT feature.Ruslan Ermilov
- MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74814
2001-03-20Set the default manual section for libexec/ to 8.Ruslan Ermilov
Notes: svn path=/head/; revision=74529
2000-11-20mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov
Notes: svn path=/head/; revision=68949
1999-08-28$Id$ -> $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=50476
1998-06-30Fixed printf format errors.Bruce Evans
Notes: svn path=/head/; revision=37297
1997-11-20Use err(3). exit(-1) -> exit(1).Philippe Charnier
Notes: svn path=/head/; revision=31307
1997-09-15Allow backspace tooAndrey A. Chernov
Notes: svn path=/head/; revision=29433
1997-09-15disable upper controls and enable all otherAndrey A. Chernov
8bit codes due to lack of locale knowledge in daemon Notes: svn path=/head/; revision=29432
1997-02-22Revert $FreeBSD$ to $Id$Peter Wemm
Notes: svn path=/head/; revision=22989