Commit Graph

295959 Commits

Author SHA1 Message Date
uwe 308d716787 apropos(1): Use the official spelling for "SQLite".
While here, use .Bx to refer to 3BSD.
2022-05-17 11:37:54 +00:00
uwe 806c657e56 apropos(1): Tweak the description of -1, ... -9, and -s
-s is not for compatibility only, because section names can be
anything.  E.g. we have 3lua and 9lua in base.  We have rudiments of
3f (for FORTRAN libs).  Some packages in pkgsrc also use suffixed 1
and 3 sections.
2022-05-17 11:31:14 +00:00
kre b17b839ae3 fix local privilege escalation due to a race condition
NetBSD-SA2016-006 included an incomplete fix for CVE-2016-6253,
a local privilege escalation vulnerability in mail.local(8).

mail.local(8) attempts to open(2) a user's existing mailbox file
to append to it.  If that call fails, mail.local(8) will then issue
a second open(2) call to create the file (O_CREAT).

An attacker had the opportunity to create the file in question (as
a symlink, or link to some other file) in between these two open(2) calls.

Fix this by using O_EXCL in the 2nd open call, if the file exists when
that one happens, something is going wrong, so just abort.  Also, only
attempt that 2nd open if the reason the first failed was that the file
did not exist (this doesn't fix the issue, but it potentially saves
some cycles).

Thanks to Jan Schaumann for bringing this to our attention.
2022-05-17 11:18:58 +00:00
riastradh 46bb8fc46d opencrypto: Factor setting CRYPTO_F_DONE out of branches.
This had been done in 1.30 when the locking was different.  No need
any more.  No functional change intended.
2022-05-17 10:32:58 +00:00
riastradh 8146e2acbb pfil(9): Assert pfil lists are not run in interrupt context.
All the paths leading to this should have been dispensed with by now.
The network stack runs in thread or softint context these days; hard
interrupt context is used only to put packets on queues deferred to
softint.
2022-05-17 10:28:08 +00:00
riastradh bd1083a3d4 pfil(9): Assert sleepable when editing pfil lists.
These might sleep to wait for users to drain.
2022-05-17 10:27:37 +00:00
riastradh 1e4e1466aa opencrypto(9): Omit needless casts around callbacks.
Just declare the right types to begin with.  No functional change
intended.
2022-05-17 09:53:09 +00:00
uwe 72ea3012f5 apropos(1): use proper -width for the list of options too 2022-05-17 08:39:58 +00:00
uwe 5123efc107 apropos(1): use proper -width 2022-05-17 08:35:46 +00:00
andvar 47bd93c346 fix few typos in comments. 2022-05-17 05:05:20 +00:00
riastradh d3fd4c2d1e rnd(9): Note that rndsource callbacks are never run in hardint.
But they may be run in softint at IPL_SOFTSERIAL.
2022-05-17 01:39:57 +00:00
gutteridge ba4e9b2ab5 apropos.1: document the PAGER environment variable 2022-05-17 01:22:14 +00:00
gutteridge d2ce6e15e6 apropos.c: fix pager functionality
Issue reported by Rocky Hotas on NetBSD-Users, patch input from RVP on
same, adjustments by me.
2022-05-17 00:21:22 +00:00
msaitoh 9a66a19006 Call m_freem(m) only if m0 == NULL. 2022-05-17 00:02:57 +00:00
rillig ee5b7371a9 gomoku: highlight the last played move 2022-05-16 22:03:16 +00:00
rillig ea4f930572 gomoku: add usage 2022-05-16 21:53:41 +00:00
rillig 509aea6249 gomoku: enable lint's strict bool mode
No functional change.
2022-05-16 21:48:45 +00:00
rillig 03582a4d36 gomoku: fix remaining lint warnings in -DDEBUG mode
The generated code changes since the calculations are now performed with
int precision.  No functional change since no overflow occurs.
2022-05-16 21:38:46 +00:00
rillig 46332bb5af gomoku: fix most lint warnings in -DDEBUG mode
No binary change.
2022-05-16 21:35:39 +00:00
mrg c7a42ccbeb try to handle ultrasparc III* "fast ecc error" traps.
i had a sunblade 2500 reset with this trap recently, and the
manual says it should have been recoverable.  in particular,
the US IIIv2 manual says in section 12.4.4.2 that the i-cache
won't see this data ever (so nothing needed there), and that
the d-cache needs to be disabled, and all the entries flushed,
and then re-enabled.

tested with a "trap 0x70" from kernel space, that trap.c
converted the "0x170" back to "0x70" (with an ADVANCE).  this
code not commited.
2022-05-16 21:28:05 +00:00
rillig 73770304b0 gomoku: allow combination of WARNS=6 and -DDEBUG 2022-05-16 21:02:18 +00:00
rillig 21be9673ff gomoku: prepare lint's strict bool mode
No binary change.
2022-05-16 20:57:01 +00:00
rillig 84c538f93b curses_input.3: fix argument type for keypad, notimeout, nodelay
There is no type named 'boolf', there's only 'bool'.
2022-05-16 20:09:13 +00:00
rillig fb3a24af4a gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add
explicit cast for them, as they are far from overflowing int.

The casts from one pointer type to 'struct combostr **' were indeed
suspicious.  In these cases, a single region of memory is allocated to
store two objects of different type, without declaring a struct type for
their combination.  The second object is an array of variable size.

No binary change.
2022-05-16 19:55:58 +00:00
rillig 9af749df4c gomoku: condense code to decide which spot is better
The comments in the conditions only serve to align the expressions, to
allow humans to check that they correspond.

No functional change.
2022-05-16 19:20:25 +00:00
martin 32928aa7bc Split the available disks (that may be partitioned) from the
preconfigured wedges (that can be install target, but can not be
partitioned). The latter are only usefull in special setups
and clobber the list of available disks for the usual setup cases.
2022-05-16 18:44:38 +00:00
palle 23d997145a sun4v/vdsk: add handling of SCSI_REPORT_LUNS 2022-05-16 17:13:28 +00:00
christos b5df3bed15 make things behave just like before the libcrypt symbol renaming:
The normal cgdconfig binary is built with threads and the crunched one
in rescue without.
2022-05-16 14:57:44 +00:00
christos e33af66176 remove threads; size constraints and behavioral change 2022-05-16 14:55:56 +00:00
kre 32cc3b0248 Alter error messages so they no longer claim that bad input is illegal. 2022-05-16 10:53:14 +00:00
christos 8cfe997684 Add -lpthread for the benefit or argon2 in cgdconfig 2022-05-16 10:52:09 +00:00
christos 0afca0c76d Re-enable threads; apparently we get different results depending if we are
threaded or not... This tastes like a bug.
2022-05-16 10:44:06 +00:00
jmcneill 0f00bfdde1 sdmmc: ld: Include the card type (SD card, MMC) in the disk description. 2022-05-16 10:03:23 +00:00
jmcneill 6724c56ea2 tprof: armv8: Only attach to known PMU types. 2022-05-16 09:42:32 +00:00
skrll b6d5713bed port-arm/50635: arm11_setup() cpuctrlmask value causes CPU_CONTROL_VECRELOC bit to toggle
Fix slightly differently to as suggested in the PR.  Annotate arm10_setup
while I'm here.
2022-05-16 07:07:17 +00:00
skrll 16e0b464c4 Fix the copy&paste botch from previous. Spotted by Tom Lane. 2022-05-16 06:07:23 +00:00
nia 90ea1fc35b ctwmrc: Turn off sysinst menu item for now, it requires root for most
functions and users likely aren't running X as root.  Also turn off
the xman menu item until a custom greeter screen can be imported
(also note apropos is broken)...
2022-05-16 04:52:11 +00:00
rillig af50285f47 gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their
replacement text, to have fewer identifiers to worry about.

No binary change.
2022-05-15 22:56:20 +00:00
rillig 20e9d475ef gomoku: remove write-only members from overlap_info
Since overlap_info is only used in pickmove.c, move it there.

No functional change.  In particular, in the middle of a game, gomoku
still tends to fall into analysis paralysis, thinking about the best
move for more than 3 minutes on modern hardware.  Since the algorithm is
basically unchanged since the 1990s, it must have been a long waiting
time back then, probably an hour per move.
2022-05-15 22:41:51 +00:00
rillig 3189ab5b3f gomoku: remove column macros
Of the 19 macros, only 3 were actually used.  Replace their uses with
expressions based on the board size.  It's a small step to making the
board size adjustable.  There are still other places using hard-coded
numbers.

No binary change.
2022-05-15 22:18:36 +00:00
rillig 0a647d356c gomoku: remove redundant parentheses around return values
No binary change.
2022-05-15 22:08:05 +00:00
rillig ee07f44521 gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4
instead of the usual 8.  Fixing that right now would introduce more
unnatural line breaks, so defer that until later.

No binary change.
2022-05-15 22:00:11 +00:00
mrg d254323219 create ./usr/libdata/firmware/radeon same as the non-/usr version
should fix builds for non x86/arm64.
2022-05-15 21:41:56 +00:00
andvar a5c1e39951 s/wich/which in comments. 2022-05-15 20:37:50 +00:00
christos f3c3951664 Build argon2 inline so that crunched programs work. I also disabled threads
for now; we can put them back if needed.
2022-05-15 19:53:27 +00:00
jmcneill 5126c2f90e Use non-deprecated proplib interfaces.
prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy
2022-05-15 18:27:35 +00:00
jmcneill f18efd622b sysinst: Write custom hostname to rc.conf when using DHCP
If the user changes the suggested hostname from DHCP, ensure that the
new hostname is written to rc.conf by clearing the appropriate
DHCPCONF_* flags.
2022-05-15 17:42:32 +00:00
jmcneill b2bd8c8703 sysinst: Prompt for hostname and domain, even when using DHCP.
Values discovered from the network may not match desired values for the
target system. Always give an opportunity to override them when using
DHCP.
2022-05-15 17:02:37 +00:00
riastradh a14e69f78f sun8icrypto(4): Switch off polling when ready for interrupts.
When I introduced logic to do polling and then interrupts, I
accidentally made it switch polling from on to...still on, which had
the effect of breaking the logic after sun8i_crypto_attach because
only sun8i_crypto_attach actually did polling.
2022-05-15 16:58:28 +00:00
uwe efe117ac7c rasops: fix automagic box chars for stride > 1 on little endian
This makes DEC line drawing (acsc) work correctly for "iso" fonts of
large sizes, e.g. spleen16x32 on x86.
2022-05-15 16:43:39 +00:00