Commit Graph

20637 Commits

Author SHA1 Message Date
rillig 657445084f libedit: fix typos, apply KNF to newly imported code (PR/56693)
No binary change.
2022-02-08 21:13:22 +00:00
christos 001f54a461 PR/56693: Walter Lozano: Add support for rl_delete_text and rl_set_key 2022-02-08 15:05:10 +00:00
christos ea988183cf PR/56622: Walter Lozano: Improve readline compatibility by adding
rl_readline_state support.
2022-01-31 14:44:49 +00:00
christos af918e051e Add more refreshes from Walter Lozano. The readline example in
http://www.mcld.co.uk/blog/2009/simple-gnu-readline-callback-style-example.html
still does not work, but it is better.
2022-01-29 20:52:45 +00:00
tnn 64af69d8bc librefuse: default_log_func is __printflike 2022-01-29 00:03:41 +00:00
andvar 7c674e8e6e remove double t from targeted, add missing r to arbitrary
And fix few more typos along the way in comments and man pages.
2022-01-26 11:48:53 +00:00
blymn f1942931a2 Correct (hopefully) the handling of wide characters.
* Remove the WCOL family of macros, these were "stealing" the upper bits
  of a character attribute to store the column width of a character.  No
  warning was given about this in curses.h which meant it was easy to
  accidentally reuse the bits in use by the WCOL macros (we already did).
  Add couple of 16bit ints to the character structure iff HAVE_WCHAR is
  true to hold the display width and wide char related flags (just
  continuation at the moment)
* Convert all instances of WCOL macros to just reference the column width
  in the char structure so it is not obfuscated.
* Fix cursor positioning so placing a cursor in the middle of a wide char
  actually does just that.
* Fix plod so it understands that if the cursor is going to be positioned
  in the middle of a wide char it cannot just reprint the char to get there.
* Fix plodput so it correctly counts the number of output characters for
  wide characters.
* Fix slk routines to properly size the wctomb() buffer.
2022-01-25 03:05:06 +00:00
andvar 492c086f0a s/begining/beginning/ in comments and messages. 2022-01-24 09:14:36 +00:00
rillig 5d27a0722d librefuse: fix lint warnings about void function returning a value
lib/librefuse/refuse_compat.c(155):
    error: void function fuse_unmount cannot return value [213]
lib/librefuse/refuse/v30.c(57):
    error: void function fuse_destroy_v30 cannot return value [213]
2022-01-23 21:07:28 +00:00
pho b2cb7fcce3 Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE
It broke build on platforms where PAGE_SIZE was not defined in
<machine/vmparam.h>.
2022-01-22 13:25:55 +00:00
pho ec9afb4282 lib/librefuse: Implement all sorts of compat tweaks to appease various file systems
ReFUSE now supports all the FUSE API variants from FUSE 1.1 to FUSE
3.10. Sorry for the freaking giant patch. I could not break it down
any further.
2022-01-22 08:09:39 +00:00
pho a7ce7be0fd Zero-clear the fuse_context in fuse_destroy(3) 2022-01-22 08:07:02 +00:00
pho e9501242bf Add some missing struct fields, structs, and constants that are part of the API 2022-01-22 08:06:21 +00:00
pho d61ee2ebc0 Support the FUSE option -ho
It is supposed to print a help message without the usage
line. Although it is deprecated and has been removed as of FUSE 3.0,
filesystems in the wild still use it.
2022-01-22 08:05:35 +00:00
pho fb59fa675b Implement some missing functions that are part of the API 2022-01-22 08:03:32 +00:00
pho 9733de6685 Correct the wrong prototype of fuse_daemonize(3) while retaining ABI compatibility 2022-01-22 08:02:49 +00:00
pho 8a6bfb22b5 Cosmetic changes 2022-01-22 08:01:50 +00:00
pho a045b4fd1a Change the way how FUSE_*_VERSION are handled
* FUSE_MAKE_VERSION(maj, min) now generates a 3-digits number if the
  version is higher than 3.9. This is needed to support FUSE 3.10 API.

* FUSE_{MAJOR,MINOR}_VERSION no longer have a fixed value but are
  derived from FUSE_USE_VERSION specified by the user code. This is
  needed to support more FUSE filesystems in the wild.
2022-01-22 08:01:12 +00:00
pho b40bd486c8 Implement a dummy pathconf() which always returns EINVAL 2022-01-22 08:00:17 +00:00
pho 12c809c691 Do not call fuse_operations.getattr() before initializing filesystem 2022-01-22 07:59:33 +00:00
pho c68139a4b6 Increase the warning level to spot more mistakes 2022-01-22 07:58:32 +00:00
pho a95017a87a lib/librefuse: Add support for legacy types and functions 2022-01-22 07:57:30 +00:00
pho 97dc09a69d lib/librefuse: Add stub functions for FUSE polling API 2022-01-22 07:56:15 +00:00
pho ce847e0a0b lib/librefuse: Implement data buffer API appeared on FUSE 2.9 2022-01-22 07:54:56 +00:00
pho 9f39150738 lib/librefuse: Implement FUSE session API and its signal handling functionality 2022-01-22 07:53:05 +00:00
pho 153b9c141b lib/librefuse: Implement logging API appeared on FUSE 3.7 2022-01-22 07:38:45 +00:00
pho 0585557a98 Allow calling puffs_mount(3) before puffs_daemon(3)
puffs_daemon(3) creates a pipe before forking, and the parent process
waits for the child to either complete puffs_mount(3) or fail. If a
user calls puffs_daemon(3) after puffs_mount(3), the function
deadlocks. While this error-reporting functionality is really a nice
thing to have, deadlocking is not great. If the filesystem has already
been mounted, puffs_mount(3) should just daemonize the process and
return.

This became an issue because fuse_daemonize(3) in FUSE API had no such
requirement and some FUSE filesystems in the wild suffered deadlocks.
2022-01-22 07:35:26 +00:00
christos 0f6437ba99 PR/56640: Kimmo Suominen: Correct HISTORY section. 2022-01-17 17:56:48 +00:00
rillig fba4f6e3e8 libpam: remove stray semicolon
No binary change.
2022-01-16 10:52:18 +00:00
rillig 7af2475f78 libcurses: remove unreachable statements
Found by lint.

No binary change.
2022-01-16 10:30:45 +00:00
christos daa505a92e Don't use __printflike, use the explicit attribute so that this works outside
NetBSD.
2022-01-14 13:31:05 +00:00
tnn 27a90dcd8a libedit: rl_message: annotate __printflike 2022-01-14 12:48:30 +00:00
christos b7e56637d9 PR/56618: Walter Lozano: Improve libedit compatibility with readline by
implementing:

    rl_copy_text, rl_erase_empty_line, rl_message, rl_on_new_line,
    rl_replace_line, rl_restore_prompt, rl_save_prompt
2022-01-11 18:30:15 +00:00
christos 68f6d39511 read the ps arguments from the correct place. 2022-01-10 20:04:01 +00:00
christos 104ea67795 Get rid of usrstack/USRSTACK. Document that the old version of getargv is
broken because of ASLR.
2022-01-10 19:51:30 +00:00
blymn 47946660f2 Revert change for array definition, it was incorrect, thanks Uwe. 2022-01-06 20:50:18 +00:00
blymn ebe5c3e633 Properly size and array to hold the larget return from wctomb. 2022-01-06 06:18:13 +00:00
andvar 1f6edd928c s/compnent/component/ 2022-01-04 22:10:08 +00:00
uwe bcb93c2ab4 exec(3): execlpe() first argument should be named "file"
"path" arguments are names used as-is, "file" arguments to "p"
functions are used to construct the pathname using $PATH if necessary.
2022-01-04 20:01:52 +00:00
uwe b4852c3567 getopt_long(3): "index" is an argument, not a field. 2022-01-04 19:36:16 +00:00
uwe 868269f7b0 getopt_long(3): use NULL, not 0, for flag in the example. 2022-01-04 19:32:16 +00:00
uwe f139c7cd08 ptsname(3): fix equivalence example
The buffer is static, don't make it appear that we are returning a
pointer to a local variable.
2022-01-02 03:46:40 +00:00
christos 8a3a1ac9a9 zero out the tzh structure to fix reproducibile builds. 2022-01-01 21:01:21 +00:00
msaitoh 988ab2c9fa s/sytem/system/ 2022-01-01 10:32:28 +00:00
msaitoh 777518dc50 s/implemenation/implementation/ in comment. 2022-01-01 08:34:34 +00:00
andvar 3746949308 fix few typos in comments, mainly in word "parameter". 2021-12-31 20:22:48 +00:00
uwe 017b38e5d1 curses: spell "foreground" correctly in comments 2021-12-17 03:50:18 +00:00
blymn 395d5f8537 Fix for PR lib/56298
Remove the DIAGASSERT for str being NULL in the puts/putp functions,
add protection so that the functions just return OK if str is NULL.
This prevents the assert firing when libcurses passes through a NULL
due to an undefined terminfo entry.
2021-12-15 21:07:12 +00:00
andvar 0e6a3361ec fix typos in word "request(s)". 2021-12-12 09:00:07 +00:00
andvar eb03b08ccf fix typos in word "operation(s)". 2021-12-12 08:49:57 +00:00
mrg d914a3c1b9 remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line.  again.  (i did this in 2008 and then
did not update all of my personal templates.)
2021-12-11 19:24:18 +00:00
andvar cbf5c65aff s/occured/occurred/ in comments, log messages and man pages. 2021-12-10 20:36:02 +00:00
andvar 8c4df4824b s/unaccessible/inaccessible/ 2021-12-10 19:30:05 +00:00
msaitoh 98b4f01524 s/premissions/permissions/ 2021-12-10 11:08:45 +00:00
andvar 6012d766dc fix various typos in comments and log messages. 2021-12-08 20:50:01 +00:00
andvar 42412bc75c s/efficent/efficient/ in comments. 2021-12-08 20:11:54 +00:00
andvar 253f520862 s/listner/listener/ 2021-12-07 22:09:59 +00:00
gson 8774b772cf In unix_parse(), always allocate memory for the entire struct sockaddr_un
and not just the part used by the present pathname, because the entire
struct will be passed to bind() and an EFAULT can result if not all of
it is a valid allocation.  Fixes PR kern/56533.
2021-12-07 10:39:33 +00:00
christos 12df8a1ef8 PR/56538: coypu: For compat ctime and friends (when time_t was 32 bits)
we want to load the timezone data using the same structs they were saved as.
Introduce __time_t which is always 64 bits and make the minimal changes for
this to work. Yes, it is ugly.
2021-12-05 18:06:24 +00:00
rillig a1de340f77 jemalloc.3: fix malformed CVS Id 2021-12-05 14:25:04 +00:00
msaitoh 73b5f8505b s/supress/suppress/ 2021-12-05 08:09:30 +00:00
msaitoh e44b4c4dd0 s/succesful/successful/ in comment. 2021-12-05 08:03:06 +00:00
msaitoh 2b50e65cd3 s/numberic/numeric/ in comment. 2021-12-05 05:03:05 +00:00
msaitoh 1316021699 s/argumetn/argument/ in comment. 2021-12-05 04:22:50 +00:00
pho 1f6f9b8380 librefuse: Preparation of a proper API versioning; no more #ifdef woes in user code
The goal is to fully support FUSE API version 3.0 while maintaining
API/ABI compatibility with code written for 2.6 (or even older).

* <fuse.h> now emits a compiler warning if it's included without
  defining FUSE_USE_VERSION. It had been silently defaulted to the
  latest supported version prior to this change. This is permissive
  compared to the original FUSE, as it emits an error instead.

* <fuse.h> now emits a warning if FUSE_USE_VERSION is higher than what
  can be provided.

* Added a macro FUSE_MAKE_VERSION(maj, min). It was missing from
  librefuse <fuse.h>.

No actual API updates have been made (yet).
2021-12-04 06:42:39 +00:00
pho f347108ede Use size_t in place of voff_t in puffs_setrootinfo(3)
Chuck Silvers pointed out that voff_t was also supposed to be
kernel-only. The correct type to use in userland would be off_t, but
since changing vsize_t to either voff_t or off_t is an ABI change on
32-bit platforms, we use size_t knowing that it is technically
incorrect.
2021-12-03 17:12:17 +00:00
pho 52a1252312 Avoid using register_t or vsize_t in <puffs.h>
<puffs.h> is a user-space header, and should not use any of
kernel-only types. It's not reasonable to require user-land
filesystems to #define _KERNTYPES.
2021-12-03 14:00:59 +00:00
andvar d1c4e519a3 fix various typos in comments, log messages and documentation. 2021-12-03 13:27:37 +00:00
pho f970914ed4 Revert my previous change to struct fuse_opt
I should have thought twice before commiting it. Of course changing
the layout of a struct breaks ABI compatibility. Change the offset
back to fixed 32 bits.
2021-12-01 14:17:50 +00:00
pho a399eed30e Use correct types for the fields of struct fuse_opt
This change shouldn't make any behavioral differences in reality, but
compilers these days dislike converting -1U to int32_t implicitly,
which is indeed understandable.
2021-12-01 13:51:33 +00:00
pho 13646d1209 Move the call of fuse_operations::init() from fuse_new() to fuse_loop()
Prior to this change we were calling init() before daemonizing the
process. Some filesystems call chdir(2) in init() but fuse_daemonize()
call chdir("/"), which breaks assumptions about the state of the
process.
2021-11-30 12:13:12 +00:00
skrll 3f3a46002b Trailing whitespace 2021-11-27 10:00:01 +00:00
thorpej 5696be5584 Decorate the VAX signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.

N.B. This is currently disabled, as these .cfi directives cause
linker warnings about incompatible TEXTREL relocations in .eh_frame.
2021-11-24 15:05:15 +00:00
thorpej cb0c5a1873 Decorate the SuperH signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
2021-11-24 02:01:15 +00:00
thorpej 389a070437 Decorate the ARM signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
2021-11-23 18:45:53 +00:00
thorpej 445de9ccf9 Because the PC is not a general purpose register on aarch64, we need
to use DWARF pseudo-register for the signal trampoline return address.

Adjust the style to match other platforms.
2021-11-23 02:49:55 +00:00
blymn fc986dbc59 Don't waste time setting the dirty flag multiple times. 2021-11-22 21:25:25 +00:00
nia 1569bcc0b3 cgdconfig(8): Add an argon2id password-based key generation method
This provides an extra level of side-channel and cracking resistance
compared to the pre-existing pkcs5_pbkdf2/sha1 method used for
password-based disk encryption.

Several new keygen parameters are supported:

	memory (integer, in kilobytes)
	parallelism (integer, usually the number of CPU cores)
	version (integer, usually 19...)

We do our best to calibrate these automatically when the paramsfile
is initially generated.

lgtm riastradh@
2021-11-22 14:34:35 +00:00
nia 5a3dc90041 crypt(3): document some of the memory units we're dealing with 2021-11-22 14:30:24 +00:00
thorpej 93b0ea009f Decorate the m68k signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
2021-11-21 23:58:09 +00:00
thorpej f8ce691891 Decorate the powerpc signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
2021-11-21 21:31:24 +00:00
thorpej a7d9970d1b Use the DWARF pseudo-register for the signal trampoline return address. 2021-11-20 19:26:20 +00:00
wiz 5ef525c783 Mention that fchmod conforms to XPG 4.2. Bump date. 2021-11-19 23:51:16 +00:00
thorpej 91fe750880 Decorate the MIPS signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
2021-11-18 04:33:20 +00:00
kre 3ba1fc18cc Move 'i' into DEBUG only code (now there be three).
Hopefully unbreaks !DEBUG builds.
2021-11-16 23:23:02 +00:00
blymn 145a760e05 Fix handling of the tab special character. 2021-11-16 21:00:50 +00:00
kre 676e85297d More cleanups and typo corrections. 2021-11-15 16:00:25 +00:00
wiz 0c114f84f3 Clean up. 2021-11-15 14:07:30 +00:00
wiz 4769a7f2b1 Sort SEE ALSO. 2021-11-15 14:06:50 +00:00
christos 18b914f008 Add man pages for posix_spawn_file_actions_add{f,}chdir from piyush 2021-11-15 14:01:50 +00:00
blymn 84d376be86 Fix for PR lib/55433
Correct the behaviour for ins_wstr:
* Properly check the string will fit by processing any special
  characters present when preforming the check.
* Simplify the routine by removing code that duplicates the code in
  _cursesi_addwchar and just call _cursesi_addwchar.
2021-11-15 06:27:06 +00:00
andvar 369abe069b fix various typos, mainly s/prefered/preferred/ 2021-11-07 20:31:09 +00:00
christos 1c05296632 Commit the userland portion of the posix_spawn_chdir project by Piyush Sachdeva 2021-11-07 14:34:30 +00:00
nia cce5ae2abd usbhid(3): use reallocarr 2021-11-03 16:18:09 +00:00
thorpej cb352d50ab CFI: Saved RA needs to point to the PC slot in the ucontext_t. 2021-11-03 04:52:51 +00:00
thorpej c570a44480 Set up the CFI in a slightly more rational way. 2021-11-03 03:58:31 +00:00
nia 464e94c8b5 fts(3): Use reallocarr instead of realloc(x * y), eliminate a temporary
variable.
2021-11-02 08:39:20 +00:00
thorpej 7c30b7e17f Adjust for new __sigaction_siginfo symbol. 2021-11-02 06:54:10 +00:00
nia 122b5006ee Force at most partial RELRO for rump_server and related libraries
rump_server with -l uses lazy resolution by default and thus cannot be
used with full RELRO/BIND_NOW.
2021-11-01 21:37:32 +00:00
andvar 9a662625bc fix typos, mainly in words minimum and maximum, but also few others. 2021-11-01 21:28:01 +00:00
christos 04f561bb0b Remove workaround, @rillig fixed the issue. 2021-11-01 15:56:53 +00:00
christos 637f9844ca work around lint bug 2021-11-01 12:26:18 +00:00
thorpej 02edde8aa3 Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
2021-11-01 05:53:45 +00:00
thorpej 2b286a53d4 Don't mention the "struct sigaltstack" name of "stack_t". 2021-11-01 05:29:35 +00:00
agc 2c1df105e9 Remove the
COPTS.*+=       -Wno-error=.*

lines for building argon2 sources, by fixing the problems at source.

Addresses Rin Okuyama's concerns on tech-userlevel/tech-crypto in

	Message-ID: <f1eab199-3607-bb05-15cc-033e38721ba4@gmail.com>
2021-11-01 03:09:58 +00:00
thorpej 0d8e07b5c7 Tidy up how __sigaction14_sigtramp.c is added to SRCS. 2021-10-31 22:24:34 +00:00
nia 9c5ddbe34d libcrypt: Compile with USE_FORT, for this is cryptographic software. 2021-10-31 09:16:08 +00:00
christos 7a6d5cb630 Put back the sigcontext sigtramp code. 2021-10-30 21:39:28 +00:00
nia e2fa600c84 pam_exec: Convert realloc(x * y) to reallocarr.
Eliminate a now-redundant temporary variable.
2021-10-30 11:34:59 +00:00
nia b893c4d5e4 libtelnet: convert malloc(x * y) to reallocarr 2021-10-30 10:46:57 +00:00
nia 8221e07e84 puffs(3): Replace realloc(x * y) with reallocarr 2021-10-30 10:34:18 +00:00
nia 31c52db692 refuse(3): Simplify reallocation logic with reallocarr. 2021-10-30 09:06:34 +00:00
kre f3643917bc Add "--" 'options end' parameter to the sh -c call that runs the
command, so that the command cannot appear to be more options
(which always then fails, as there would be no arg for "-c" to
treat as the command string in that case).

For the full (LONG) explanation, see:
   http://mail-index.netbsd.org/current-users/2021/10/29/msg041629.html
2021-10-29 19:27:06 +00:00
nia 129cb9a54f libcrypt: Fix a floating point exception when a low number of HMAC-SHA1
iterations are specified.
2021-10-29 13:22:08 +00:00
nia 99f42ade26 reallocarr does not set errno. 2021-10-29 11:03:46 +00:00
nia 7ab7c5f604 citrus: Use calloc instead of malloc'ing and clearing the array manually 2021-10-29 10:54:56 +00:00
nia 2ee81e7b06 scandir(3): Convert malloc(x * y) and realloc(x * y) to reallocarr 2021-10-29 10:40:00 +00:00
nia 1aca51f7f5 radixsort(3): use reallocarr instead of malloc(x * y) 2021-10-29 10:29:51 +00:00
nia 46bf9c16cb wcsdup(3): use reallocarr to catch integer overflow 2021-10-29 10:11:57 +00:00
riastradh 436ee50286 Fix typo in comment: allows, not alows.
I don't know what an alow is, maybe some cousin of the alot.
Awaiting a nature documentary by Allie Brosh about these perhaps more
elusive beasts.

PR misc/56473, from jschauma
2021-10-28 20:56:32 +00:00
kim 3590d12b68 Use .Sq instead of a dangling .So 2021-10-28 09:51:39 +00:00
nia f76dddbc66 getaddrinfo(3): malloc + memset -> calloc 2021-10-27 19:24:38 +00:00
christos 1971734547 fix problem with uninitialized variable on malformed 32 bit time. 2021-10-27 11:27:25 +00:00
thorpej 5184898635 - Use the signal trampoline version constants from <sys/signal.h>.
- Declare the sigtramp externs as as char arrays, not int arrays; not all
  platforms have fixed-sized 32-bit instructions.
2021-10-27 04:48:33 +00:00
nia 78b3fd4666 libcrypt: Make Werror-disables for external Argon2 library per-file.
Requested by rin.
2021-10-26 20:37:18 +00:00
christos 0faead2ffb Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
  no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
  sigcontext before. all the other ports that supported sigcontext had
  the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
2021-10-26 16:16:34 +00:00
nia 1008642e66 libcrypt: fine-grained warnings for argon2, requested by rin 2021-10-26 07:51:23 +00:00
blymn d84a936f4b Fix for PR lib/47398
Move cursor to end of the currently active field and sync the cursor
location so the cursor get positioned correctly when the form window
is refreshed.
2021-10-25 06:25:18 +00:00
gutteridge e036c8bd09 setlocale.3: minor updates to reflect the current implementation
Reflect a couple of amendments noted by John Marino on tech-userlevel:
http://mail-index.netbsd.org/tech-userlevel/2021/10/19/msg013091.html
2021-10-24 17:30:19 +00:00
thorpej d5b8844629 Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty.  This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver.  Compatible
with the same filter in FreeBSD.
2021-10-23 01:28:33 +00:00
ryoon e41648e26b Fix build failure
* Fix merge mistake.
* Cast to int for strict comparison like before.
2021-10-22 16:57:14 +00:00
christos 1b58480149 Change to code and documentation from 2021a -> 2021e
Release 2021e - 2021-10-21 18:41:00 -0700

  Changes to code

    none


Release 2021d - 2021-10-15 13:48:18 -0700

  Changes to code

    'zic -r' now uses "-00" time zone abbreviations for intervals
    with UT offsets that are unspecified due to -r truncation.
    This implements a change in draft Internet RFC 8536bis.


Release 2021c - 2021-10-01 14:21:49 -0700

  Changes to code

    Fix a bug in 'zic -b fat' that caused old timestamps to be
    mishandled in 32-bit-only readers (problem reported by Daniel
    Fischer).

  Changes to documentation

    Distribute the SECURITY file (problem reported by Andreas Radke).


Release 2021b - 2021-09-24 16:23:00 -0700

  Changes to maintenance procedure

    The new file SECURITY covers how to report security-related bugs.

    Several backward-compatibility links have been moved to the
    'backward' file.  These links, which range from Africa/Addis_Ababa
    to Pacific/Saipan, are only for compatibility with now-obsolete
    guidelines suggesting an entry for every ISO 3166 code.
    The intercontinental convenience links Asia/Istanbul and
    Europe/Nicosia have also been moved to 'backward'.

  Changes to code

    zic now creates each output file or link atomically,
    possibly by creating a temporary file and then renaming it.
    This avoids races where a TZ setting would temporarily stop
    working while zic was installing a replacement file or link.

    zic -L no longer omits the POSIX TZ string in its output.
    Starting with 2020a, zic -L truncated its output according to the
    "Expires" directive or "#expires" comment in the leapseconds file.
    The resulting TZif files omitted daylight saving transitions after
    the leap second table expired, which led to far less-accurate
    predictions of times after the expiry.  Although future timestamps
    cannot be converted accurately in the presence of leap seconds, it
    is more accurate to convert near-future timestamps with a few
    seconds error than with an hour error, so zic -L no longer
    truncates output in this way.

    Instead, when zic -L is given the "Expires" directive, it now
    outputs the expiration by appending a no-change entry to the leap
    second table.  Although this should work well with most TZif
    readers, it does not conform to Internet RFC 8536 and some pickier
    clients (including tzdb 2017c through 2021a) reject it, so
    "Expires" directives are currently disabled by default.  To enable
    them, set the EXPIRES_LINE Makefile variable.  If a TZif file uses
    this new feature it is marked with a new TZif version number 4,
    a format intended to be documented in a successor to RFC 8536.

    zic -L LEAPFILE -r @LO no longer generates an invalid TZif file
    that omits leap second information for the range LO..B when LO
    falls between two leap seconds A and B.  Instead, it generates a
    TZif version 4 file that represents the previously-missing
    information.

    The TZif reader now allows the leap second table to begin with a
    correction other than -1 or +1, and to contain adjacent
    transitions with equal corrections.  This supports TZif version 4.

    The TZif reader now lets leap seconds occur less than 28 days
    apart.  This supports possible future TZif extensions.

    Fix bug that caused 'localtime' etc. to crash when TZ was
    set to a all-year DST string like "EST5EDT4,0/0,J365/25" that does
    not conform to POSIX but does conform to Internet RFC 8536.

    Fix another bug that caused 'localtime' etc. to crash when TZ was
    set to a POSIX-conforming but unusual TZ string like
    "EST5EDT4,0/0,J365/0", where almost all the year is DST.

    Fix yet another bug that caused 'localtime' etc. to mishandle slim
    TZif files containing leap seconds after the last explicit
    transition in the table, or when handling far-future timestamps
    in slim TZif files lacking leap seconds.

    Fix localtime misbehavior involving positive leap seconds.
    This change affects only behavior for "right" system time,
    which contains leap seconds, and only if the UT offset is
    not a multiple of 60 seconds when a positive leap second occurs.
    (No such timezone exists in tzdb, luckily.)  Without the fix,
    the timestamp was ambiguous during a positive leap second.
    With the fix, any seconds occurring after a positive leap second
    and within the same localtime minute are counted through 60, not
    through 59; their UT offset (tm_gmtoff) is the same as before.
    Here is how the fix affects timestamps in a timezone with UT
    offset +01:23:45 (5025 seconds) and with a positive leap second at
    1972-06-30 23:59:60 UTC (78796800):

	time_t    without the fix      with the fix
	78796800  1972-07-01 01:23:45  1972-07-01 01:23:45 (leap second)
	78796801  1972-07-01 01:23:45  1972-07-01 01:23:46
	...
	78796815  1972-07-01 01:23:59  1972-07-01 01:23:60
	78796816  1972-07-01 01:24:00  1972-07-01 01:24:00

    Fix an unlikely bug that caused 'localtime' etc. to misbehave if
    civil time changes a few seconds before time_t wraps around, when
    leap seconds are enabled.

    Fix bug in zic -r; in some cases, the dummy time type after the
    last time transition disagreed with the TZ string, contrary to
    Internet RFC 8563 section 3.3.

    Fix a bug with 'zic -r @X' when X is a negative leap second that
    has a nonnegative correction.  Without the fix, the output file
    was truncated so that X appeared to be a positive leap second.
    Fix a similar, even-less-likely bug when truncating at a positive
    leap second that has a nonpositive correction.

    zic -r now reports an error if given rolling leap seconds, as this
    usage has never generally worked and is evidently unused.

    zic now generates a POSIX-conforming TZ string for TZif files
    where all-year DST is predicted for the indefinite future.
    For example, for all-year Eastern Daylight Time, zic now generates
    "XXX3EDT4,0/0,J365/23" where it previously generated
    "EST5EDT,0/0,J365/25" or "".  (Thanks to Michael Deckers for
    noting the possibility of POSIX conformance.)

    zic.c no longer requires sys/wait.h (thanks to spazmodius for
    noting it wasn't needed).

    When reading slim TZif files, zdump no longer mishandles leap
    seconds on the rare platforms where time_t counts leap seconds,
    fixing a bug introduced in 2014g.

    zdump -v now outputs timestamps at boundaries of what localtime
    and gmtime can represent, instead of the less-useful timestamps
    one day after the minimum and one day before the maximum.
    (Thanks to Arthur David Olson for prototype code, and to Manuela
    Friedrich for debugging help.)

    zdump's -c and -t options are now consistently inclusive for the
    lower time bound and exclusive for the upper.  Formerly they were
    inconsistent.  (Confusion noted by Martin Burnicki.)

  Changes to build procedure

    You can now compile with -DHAVE_MALLOC_ERRNO=0 to port to
    non-POSIX hosts where malloc doesn't set errno.
    (Problem reported by Jan Engelhardt.)

  Changes to documentation

    tzfile.5 better matches a draft successor to RFC 8536
    <https://datatracker.ietf.org/doc/draft-murchison-rfc8536bis/01/>.
2021-10-22 14:26:04 +00:00
andvar 6ff503baef Revert "Does not work" back to "Does no work". It wasn't a typo. 2021-10-21 21:35:02 +00:00
andvar 6f8dc1509f fix various typos, mainly in comments, but also in man pages and log messages. 2021-10-21 13:21:53 +00:00
nia 58856d1265 crypt.3: add a reference for Argon2 2021-10-20 20:29:33 +00:00
nia cb1631f686 Be a little bit more eager to let Argon2 use memory. 2021-10-20 20:21:44 +00:00
nia ac4429015a crypt(3): For argon2, default to time=3.
Good enough for a 50MHz SPARC, a shark, and the spec.
2021-10-20 16:46:33 +00:00
nia 364b5e2621 crypt(3): return 0 -> return NULL for function returning char * 2021-10-20 15:35:42 +00:00
nia 08100292d3 crypt(3): Adapt default Argon2 parameters to system performance
If the parameters are unspecified:

- Set the default memory consumption based on the amount of memory
available to userspace.

The algorithm actually slows down incredibly quickly as the "memory"
parameter is increased. We want to avoid running out of memory on low
memory systems, but increase the difficulty of bruteforcing passwords
from systems with a lot of memory. At the same time, we want to avoid
problems when concurrent logins are happening.

- Run a hashing loop for one second with steadily increasing "time"
until we settle on a value for "time". We want to use as much CPU time
as reasonable for computing the password hash without making logins
inconvenient.
2021-10-20 13:03:29 +00:00
thorpej 56265c7c8b Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,
and NOTE_READ.
2021-10-20 03:26:20 +00:00
thorpej 982ae832c3 Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
2021-10-20 03:08:16 +00:00
blymn 5b90c1a33c Fix for PR lib/47397
Fix a misinterpretation of the role of field fore and back.  Now field
pad is rendered in the back attribute always instead of only being used
for the non-current field.
2021-10-19 21:22:20 +00:00
blymn 63621d5a6b Add a bit more debug. 2021-10-19 06:41:03 +00:00
blymn 669adb1459 Fix for PR pkg/55931
Don't move the cursor when getch is called if input is not going to
be echoed.  Lynx uses the cursor to mark the current selection in a
pop-up, previously the cursor was being relocated when getch was called
which broke the Lynx item marking.
2021-10-19 06:37:29 +00:00
nia f9151ba943 libcrypt: Hide more private symbols by default. Fix style. 2021-10-16 10:53:33 +00:00
nia 6d05989be6 libcrypt: work around compiler bugs to get MKARGON2 working on vax 2021-10-13 14:28:32 +00:00
thorpej dbceac44db Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.
2021-10-13 04:57:19 +00:00
wiz 0fe65de003 Capitalize word. 2021-10-12 21:41:13 +00:00
nia a5ad08a454 crypt.3: note parallelism caveats 2021-10-12 17:27:26 +00:00
nia 87c3d6fe5c Fix release builds with MKARGON2=yes
This changes argon2 from a separately built library into a private
dependency of libcrypt and removes the argon2(1) utility (we already
have pwhash(1)). Giving libcrypt more library dependencies
complicates things (e.g. libcrypt is a dependency of openssl).
pthreads support gets disabled in argon2 for similar reasons.

For testing argon2, we rely on the libcrypt test suite.
2021-10-12 17:24:36 +00:00