openbsd
10 years agosync to traceroute:
florian [Fri, 18 Apr 2014 16:20:56 +0000 (16:20 +0000)]
sync to traceroute:
* s/Dst/to/
* s/Src/from/
* drop Rcv
OK benno@

10 years agoIf -s is not given do a dummy connect to get outgoing ip,
florian [Fri, 18 Apr 2014 16:19:11 +0000 (16:19 +0000)]
If -s is not given do a dummy connect to get outgoing ip,
unconditionally try to bind to this ip and get a source port for udp
this way, like traceroute6 is doing.  This means you can no longer
traceroute from IPs not present on the system. (There are probably
better tools if you want to send traffic from spoofed IPs.)
OK benno@

10 years agofix previous
reyk [Fri, 18 Apr 2014 16:13:02 +0000 (16:13 +0000)]
fix previous

10 years agoSync to tracroute: don't print source IP if -s is not given
florian [Fri, 18 Apr 2014 16:11:36 +0000 (16:11 +0000)]
Sync to tracroute: don't print source IP if -s is not given
OK benno@ (who wants it back in some form after the merge)

10 years agoguenther would prefer more separation
tedu [Fri, 18 Apr 2014 16:11:22 +0000 (16:11 +0000)]
guenther would prefer more separation

10 years agospacing
reyk [Fri, 18 Apr 2014 16:08:06 +0000 (16:08 +0000)]
spacing

10 years agoSync to tracroute: handle "time exceeded in transit" before the
florian [Fri, 18 Apr 2014 16:07:54 +0000 (16:07 +0000)]
Sync to tracroute: handle "time exceeded in transit" before the
switch and add a default case.
OK benno@

10 years agosync packet_ok signature to traceroute6
florian [Fri, 18 Apr 2014 16:04:39 +0000 (16:04 +0000)]
sync packet_ok signature to traceroute6
OK benno@

10 years agosync to traceroute: s/opacket/packetdata/
florian [Fri, 18 Apr 2014 16:02:08 +0000 (16:02 +0000)]
sync to traceroute: s/opacket/packetdata/
OK lteo@, benno@

10 years agoEmbed struct tv32 into struct opacket like traceroute.
florian [Fri, 18 Apr 2014 16:00:38 +0000 (16:00 +0000)]
Embed struct tv32 into struct opacket like traceroute.
This changes the data part of an icmp6 paket, before it only
contained the timestamp, now it contains a whole struct opacket.
Shouldn't be an issue as nobody looks at this data anyway.
OK benno@

10 years agoMalak: I think we made the merchant angry.
tedu [Fri, 18 Apr 2014 15:59:36 +0000 (15:59 +0000)]
Malak: I think we made the merchant angry.
Conan: Are you surprised?
Malak: But we didn't steal everything he had!
Conan: We didn't have time.

10 years agoFactor out build_probe{4,6} from send_probe; now send_probe is
florian [Fri, 18 Apr 2014 15:58:43 +0000 (15:58 +0000)]
Factor out build_probe{4,6} from send_probe; now send_probe is
AF independent. While there define outpacket as u_char and
cast as needed in traceroute6.
OK benno@

10 years agosync
deraadt [Fri, 18 Apr 2014 15:58:18 +0000 (15:58 +0000)]
sync

10 years agomillert said i can kill rshd
tedu [Fri, 18 Apr 2014 15:57:12 +0000 (15:57 +0000)]
millert said i can kill rshd

10 years agowe need to crank
tedu [Fri, 18 Apr 2014 15:53:49 +0000 (15:53 +0000)]
we need to crank

10 years agoFix SSL client-only mode when no RSA private key is needed.
reyk [Fri, 18 Apr 2014 15:53:28 +0000 (15:53 +0000)]
Fix SSL client-only mode when no RSA private key is needed.

Found by andre@ with the args-ssl-server.pl regress test.

ok andre@

10 years agoremove include files not needed
deraadt [Fri, 18 Apr 2014 15:53:24 +0000 (15:53 +0000)]
remove include files not needed

10 years agoDocument support for "openssl s_client -starttls lmtp"
guenther [Fri, 18 Apr 2014 15:46:50 +0000 (15:46 +0000)]
Document support for "openssl s_client -starttls lmtp"

10 years agoFinish zapping SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION usage; only keep
guenther [Fri, 18 Apr 2014 15:39:53 +0000 (15:39 +0000)]
Finish zapping SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION usage; only keep
the #define for compat, but document that it's a no-op now.  Also, neuter
the -legacy_renegotiation option to "openssl s_{client,server}"

ok beck@

10 years agouse the portable construct around asprintf; pointed out by halex
deraadt [Fri, 18 Apr 2014 15:38:16 +0000 (15:38 +0000)]
use the portable construct around asprintf; pointed out by halex

10 years agoreaching into altq outside #ifdef ALTQ is bad, mmkay? ok claudio
henning [Fri, 18 Apr 2014 15:20:00 +0000 (15:20 +0000)]
reaching into altq outside #ifdef ALTQ is bad, mmkay? ok claudio

10 years agotcp_respond: let the stack worry about the cksum instead of doing it
henning [Fri, 18 Apr 2014 15:14:25 +0000 (15:14 +0000)]
tcp_respond: let the stack worry about the cksum instead of doing it
manually, ok naddy (in january)

10 years agopf_send_tcp: ask the stack to do the cksum instead of doing it manually
henning [Fri, 18 Apr 2014 15:13:01 +0000 (15:13 +0000)]
pf_send_tcp: ask the stack to do the cksum instead of doing it manually
ok benno lteo naddy (back in january)

10 years agoIt's been a quarter century: we can assume volatile is present with that name.
guenther [Fri, 18 Apr 2014 15:09:52 +0000 (15:09 +0000)]
It's been a quarter century: we can assume volatile is present with that name.

10 years agoSome dude named Tavis Ormandy reported a bug which has gone unfixed.
tedu [Fri, 18 Apr 2014 15:03:20 +0000 (15:03 +0000)]
Some dude named Tavis Ormandy reported a bug which has gone unfixed.
http://marc.info/?l=openssl-users&m=138014120223264&w=2
Arguably a doc bug, but we argue not. If you parse a new cert into memory
occupied by a previously verified cert, the new cert will inherit that
state, bypassing future verification checks. To avoid this, we will always
start fresh with a new object.

grudging ok from guenther, after i threatened to make him read the code yet
again. "that ok was way more painful and tiring then it should have been"

10 years agoreaching into altq unconditionally (and w/o ifdef ALTQ) is bad, mmkay?
henning [Fri, 18 Apr 2014 14:56:59 +0000 (14:56 +0000)]
reaching into altq unconditionally (and w/o ifdef ALTQ) is bad, mmkay?

10 years agosince e_os.h is dead, and e_os2.h is installed, we can fetch from there.
deraadt [Fri, 18 Apr 2014 14:41:54 +0000 (14:41 +0000)]
since e_os.h is dead, and e_os2.h is installed, we can fetch from there.
This means we don't need the reach-around anymore.

10 years agoIt's been a quarter century: we can assume volatile is present with that name.
guenther [Fri, 18 Apr 2014 14:38:21 +0000 (14:38 +0000)]
It's been a quarter century: we can assume volatile is present with that name.

10 years agoPut the final pieces from e_os.h in the required places, and remove it.
deraadt [Fri, 18 Apr 2014 14:37:41 +0000 (14:37 +0000)]
Put the final pieces from e_os.h in the required places, and remove it.
"dance on it's grave" says beck
ok guenther beck

10 years agocut altq here
henning [Fri, 18 Apr 2014 14:34:24 +0000 (14:34 +0000)]
cut altq here

10 years agoblank lines between decls and code
tedu [Fri, 18 Apr 2014 14:34:07 +0000 (14:34 +0000)]
blank lines between decls and code

10 years agoThe RSA_FLAG_SIGN_VER is not yet supported and the current code uses
reyk [Fri, 18 Apr 2014 14:32:22 +0000 (14:32 +0000)]
The RSA_FLAG_SIGN_VER is not yet supported and the current code uses
the rsa_priv_enc() and rsa_pub_dec() callbacks for sign and verify
operations.

A tale from OpenSSL's rsa.h:

  New sign and verify functions: some libraries don't allow arbitrary
  data to be signed/verified: this allows them to be used. Note: for
  this to work the RSA_public_decrypt() and RSA_private_encrypt() should
  *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
  for backwards compatibility this functionality is only enabled if the
  RSA_FLAG_SIGN_VER option is set in 'flags'.

In OpenSSL, RSA engines should provide the rsa_sign() and rsa_verify()
callbacks and this should be the default.  By the "default" is
disabled by default and RSA engines that provide extra sign and verify
callbacks have to set the non-default RSA_FLAG_SIGN_VER flag.  This is
not used by OpenSSL's own RSA code and was only set by two non-default
RSA engines: IBM 4758 and Windows CAPI - both of them got removed from
our library.  And btw., this comment about the new non-default default
was added in 1999.

Thanks to Piotr Sikora, who pointed out that I didn't handle the
sign/verify case.

10 years agoWe should probably thank OpenSSL.
schwarze [Fri, 18 Apr 2014 14:25:52 +0000 (14:25 +0000)]
We should probably thank OpenSSL.
They gave Theo another chance to be happy.

10 years agoThese files were never installed in the past, and are not generally
deraadt [Fri, 18 Apr 2014 14:05:01 +0000 (14:05 +0000)]
These files were never installed in the past, and are not generally
used.  They can go away.
ok guenther reyk

10 years agoIntroduce privsep for private keys:
reyk [Fri, 18 Apr 2014 13:55:26 +0000 (13:55 +0000)]
Introduce privsep for private keys:

- Move RSA private keys to a new separate process instead of copying
them to the relays.  A custom RSA engine is used by the SSL/TLS code
of the relay processes to send RSA private key encryption/decryption
(also used for sign/verify) requests to the new "ca" processes instead
of operating on the private key directly.

- Each relay process gets its own related ca process.  Setting
"prefork 5" in the config file will spawn 10 processes (5 relay, 5
ca).  This diff also reduces the default number of relay processes
from 5 to 3 which should be suitable in most installations without a
very heavy load.

- Don't keep text versions of the keys in memory, parse them once and
keep the binary representation.  This might still be the case in
OpenSSL's internals but will be fixed in the library.

This diff doesn't prevent something like "heartbleed" but adds an
additional mitigation to prevent leakage of the private keys from the
processes doing SSL/TLS.

With feedback from many
ok benno@

10 years agoUse asprintf() for generating path, instead of multiple
deraadt [Fri, 18 Apr 2014 13:41:20 +0000 (13:41 +0000)]
Use asprintf() for generating path, instead of multiple
return-value-not-checked strlcpy and strlcat

10 years agoin CONF_get1_default_config_file(), don't calculate a buffer size,
deraadt [Fri, 18 Apr 2014 13:38:31 +0000 (13:38 +0000)]
in CONF_get1_default_config_file(), don't calculate a buffer size,
malloc it, do unbounded strlcpy's to it... but instead of asnprintf.
While there, let's put a '/' between the two path components!  Wonder
how old that bug is..
ok guenther

10 years agoIf somebody else is already processing the RPC requests on a stream socket,
kettenis [Fri, 18 Apr 2014 13:35:31 +0000 (13:35 +0000)]
If somebody else is already processing the RPC requests on a stream socket,
don't panic, but just return.

tested by nicm@
ok tedu@

10 years agoMore KNF.
jsing [Fri, 18 Apr 2014 13:26:34 +0000 (13:26 +0000)]
More KNF.

10 years agoanother round of chemo for the RAND code to provide clarity.
tedu [Fri, 18 Apr 2014 13:19:03 +0000 (13:19 +0000)]
another round of chemo for the RAND code to provide clarity.
ok deraadt

10 years agoMore KNF.
jsing [Fri, 18 Apr 2014 13:14:31 +0000 (13:14 +0000)]
More KNF.

10 years agoegd support is too dangerous to leave where somebody might find it.
tedu [Fri, 18 Apr 2014 13:13:50 +0000 (13:13 +0000)]
egd support is too dangerous to leave where somebody might find it.
ok deraadt.

10 years agoMore KNF.
jsing [Fri, 18 Apr 2014 12:15:48 +0000 (12:15 +0000)]
More KNF.

10 years agoThe proc.c code sets up some socketpair for the communication between
reyk [Fri, 18 Apr 2014 12:02:37 +0000 (12:02 +0000)]
The proc.c code sets up some socketpair for the communication between
different privsep processes.  The implementation is using
multi-dimensional arrays and and some complicated process to process
relations.  This is the first attempt of cleaning it up and to allow
N:N communications for the upcoming "CA" processes.

Discussed with some, but nobody dared to comment on the code.

10 years agoHave each thread keeps its own (counted!) reference to the process's ucreds
guenther [Fri, 18 Apr 2014 11:51:16 +0000 (11:51 +0000)]
Have each thread keeps its own (counted!) reference to the process's ucreds
to avoid possible use-after-free references when swapping ids in threaded
processes.  "Do I have the right creds?" checks are always made with the
threads creds.

Inspired by FreeBSD and NetBSD
"right time" deraadt@

10 years agono more altq hier^Where either
henning [Fri, 18 Apr 2014 11:41:10 +0000 (11:41 +0000)]
no more altq hier^Where either

10 years agono more altq
henning [Fri, 18 Apr 2014 11:36:06 +0000 (11:36 +0000)]
no more altq

10 years agoHandle passing zero to a variable fieldwidth or precision.
guenther [Fri, 18 Apr 2014 11:35:51 +0000 (11:35 +0000)]
Handle passing zero to a variable fieldwidth or precision.

ok deraadt@

10 years agounistd.h for protos where needed
deraadt [Fri, 18 Apr 2014 11:33:33 +0000 (11:33 +0000)]
unistd.h for protos where needed

10 years agodefine RFILE only in the file that needs it
deraadt [Fri, 18 Apr 2014 11:31:16 +0000 (11:31 +0000)]
define RFILE only in the file that needs it

10 years agoMore KNF.
jsing [Fri, 18 Apr 2014 11:20:32 +0000 (11:20 +0000)]
More KNF.

10 years agostop mentioning altq
henning [Fri, 18 Apr 2014 11:19:45 +0000 (11:19 +0000)]
stop mentioning altq

10 years agostop talking about altq
henning [Fri, 18 Apr 2014 11:18:40 +0000 (11:18 +0000)]
stop talking about altq
this manpage needs a bigger sync with reality...

10 years agomissed these
henning [Fri, 18 Apr 2014 11:15:21 +0000 (11:15 +0000)]
missed these

10 years agoadd braces missed when fixing leaks
jsg [Fri, 18 Apr 2014 11:14:35 +0000 (11:14 +0000)]
add braces missed when fixing leaks

10 years agoKNF, since this is no longer script generated
deraadt [Fri, 18 Apr 2014 11:14:08 +0000 (11:14 +0000)]
KNF, since this is no longer script generated

10 years agosync
deraadt [Fri, 18 Apr 2014 10:53:17 +0000 (10:53 +0000)]
sync

10 years agoInvert the signature logic of in{,6}_selectsrc, make them return the
jca [Fri, 18 Apr 2014 10:48:29 +0000 (10:48 +0000)]
Invert the signature logic of in{,6}_selectsrc, make them return the
error code and pass the resulting source address back to the caller
through a pointer, as suggested by chrisz.  This gives us more readable
code, and eases the deletion of useless checks in the callers' error path.
Add a bunch of "0 -> NULL" conversions, while here.
ok chrisz@ mpi@

10 years agostop testing altq stuffz
henning [Fri, 18 Apr 2014 10:48:23 +0000 (10:48 +0000)]
stop testing altq stuffz
how many tests I wrote back then... (of which the majority is pointless)

10 years agoDo not set RTF_DONE flag on route message, only the kernel is allowed to
claudio [Fri, 18 Apr 2014 10:05:22 +0000 (10:05 +0000)]
Do not set RTF_DONE flag on route message, only the kernel is allowed to
set that to indicate that it processed the message. Also de-#ifdef the
RTF_MASK part, OpenBSD is not that archaic.
OK yasuoka@ long time ago

10 years agoSwitch to the new makewhatis(8)/apropos(1)/whatis(1) combo.
schwarze [Fri, 18 Apr 2014 10:00:48 +0000 (10:00 +0000)]
Switch to the new makewhatis(8)/apropos(1)/whatis(1) combo.
"commit the switch now" espie@  "go for it" deraadt@

See the apropos(1) manual for a description of what's new.
On machines where you want the full functionality,
run "sudo makewhatis" and put "MAKEWHATISARGS=' '" into weekly.local(8).
Otherwise, when upgrading via source, run "sudo makewhatis -Q".

10 years agoUpgrade our KerberosV to Heimdal 1.5.3 (minor update).
ajacoutot [Fri, 18 Apr 2014 09:47:34 +0000 (09:47 +0000)]
Upgrade our KerberosV to Heimdal 1.5.3 (minor update).

- Fix leaking file descriptors in KDC
- Better socket/timeout handling in libkrb5
- General bug fixes

ok robert@

10 years agoFix a few lies; polish wording and formatting while here.
schwarze [Fri, 18 Apr 2014 09:46:41 +0000 (09:46 +0000)]
Fix a few lies; polish wording and formatting while here.

10 years agosimplify file:file:... stuff
deraadt [Fri, 18 Apr 2014 09:38:42 +0000 (09:38 +0000)]
simplify file:file:... stuff

10 years agoAlso match RTS5227 in rtsx(4). Works for me on the THinkPad X240.
claudio [Fri, 18 Apr 2014 09:34:05 +0000 (09:34 +0000)]
Also match RTS5227 in rtsx(4). Works for me on the THinkPad X240.
This will give us basic support there are a few extra bits in the linux
driver we ignore for now. Something to look at in the future.
OK stsp@ mlarkin@ kettenis@

10 years agoWe are not ARCHAIC; no object change.
florian [Fri, 18 Apr 2014 08:44:25 +0000 (08:44 +0000)]
We are not ARCHAIC; no object change.
OK lteo@

10 years agoMore KNF.
jsing [Fri, 18 Apr 2014 07:09:23 +0000 (07:09 +0000)]
More KNF.

10 years agosupport mailaddr lookup in table_db
gilles [Fri, 18 Apr 2014 06:59:15 +0000 (06:59 +0000)]
support mailaddr lookup in table_db

10 years agoMore KNF.
jsing [Fri, 18 Apr 2014 05:37:44 +0000 (05:37 +0000)]
More KNF.

10 years agoImplement qle_fabric_plogo and let qle_fabric_plogi look at the response that
jmatthew [Fri, 18 Apr 2014 05:08:15 +0000 (05:08 +0000)]
Implement qle_fabric_plogo and let qle_fabric_plogi look at the response that
comes back, so later on we can work out what to do when logins fail

10 years agowhitespace normalization
tedu [Fri, 18 Apr 2014 04:33:09 +0000 (04:33 +0000)]
whitespace normalization

10 years agorepair whitespace. this is what happens when functions take 20 params.
tedu [Fri, 18 Apr 2014 04:23:53 +0000 (04:23 +0000)]
repair whitespace. this is what happens when functions take 20 params.

10 years agoRemove MAIN and PROG defines now that we do not compile non-monolithic.
jsing [Fri, 18 Apr 2014 04:17:16 +0000 (04:17 +0000)]
Remove MAIN and PROG defines now that we do not compile non-monolithic.

ok tedu@

10 years agoigetest.c moved to regress we don't need another copy
jsg [Fri, 18 Apr 2014 03:37:43 +0000 (03:37 +0000)]
igetest.c moved to regress we don't need another copy
ok miod@

10 years agofix another potential double free
jsg [Fri, 18 Apr 2014 03:28:12 +0000 (03:28 +0000)]
fix another potential double free
ok miod@ lteo@ jca@

10 years ago-netware
tedu [Fri, 18 Apr 2014 02:56:48 +0000 (02:56 +0000)]
-netware

10 years agoundef NETWARE_CLIB and NETWARE_LIBC
tedu [Fri, 18 Apr 2014 02:48:58 +0000 (02:48 +0000)]
undef NETWARE_CLIB and NETWARE_LIBC

10 years agounterminated comment
tedu [Fri, 18 Apr 2014 02:45:58 +0000 (02:45 +0000)]
unterminated comment

10 years agoKaboomNF
tedu [Fri, 18 Apr 2014 02:45:26 +0000 (02:45 +0000)]
KaboomNF

10 years agospelling fix from Micha Borrmann on openssl-dev
tedu [Fri, 18 Apr 2014 02:35:57 +0000 (02:35 +0000)]
spelling fix from Micha Borrmann on openssl-dev

10 years agoblunt force knf
tedu [Fri, 18 Apr 2014 01:59:00 +0000 (01:59 +0000)]
blunt force knf

10 years agoRework the command polling loop so it can handle multiple responses in a single
jmatthew [Fri, 18 Apr 2014 01:11:23 +0000 (01:11 +0000)]
Rework the command polling loop so it can handle multiple responses in a single
interrupt, as done in qla(4).

10 years agoRemove support for unwanted operating systems.
jsing [Fri, 18 Apr 2014 01:07:13 +0000 (01:07 +0000)]
Remove support for unwanted operating systems.

ok miod@

10 years agoUnifdef OPENSSL_FIPS.
jsing [Fri, 18 Apr 2014 01:04:53 +0000 (01:04 +0000)]
Unifdef OPENSSL_FIPS.

ok miod@

10 years agolob a few more knf grenades in here to soften things up.
tedu [Fri, 18 Apr 2014 00:58:49 +0000 (00:58 +0000)]
lob a few more knf grenades in here to soften things up.

10 years agoputting most of the braces in the right column is the very least we can do.
tedu [Fri, 18 Apr 2014 00:10:08 +0000 (00:10 +0000)]
putting most of the braces in the right column is the very least we can do.

10 years agoWhen iterating through fabric ports, start at our own port ID, so we can
jmatthew [Thu, 17 Apr 2014 23:53:49 +0000 (23:53 +0000)]
When iterating through fabric ports, start at our own port ID, so we can
reliably tell when we've been through the whole list.

10 years agowhack a bunch of disabled code. ok beck lteo
tedu [Thu, 17 Apr 2014 23:35:40 +0000 (23:35 +0000)]
whack a bunch of disabled code. ok beck lteo

10 years agoCopy out all mbox registers after a mailbox operation completes.
jmatthew [Thu, 17 Apr 2014 23:17:18 +0000 (23:17 +0000)]
Copy out all mbox registers after a mailbox operation completes.
Simplifies things a bit and makes pre- and post- attach operations work
the same.

10 years agoMake MONOLITH the default and only option
matthew [Thu, 17 Apr 2014 22:44:34 +0000 (22:44 +0000)]
Make MONOLITH the default and only option

ok deraadt

10 years agostab at indentation
tedu [Thu, 17 Apr 2014 22:37:59 +0000 (22:37 +0000)]
stab at indentation

10 years agodon't fake up SSIZE_MAX
tedu [Thu, 17 Apr 2014 22:23:27 +0000 (22:23 +0000)]
don't fake up SSIZE_MAX

10 years agomore windows/netware leftovers
tedu [Thu, 17 Apr 2014 22:22:28 +0000 (22:22 +0000)]
more windows/netware leftovers

10 years agodelete if 0 code
tedu [Thu, 17 Apr 2014 22:19:56 +0000 (22:19 +0000)]
delete if 0 code

10 years agomore spring VMS cleanup
giovanni [Thu, 17 Apr 2014 22:09:37 +0000 (22:09 +0000)]
more spring VMS cleanup
ok miod@ lteo@

10 years agono need for a variable which is hardcoded and only used in an snprintf,
sthen [Thu, 17 Apr 2014 22:08:45 +0000 (22:08 +0000)]
no need for a variable which is hardcoded and only used in an snprintf,
ok giovanni@. tidy comments nearby while there.

10 years agoUse !defined() rather than empty().
miod [Thu, 17 Apr 2014 22:06:19 +0000 (22:06 +0000)]
Use !defined() rather than empty().

10 years agooops, exit vs return; spotted by matthew
deraadt [Thu, 17 Apr 2014 21:55:07 +0000 (21:55 +0000)]
oops, exit vs return; spotted by matthew

10 years agounistd.h exposed after -Wall after e_os.h stops doing so; spotted by matthew
deraadt [Thu, 17 Apr 2014 21:45:45 +0000 (21:45 +0000)]
unistd.h exposed after -Wall after e_os.h stops doing so; spotted by matthew

10 years agono longer need to fool emacs indentation and other if (0) oddities.
tedu [Thu, 17 Apr 2014 21:41:12 +0000 (21:41 +0000)]
no longer need to fool emacs indentation and other if (0) oddities.