CVS: cvs.openbsd.org: src

2021-11-15 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2021/11/15 19:46:46

Modified files:
lib/csu: boot.h 

Log message:
Sync boot.h with ld.so's boot.c, getting rid of struct boot_dyn,
only initializing the variables we need to, and switching to a
"while < end-of-array" style for DT_REL/RELA processing

ok drahn@ kettenis@



CVS: cvs.openbsd.org: src

2021-11-15 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2021/11/15 15:37:36

Modified files:
sbin/iked  : ikev2.c 

Log message:
style



CVS: cvs.openbsd.org: src

2021-11-15 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/11/15 11:25:52

Modified files:
sbin/resolvd   : resolvd.c 

Log message:
Pass sockaddr length to be on the safe side, still



CVS: cvs.openbsd.org: src

2021-11-15 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/11/15 11:23:45

Modified files:
sbin/resolvd   : resolvd.c 

Log message:
Revert previous

sockaddr_storage should stay since it is preferred and less error prone.

>From deraadt
OK florian



CVS: cvs.openbsd.org: www

2021-11-15 Thread T . J . Townsend
CVSROOT:/cvs
Module name:www
Changes by: t...@cvs.openbsd.org2021/11/15 11:21:59

Modified files:
faq: faq15.html 

Log message:
simplify "updating packages" section by only explaining how to update all
installed packages, not individual ones. while here, make update/upgrade
usage more consistent. ok tb



Re: CVS: cvs.openbsd.org: src

2021-11-15 Thread Klemens Nanni
On Mon, Nov 15, 2021 at 06:58:16PM +0100, Florian Obser wrote:
> Fair enough, sorry for the noise.
> 
> kn, could you please revert this?

Yes, although I'll keep the non-zero sockaddr length bits in.



Re: CVS: cvs.openbsd.org: src

2021-11-15 Thread Florian Obser
Fair enough, sorry for the noise.

kn, could you please revert this?


On 2021-11-15 10:41 -07, "Theo de Raadt"  wrote:
> I disagree with the sockaddr_storage removal part of this diff.
>
> struct sockaddr_storage was added to Unix _precisely_ because the type
> of code you have written was often found to be error prone.
>
> It is longer.  There aren't fewer casts after your change, there are
> more.  Since there are casts, it is possible for future changes to the
> code to point at the wrong sockaddr and incorrectly initialize part of
> it.  If a 3rd protocol is ever added, it will become even more of a
> mess, and 3 structs might exceed the size of sockaddr_storage.
>
> We spent more than a decade putting sockaddr_storage into the tree,
> and now you want to start going the other way?
>
> Klemens Nanni  wrote:
>
>> CVSROOT: /cvs
>> Module name: src
>> Changes by:  k...@cvs.openbsd.org2021/11/15 10:33:51
>> 
>> Modified files:
>>  sbin/resolvd   : resolvd.c 
>> 
>> Log message:
>> Avoid huge sockaddr_storage
>> 
>> sockaddr_{in,in6} are enough and a simple sockaddr pointer is enough to
>> abstract them  (sockaddr_storage is what worked for me, there is no other
>> reason to use it).
>> 
>> While here, be portable and pass a non-zero length to getnameinfo(3);
>> while OpenBSD's implementation ignores it in the NI_NUMERICHOST case,
>> at least the old KAME stack didn't.
>> 
>> No functional change.
>> 
>> Prodded by florian
>> OK florian
>> 

-- 
I'm not entirely sure you are real.



CVS: cvs.openbsd.org: src

2021-11-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/11/15 10:42:50

Modified files:
distrib/sets/lists/comp: mi 

Log message:
sync



Re: CVS: cvs.openbsd.org: src

2021-11-15 Thread Theo de Raadt
I disagree with the sockaddr_storage removal part of this diff.

struct sockaddr_storage was added to Unix _precisely_ because the type
of code you have written was often found to be error prone.

It is longer.  There aren't fewer casts after your change, there are
more.  Since there are casts, it is possible for future changes to the
code to point at the wrong sockaddr and incorrectly initialize part of
it.  If a 3rd protocol is ever added, it will become even more of a
mess, and 3 structs might exceed the size of sockaddr_storage.

We spent more than a decade putting sockaddr_storage into the tree,
and now you want to start going the other way?

Klemens Nanni  wrote:

> CVSROOT:  /cvs
> Module name:  src
> Changes by:   k...@cvs.openbsd.org2021/11/15 10:33:51
> 
> Modified files:
>   sbin/resolvd   : resolvd.c 
> 
> Log message:
> Avoid huge sockaddr_storage
> 
> sockaddr_{in,in6} are enough and a simple sockaddr pointer is enough to
> abstract them  (sockaddr_storage is what worked for me, there is no other
> reason to use it).
> 
> While here, be portable and pass a non-zero length to getnameinfo(3);
> while OpenBSD's implementation ignores it in the NI_NUMERICHOST case,
> at least the old KAME stack didn't.
> 
> No functional change.
> 
> Prodded by florian
> OK florian
> 



CVS: cvs.openbsd.org: src

2021-11-15 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/11/15 10:33:51

Modified files:
sbin/resolvd   : resolvd.c 

Log message:
Avoid huge sockaddr_storage

sockaddr_{in,in6} are enough and a simple sockaddr pointer is enough to
abstract them  (sockaddr_storage is what worked for me, there is no other
reason to use it).

While here, be portable and pass a non-zero length to getnameinfo(3);
while OpenBSD's implementation ignores it in the NI_NUMERICHOST case,
at least the old KAME stack didn't.

No functional change.

Prodded by florian
OK florian



CVS: cvs.openbsd.org: src

2021-11-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/11/15 10:14:51

Modified files:
sys/kern   : kern_pledge.c 

Log message:
Copy p_p->ps_pledge into a local variable (called pledge) in every function
which checks PLEDGE_* bits more than once.  Some functions are called without
locking, and this avoids misinterpreting bits which have some coupled behaviour.
ok cheloha kettenis



CVS: cvs.openbsd.org: src

2021-11-15 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2021/11/15 09:32:15

Modified files:
usr.sbin/rpki-client: repo.c 

Log message:
Adjust how the repository count limit works. Instead of failing hard just
fall back to a possible cache and try to validate what is available.
This still limits the number of repositories fetched but allows valid
repositories to finish with the available data.
OK job@



CVS: cvs.openbsd.org: src

2021-11-15 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/15 09:18:36

Modified files:
lib/libcrypto/man: ASN1_STRING_length.3 ASN1_STRING_new.3 
   Makefile 
Added files:
lib/libcrypto/man: ASN1_BIT_STRING_set.3 

Log message:
new manual page ASN1_BIT_STRING_set(3) documenting four BIT STRING accessors



CVS: cvs.openbsd.org: xenocara

2021-11-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:xenocara
Changes by: dera...@cvs.openbsd.org 2021/11/15 08:53:40

Modified files:
distrib/sets/lists/xetc: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2021-11-15 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2021/11/15 08:48:54

Modified files:
sys/kern   : kern_event.c 

Log message:
Revert to eager removal of poll/select knotes

This should prevent a panic that bluhm@ has reported.



CVS: cvs.openbsd.org: src

2021-11-15 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2021/11/15 08:38:08

Modified files:
sys/dev/usb: uhidev.h 

Log message:
Third attempt to solve the claim multiple report ids conflict. Using the
report id to signal that multiple ones should be claimed by the match
routines does not work. All valid report ids 1-255 cannot of course be
used and 0 which is reserved by the USB HID specification is internally
used to represents devices lacking an explicit report id.

Therefore, use presence of the claimed array to signal that multiple
report ids can be claimed.

Tested by gnezdo@



CVS: cvs.openbsd.org: src

2021-11-15 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2021/11/15 08:36:24

Modified files:
sys/dev/usb: fido.c ucycom.c ugold.c uhid.c uhidev.c 
 uhidev.h ujoy.c umt.c uoaklux.c uoakrh.c 
 uoakv.c upd.c uslhcom.c uthum.c utrh.c 
 utwitch.c 

Log message:
In preparation for once again trying the resolve the claim multiple
report ids conflict, extract the claim multiple report ids conditional
in order to minimize the required upcoming changes to resolve the
conflict.

Tested by gnezdo@



CVS: cvs.openbsd.org: src

2021-11-15 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2021/11/15 08:14:24

Modified files:
usr.sbin/amd/amd: get_args.c 
usr.sbin/amd/amq: amq.c 
usr.sbin/crunchgen: crunchgen.c 
usr.sbin/mtree : mtree.c 
usr.sbin/npppctl: npppctl.c 
usr.sbin/npppd/npppd: npppd.c 
usr.sbin/pstat : pstat.c 
usr.sbin/quotaon: quotaon.c 
usr.sbin/rarpd : rarpd.c 
usr.sbin/rdate : rdate.c 
usr.sbin/repquota: repquota.c 
usr.sbin/rpc.bootparamd: bootparamd.c 
usr.sbin/syslogc: syslogc.c 

Log message:
No need to declare optind, optarg or opterr; unistd.h does this for us.
>From Jan Stary.  OK deraadt@



CVS: cvs.openbsd.org: src

2021-11-15 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2021/11/15 07:57:57

Modified files:
usr.sbin/btrace: map.c 

Log message:
Change printing of maps to use qsort to order the output using a pointer
array. This replaces the current solution that only prints one element for
a certain value and not all elements with tha same value.
This can be further optimized but printing is not really a hot path in btrace.
OK mpi@



CVS: cvs.openbsd.org: src

2021-11-15 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/15 06:39:40

Modified files:
lib/libcrypto/man: ASN1_STRING_length.3 ASN1_STRING_new.3 
   ASN1_mbstring_copy.3 Makefile 
Added files:
lib/libcrypto/man: ASN1_PRINTABLE_type.3 
   ASN1_UNIVERSALSTRING_to_string.3 

Log message:
document ASN1_PRINTABLE_type(3) and ASN1_UNIVERSALSTRING_to_string(3)



CVS: cvs.openbsd.org: www

2021-11-15 Thread Mark Kettenis
CVSROOT:/cvs
Module name:www
Changes by: kette...@cvs.openbsd.org2021/11/15 06:11:20

Modified files:
.  : want.html 

Log message:
Raspberry Pi CM4 + IO module taken care of.



CVS: cvs.openbsd.org: src

2021-11-15 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:src
Changes by: ajacou...@cvs.openbsd.org   2021/11/15 05:56:11

Modified files:
etc/rc.d   : rc.subr 

Log message:
Tidy up; no change.



CVS: cvs.openbsd.org: src

2021-11-15 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/15 04:51:09

Modified files:
lib/libcrypto/man: ASN1_STRING_new.3 ASN1_item_d2i.3 
   ASN1_item_new.3 Makefile 
Added files:
lib/libcrypto/man: ASN1_item_pack.3 

Log message:
document ASN1_item_pack(3) and ASN1_item_unpack(3)



CVS: cvs.openbsd.org: src

2021-11-15 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2021/11/15 03:58:13

Modified files:
usr.bin/tmux   : mode-tree.c server-client.c status.c tmux.h 

Log message:
Leave the hardware cursor at the position of the selected line in choose
modes and current editing position and at the command prompt. It is
invisible but this is helpful for people using screen readers. GitHub
issue 2970.



CVS: cvs.openbsd.org: src

2021-11-15 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/15 03:41:11

Modified files:
lib/libcrypto/man: ASN1_STRING_new.3 Makefile 
Added files:
lib/libcrypto/man: i2a_ASN1_STRING.3 

Log message:
document i2a_ASN1_STRING(3) and a2i_ASN1_STRING(3)