Commit Graph

19930 Commits

Author SHA1 Message Date
christos c260c42c09 remove smbfs 2020-04-04 17:56:22 +00:00
nia e194ce9454 statvfs.2: Add STANDARDS section.
Reviewed by kamil
2020-04-04 12:57:26 +00:00
wiz acf9dc2f4e Add comma in enumeration. 2020-03-30 22:14:48 +00:00
maya 5ff881a534 Mention elf rather than a.out some more.
(Also, inspired by freebsd, which removed the non-elf support)
2020-03-30 20:37:03 +00:00
maya d4a8a6057f xref elf(5). 2020-03-30 20:35:12 +00:00
maya 9ced62b43c Be less of a minefield for new architectures. They're not going to be a.out.
Remove sh5, long gone.
(Hopefully nothing hits the #else case)
2020-03-30 20:34:11 +00:00
ryo 30a3b0e1af PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without scope-id 2020-03-30 08:34:38 +00:00
ryo b061283a45 fail to create a pidfile if hostname contains '/' 2020-03-30 08:24:36 +00:00
ryo 3bf82836bf patbuf must be updated if the length of patbuf is greater than or equal to 0. (that is always)
fix of r1.7 was incorrect.
2020-03-30 06:56:38 +00:00
ryo 1148c4261d fix build error with SDEBUG, MAP_DEBUG, DEBUG_REFRESH 2020-03-30 06:54:37 +00:00
roy 2d748ff84b terminfo: satisfy gcc bitching 2020-03-30 02:08:11 +00:00
roy 7f0204b5ec terminfo: v3 records should create v3 aliases 2020-03-30 00:09:06 +00:00
roy 5159a4258d terminfo: Promote a terminfo description to v3 when required
Blindly scanning the capabilities for # and checking that the following
number is bigger than a short isn't reliable because this could be a
string value:

SomeString#1234

Instead, if we process the numeric as normal and if it's value is too big
for v1 then promote the record to v3.
2020-03-29 21:46:22 +00:00
roy 59ea2669e1 terminfo: allow _ti_getname to convert from and to any version 2020-03-29 18:54:57 +00:00
roy 664218069f terminfo: Clamp numeric bounds to storage not API.
While here, fix decoding of numeric -1 stored in uint16_t to still be -1.
2020-03-29 18:32:45 +00:00
christos e2a9896bc4 PR/55118: Andreas Gustafsson: Oops, set the right flag variable. 2020-03-28 15:45:56 +00:00
roy 0b457be2fc terminfo: Add a comment for prior change. 2020-03-28 15:27:54 +00:00
roy 171093fef0 terminfo: use , as a record version delimiter rather than @
@ is allowed in a terminfo description, but a comma is not.
2020-03-28 15:25:53 +00:00
roy 96d0e34238 Whitespace 2020-03-28 15:23:33 +00:00
christos f5703f6ba1 support for older compilers 2020-03-28 02:38:15 +00:00
christos 1d30fdae10 Introduce a bunch of inline functions and utilities to avoid code duplication. 2020-03-27 17:39:53 +00:00
christos 3958d16a96 As described in tech-userlevel:
- Modify the writing code to only write entries in the new
  format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
  backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
  clamped entries, and new programs be able to use the wide
  fields with using the original db file.
2020-03-27 15:11:57 +00:00
wiz 2d8be20973 Remove trailing whitespace. 2020-03-25 22:09:48 +00:00
christos 703562b76a new paragraph 2020-03-25 21:26:12 +00:00
christos 00c598c3f1 more info 2020-03-25 21:24:08 +00:00
christos 6fa2277528 Revert putting a $ as the final character for blowfish. It is not required by
MCF and we want to be compatible.
2020-03-25 21:02:26 +00:00
wiz 51ad823948 Fix typos. Use more markup. New sentence, new line. 2020-03-25 18:53:50 +00:00
kre 4f0910e281 Delete the BUGS paragraph about the "missing" const qualifier for the
result type of strerror() (and strerror_l()).   While that once should
really have been present, when strerror() was invented, there was no
"const" qualifier in C to apply, and now the way the code is writtem
(really needs to be because of NLS support) the const is no longer
really appropriate.

Applications still shouldn't attempt to modify the result however.
2020-03-25 18:50:47 +00:00
kre 5388a00941 Document strerror_l()
While here also document (but comment it out since it isn't
available - yet) strerror_lr().   To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.
2020-03-25 18:45:42 +00:00
christos 3178d52ed6 - bump blowfish size, explain version
- add passwd xref
2020-03-25 18:37:08 +00:00
christos fd9ae3edee Add missing trailing $ for blowfish 2020-03-25 18:36:29 +00:00
gdt d5db881aeb Relax fdatasync restriction that fd be writable
The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX.  Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users.  Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.
2020-03-25 18:08:34 +00:00
christos 54fcd90b42 PR/55095: David A. Holland: pw_gensalt(3) undocumented 2020-03-25 17:11:06 +00:00
kre 219987b252 Arrange that strerror(-1) prints "Unknown error: -1" and not the
unsigned equivalent of -1.

While here, guarantee, even when !NLS, that nothing here (not even
snprintf deciding to complain about EILSEQ or something) can ever
alter errno (ie: always save and restore it, not only in the NLS case).
The functions here must never alter errno, whatever happens.
2020-03-25 16:15:41 +00:00
kre 93b9d85a0a Protect against malloc failure corrupting errno, which is not
permitted of these functions.
2020-03-25 16:10:17 +00:00
kre 12f8bae508 If we're going to loop, pausing and then retrying malloc() after it
has failed, in the hope that some other thread has free'd some memory,
but we want to bound the number of attempts, it helps if we actually
count them - otherwise we never get nearer to the limit.

In practice, malloc() for a reasonable application on a modern system
almost never fails, so the code containing this bug has probably never
been, and never will be, executed, but just in case, someday.

For this, it isn't clear if the intent was to have 10 retries (ie: 11
attempts) or 10 tries, but as the code said "retries > 10", I am
assuming the former (not that it matters, if the malloc() has failed
10 times in a row, with 10 second pauses between, the chances of an
11th succeeding aren't great).
2020-03-24 14:56:31 +00:00
kamil 15f8c76f05 Revert previous
It will be addressed in a better way.

Requested by <kre>
2020-03-24 14:47:02 +00:00
kamil 43bf7c3563 Avoid buffer overflow
Detected with ASan + RUMPKERNEL.
2020-03-24 01:56:56 +00:00
kamil 05ac20bb1c Fix off-by-one
Before accessing array member, check whether it is not out of valid range.

Detected with ASan + RUMPKERNEL.
2020-03-24 01:13:41 +00:00
wiz e9fe6f785f Fix synopsis, use more markup. 2020-03-23 16:14:20 +00:00
roy 41aea6ac80 Add missing man page for curses mouse functions. 2020-03-23 15:32:56 +00:00
roy bb2ce1fb3d curses: Add stubs for mouse functions
No mouse support actually included.
But that doesn't matter because most terms don't actually support a mouse.

We should look into hooking these into wsmouse(4) and xterm mouse
in the future.

Compatable with nCurses mouse API version 2.
2020-03-23 13:37:36 +00:00
pgoyette 561f1f3c9a Teach rump to process __link_set_evcnts entries. (Second part of
fix for PR kern/55088)
2020-03-22 13:30:10 +00:00
pgoyette 5996efe558 Teach rump how to process __link_set_sysctl_funcs so it can handle
modules the same as a real kernel.

Partly addresses PR kern/55088 - __link_set_evcnts not yet handled
(that will happen later)
2020-03-21 04:48:37 +00:00
tnn 15173c72e8 libp2k still needs to be under MKRUMP 2020-03-18 00:37:29 +00:00
christos a3dab7b65f pam and tpm have nothing to do with rump, so limit them to the libraries that
need MKRUMP. (from Tobias Nygren)
2020-03-17 22:20:48 +00:00
uwe eea4ed980c werase, wclrtobot, wclrtoeol - make code even more similar.
Rename attr to battr to match bch and WINDOW::battr.
No functional change intended.
2020-03-15 01:18:43 +00:00
uwe 878e2e095f __NEED_ERASE - don't shadow __LDATA::attr with macro parameter name. 2020-03-15 01:12:47 +00:00
roy aadfdb111b terminfo: promote numeric parameters from short to int
POSIX mandates implementations must support upto a short but may exceed it.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.

Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.

This requires a version bump because whilst the API hasn't changed thanks
to C int promotion, the ABI has. Also the underlying database structure
has changed as well - we now store the numeric paramter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.

libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.
2020-03-13 15:19:24 +00:00
roy 66ae8b28c2 curses: wrap the erase logic in a macro
Easier to use, it's in one place and now hopefully everyone is happy.

X
2020-03-13 02:57:26 +00:00