master
With malloc option J, the first realloc(3) in apply(1) would return memory that is filled with junk only. Allocate the empty string with malloc(3) and initialize it explicitly with the NUL terminator. OK tb@ tobias@
delete duplicate RCS IDs; found with mandoc -Tlint
when processing readdir(), this incorrectly did fstatat() against "..". observed during experimental work with O_BELOW ok millert, who may want to refactor this further.
aucat: Switch to printf(3)-style logging
shorten SYNOPSIS from three versions to two (me) then one (ratchov), plus all the cleanup that goes with;
Update awk to the Jan 14, 2025 version. * Fix incorrect error line number issues. * Fix hex detection in is_valid_number. * Fix indirect field specification with non-numeric string in indirect. * Fixed openfile to not try to read from a directory.
trim some unused compile options for alternative character forms.
bump posix ref 2008 -> 2024;
quote the book title (%T) reference, to prevent formatters (in this case groff) stumbling over literal words that match macro names;
missing save_errno dance inside non-terminal signal handler
userspace: remove vestigial '?' cases from top-level getopt(3) loops
whitespace
add Brian Wilson birth and death add Sly Stone death
Delete obsolete /* ARGSUSED */ lint comments.
remove duplicate prototype
For open/openat, if the flags parameter does not contain O_CREAT, the 3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
spelling fixes; from paul tagliamonte amendments to his diff are noted on tech
Ignore -N in "gzip -dN <in.gz" and "zcat -N in.gz"
Add where missing and harmonize PATH to be _PATH_DEFPATH (without local nor X11R6). Suggested by tb@
Use absolute paths in pathnames.h. There is no longer a need to chdir(2) to the cron dir and cron(8) now changes to / via daemon(3). We no longer try to create/chmod the spool directories as they should be set correctly at install time. The setegid(crontab) has been moved to open_socket() so it is closer to the chmod(2) call that needs it. OK deraadt@ tedu@
On i386 long double is 80bit expanded to 96bits or 12 bytes. This is the size that the ctftools ctfconvert uses and I think we should do as well. Fixes regress/usr.bin/ctfdump on i386. OK miod@
Print the size of more objects (basic types and enums) based on their ctt_size info. This helps to ensure that the reported sizes match. OK mpi@
Map ucom unit number to cuaU number using the same scheme as MAKEDEV uses.
avoid potential use-after-free found by smatch, ok tb@
Use LibreSSLs specialized functions to print base 10 and base 16. Also optimize the general case a bit. ok semarie@
Use a dynamically-allocated line buffer and resize as needed. Fixes a buffer overflow for lines over 2048 bytes. Problem reported by Crystal Kolipe. OK deraadt@
glob patterns described in glob(7) not fnmatch(3); from evan silberman
Fix merging of files that lack a final \n at EOF after a block of common lines.
Implement zoneversion edns option (RFC 9660)
I am retiring my old email address; replace it with my OpenBSD one.
change permit to be more bits away from deny, because rowhammer. not really sure why this is our problem, but the diff is small. ok deraadt millert miod
unveil _PATH_LOGIN_CONF_D
The dash must not come first in the getopt(3) string
Switch back to C versions of true/false. I do not accept any of the arguments made 20 years ago. A small elf binary is smaller and faster than a large elf binary running a script. Noone cares about the file sizes on disk. ok semarie millert aja
fix usage; Thomas Klausner will commit the same diff to NetBSD within the next hours, so our trees will remain as similar as possible.
Convert sbin and usr.bin to check for imsgbuf_init failure and add imsgbuf_allow_fdpass where needed.
Replace use of the old BSD st_*timespec members in struct stat with the POSIX-standard st_*tim members.
finger/mail: two trivial functions were missed in earlier ansi passes
Fix not accounting for NUL for allocation size and move to reallocarray while there. ok deraadt@ millert@
Unify wording for LC_CTYPE in ENVIRONMENT: * Consistently use "character encoding locale" as suggested by stsp@. * Resolve various gratuitious wording variations. OK jmc@.
Change the error reporting pattern throughout the tree when unveil fails to report the path that the failure occured on. Suggested by deraadt@ after some tech discussion.
remove prototypes with no matching function and externs with no var partly checked by millert@
Fix a tiny memory leak (of username and pass) when the last auto_fetch() argument is an authenticated FTP URL of the form ftp://user:pass@host/dir/ with no file at the end, in which case auto_fetch() leaked these two strings and main() would then enter the interactive cmdscanner() loop, potentially becoming a long-running process.
Fix the -f option when passed multiple files. Found by robert@
avoid arpa/nameser.h by improving the inet_pton/gethostbyaddr code to use struct in6_addr + struct in_addr instead of a char buffer. ok millert
shell scripts should use getopts instead of getopt
gmon.out files are now called gmon.progname.pid.out
POSIX requires in chapter 12.2, Utility Syntax Guideline 9: "All options should precede operands on the command line." https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap12.html#tag_1202 and grep(1) is explicitly required to conform right below OPTIONS: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/grep.html
head(1): check for stdio errors
man pages: add missing commas between subordinate and main clauses
Ignore extra groups that don't fit in the buffer passed to getgrouplist(3)
nasty whitespace
Update ncurses and associated libraries (form, panel, menu) to 6.4-20230826 (from 5.7-20081102).
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
update usage() to reflect s->step change;
kqueue: Implement EVFILT_USER
remove redundant variable declarations in Makefiles, since those are the default.
rectify comment about syncing trace points letters, kdump usage has none
Fixed-size NOFILE_MAX (from sys/param.h of course) array is crazy, so rewrite to expand the array as needed. ok tb
From user commands, reference the simpler signal(3) manual rather than the more complicated sigaction(2); both provide a complete list of signals. Suggested by both Theos, tb@ and deraadt@, and jmc@ does not seem to object.
'e' is no longer an optional element for ober_scanf_elements. This caused the last attribute to be dropped.
in hhmm mode, check that len(time) is 4 to avoid confusion. feedback cheloha deraadt
remove externs for removed vars
Use literal <> characters instead of Aq macros.
finish v5.36, UList was a bit more work
lndir(1) doesn't need write access to any files and/or folders so wpath promise can be dropped from pledge(2)
Actually, LANG only set the default.
remove prototypes for removed functions
Make sure that -n overrides -t even when -n precedes -t, like it does in FreeBSD and in NetBSD, and fully document that behaviour. Input, feedback, and OK jca@.
Remove reference to telnet(1).
If a command or interface first appeared in PWB/UNIX, UNIX System III or UNIX System V mention it. Only do so in manual pages with a pre-existing HISTORY section.
Remove -S from install commands
whitespaces
make usage for both mail(1) and mailx(1) fit in a 80-column display.
Replace sys/time.h with proper includes for using localtime
Use the MDOC_JOIN feature for .Ft, too. Semantically, this makes sense because printing two function return types one right after the other with nothing in between is never useful, whereas function return types consisting of more than one word are widespread. The change matters because people usually do not quote multi-word function return types (nor should they). We have about 1800 unquoted instances in our tree versus about 300 quoted instances.
remove unneeded semicolons; checked by millert@
midicat(1): use err(3) everywhere
explicitly pass -w since clang -M doesn't imply it.
remove misc. depend and yacc nits that no longer matter. okay millert@
Clarify which part of the path name is considered for substitution. Also use "name" instead of "file name" is some places since the result could be either a file or a directory. Work done with jmc@
nc: document -Talpn
Protect mbuf statistics counter with splnet.
setpassent(1) and setgroupent(1) are surely not needed in this program because it doesn't not do many (or any???) getpwent/getgrent iteration lookup calls. ok millert
correct Research Unix edition "appeared in" use in HISTORY
Do not leak a file descriptor when opening nohup.out. Make sure that stdout and stderr are not closed. from Nan Xiao
KNF for variations of get_cipher_by_name()
convert to new .Dd format;
avoid uninitialised var use in an error path ok tb@
use strtonum() to parse numeric option values instead of atoi()
pkg-config(1): add support for relocatable .pc files
* improve the beginning of the DESCRIPTION * document --dump-personality --help --solution * document PKG_CONFIG_ALLOW_SYSTEM_CFLAGS PKG_CONFIG_ALLOW_SYSTEM_LIBS * improve the descriptions of --atleast-pkgconfig-version --atleast-version --exact-version --max-version --list-all --list-package-names --log-file DESTDIR PKG_CONFIG_SYSROOT_DIR This patch was accepted and pushed upstream by Ariadne Conill.
Change all tame callers to namechange to pledge(2).
annoying whitespace found during an audit process
some rewording and text shuffle to improve readability; ok millert
"-<" should be "->"; from isaac meerleo
Provide realpath(1)
fix double space; from crystal kolipe
rev(1): drop "rpath" promise in no-file branch.
rpcgen(1): default to "STDIN" as input file when compiling to headers.
remove unused variables
rename a function argument for clarity
recallocarray array that has remote data
getifaddrs() can return entries where ifa_addr is NULL. Check for this before accessing anything in ifa_addr. ok claudio@
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
note the -c runs sh -c; from nabijaczleweli
add options to interactive sdiff(1) merge for choosing both sides of a diff
The "c" command should start the next cycle as clarified in POSIX 2024. This is also consistent with historical behavior. Prompted by Mohamed Akram with a diff from uwe@netbsd.
Add more missing archs to "categories": aarch64, mips64el and powerpc64
make history less verbose ok schwarze@ millert@
no need to escape `|'; as discussed with schwartze
we mention interim BSD releases so change some 4.4BSD use to 4.3BSD-Reno ok jmc@ schwarze@
only include basename of seckey in gzip header. requested by deraadt to not leak paths.
The maximum count is SKEY_MAX_SEQ + 1 not SKEY_MAX_SEQ - 1.
Fix a markup glitch: In a section 1 manual, use the plain English words "standard output" rather than the overly technical abbreviation "stdout" - we are not talking about a device file or a FILE * object here. Issue reported by <onf at disroot dot org> on the groff mailing list.
sndiod: Rename and move dev_midi_{vol,slotdesc,dump}() to opt.c
correct indentation; no functional change ok tb@
Rewrite the description of how sorting works by default, in particular avoiding the nebulous word "lexicographically" and clarifiying that characters are ordered according to ascii(7). Polish a few nearby wordings for conciseness and readability. OK pascal@ jmc@
Stop using MAXBSIZE to eliminate sys/param.h including (which injects a ton of namespace intrusion). Create local sizes, and refactor some code along the way. ok millert
make "Match !final" not trigger a 2nd pass ssh_config parsing pass (unless hostname canonicalisation or a separate "Match final" does). bz3843
Prefer the POSIX standard st_*tim struct timespec members over the older BSD st_*timespec names.
Denote multiple arguments with 'arg ...' not 'args'
Add new counters for lock upgrades.
Reformat tcpbench(1) usage to fit into 80 columns.
tee(1): explicitly check read(2) return value for 0 and -1
replace hand-rolled number parser with strtonum
time(1): miscellaneous style(9) tweaks
Add note about timeout(1)'s standards compliance
Detect support for OSC 52 using the device attributes report. Some terminals are using this to indicate that they support copying to the clipboard with XTerm's OSC 52 sequence. From James Holderness in GitHub issue 4539.
For unquoted in-line literal displays, use the .Li macro. Improves discoverability of the column headers, and in non-terminal output, also results in a more appropriate font.
touch(1): don't leak file descriptor if futimens(2) fails
Fix some program names that were not expanded correctly when ncurses was updated and were instead replaced by ?. ok millert
clarify behaviour of -s option; from jan stary ok millert
fix unintended sizeof pointer introduced in 1.10 ok cheloha@ miod@ matthieu@ martijn@
fix macro to look more like a function, remove extraneous ; (clang's -Weverything would correctly warn about the resulting empty statement)
tty(1): exit with status 2 if unveil(2) or pledge(2) fail
More HISTORY and AUTHORS, in part from Jonathan de Boyne Pollard via Sevan Janiyan. Verified with CSRG SCCS.
OpenBSD intentionally does not print a flavor for -r.
Make the "all" global variable local to main() since it is passed to tabify() already. Adapted from a diff by Jan Stary.
unifdef appeared in 4.1c before 2.9 dates checked in CSRG archives and already changed upstream in unifdef3
uniq(1): miscellaneous style(9)-ish stuff
add HISTORY section; from Evan Silberman
Delete obsolete /* ARGSUSED1 */ lint comments.
Use BUFSIZ instead of PATH_MAX. Since it doesn't anything with a file system path. input from claudio
Delete useless calls to setlocale(3): uudecode(1) and uuencode(1) do nothing locale-dependent. While here, sort headers, make usage() static, return from main() rather than exit(3), and drop two redundant case statements. This is a minimally tweaked version of a patch from Jan Stary. OK tedu@
fix handling of Return-Path
Don't divide by zero (empty files)
adjust some columns in vmstat -m so malloc buckets are intelligible. ok claudio
Switch K&R function definition to ANSI to make clang 15 happier
Fix highlighting by a word to work again. Also, remove untabify() which is unused now.
fstat(2) can't return an S_IFLNK, so delete that test. Also, switch to S_IS*() tests and update the manpage to reflect that POSIX-2024 has no substantive changes for wc(1)
tedu: when you commit a change with global impact, please do a full build to verify there's no fallout, machines are fast now and 1 hour of your time is worth saving a bunch of others 1+ hour of their time in this case, paths.h broke this as noticed by jmc and 3 of my build machines so far, but I might as well restart them all, so call it 8 machines impacted.
remove whitespace
Drop peeringdb support, they haven't been running a whois service for a while and suggest using GUI or HTTP API to retrieve information about an ASN, which is out of scope for whois(1). ok job@
Use the safe idiom of cleaning sensitive data from memory with explicit_bzero, instead of relying on other methods, after readpassphrase. Some programs on this diff won't benefit that much since it happens near the terminal path, but someone might copy the unsafe idiom to another program and place it where it may leak sensitive data.
Suppress a spurious empty arg at EOF w/ "find -0" caused by the last commit.
create_tempfile: pass pointer to full pathname to strlcat()
Obvious pledge "stdio" for yes.
rm a few more $Id which cannot be useful
reduce verbosity in usage and make it match SYNOPSIS; ok millert
Replace inet_aton / gethostbyname with getaddrinfo. test & OK jmatthew
switch from pkg-config to pkgconf
using COPTS is probably better than CFLAGS