mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-04 23:22:22 +01:00
Merge branch 'freebsd/current/main' into hardened/current/master
This commit is contained in:
commit
84444bdc26
5
RELNOTES
5
RELNOTES
@ -10,6 +10,11 @@ newline. Entries should be separated by a newline.
|
||||
|
||||
Changes to this file should not be MFCed.
|
||||
|
||||
0aabcd75dbc2:
|
||||
EC2 AMIs no longer generate RSA host keys by default for SSH. RSA
|
||||
host key generation can be re-enabled by setting sshd_rsa_enable="YES"
|
||||
in /etc/rc.conf if it is necessary to support very old SSH clients.
|
||||
|
||||
a1da7dc1cdad:
|
||||
The SO_SPLICE socket option was added. It allows TCP connections to
|
||||
be spliced together, enabling proxy-like functionality without the
|
||||
|
@ -1,5 +1,13 @@
|
||||
# News
|
||||
|
||||
## 7.0.2
|
||||
|
||||
This is a production release that fixes `Ctrl+d` on FreeBSD and Linux when using
|
||||
`editline`.
|
||||
|
||||
This bug was caused by the macOS fix in `7.0.0`. Unfortunately, this means that
|
||||
macOS does not respond properly to `Ctrl+d`.
|
||||
|
||||
## 7.0.1
|
||||
|
||||
This is a production release that fixes a warning using GCC on FreeBSD.
|
||||
|
@ -120,6 +120,30 @@ typedef struct BcHistory
|
||||
extern const char bc_history_editrc[];
|
||||
extern const size_t bc_history_editrc_len;
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
/**
|
||||
* Returns true if the line is a valid line, false otherwise.
|
||||
* @param line The line.
|
||||
* @param len The length of the line.
|
||||
* @return True if the line is valid, false otherwise.
|
||||
*/
|
||||
#define BC_HISTORY_INVALID_LINE(line, len) \
|
||||
((line) == NULL && ((len) == -1 || errno == EINTR))
|
||||
|
||||
#else // __APPLE__
|
||||
|
||||
/**
|
||||
* Returns true if the line is a valid line, false otherwise.
|
||||
* @param line The line.
|
||||
* @param len The length of the line.
|
||||
* @return True if the line is valid, false otherwise.
|
||||
*/
|
||||
#define BC_HISTORY_INVALID_LINE(line, len) \
|
||||
((line) == NULL && (len) == -1 && errno == EINTR)
|
||||
|
||||
#endif // __APPLE__
|
||||
|
||||
#else // BC_ENABLE_EDITLINE
|
||||
|
||||
#if BC_ENABLE_READLINE
|
||||
|
@ -37,6 +37,6 @@
|
||||
#define BC_VERSION_H
|
||||
|
||||
/// The current version.
|
||||
#define VERSION 7.0.1
|
||||
#define VERSION 7.0.2
|
||||
|
||||
#endif // BC_VERSION_H
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
@ -1731,7 +1731,7 @@ Functions\f[R] subsection below).
|
||||
.RE
|
||||
.TP
|
||||
\f[B]frand(p)\f[R]
|
||||
Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
|
||||
Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and
|
||||
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
|
||||
decimal point equal to the truncated absolute value of \f[B]p\f[R].
|
||||
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
|
||||
@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
|
||||
\f[B]seed\f[R] is \f[I]not\f[R] changed.
|
||||
.TP
|
||||
\f[B]ifrand(i, p)\f[R]
|
||||
Generates a pseudo\-random integer that is between \f[B]0\f[R]
|
||||
Generates a pseudo\-random number that is between \f[B]0\f[R]
|
||||
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
|
||||
with the number of decimal digits after the decimal point equal to the
|
||||
truncated absolute value of \f[B]p\f[R].
|
||||
|
@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**frand(p)**
|
||||
|
||||
: Generates a pseudo-random integer between **0** (inclusive) and **1**
|
||||
: Generates a pseudo-random number between **0** (inclusive) and **1**
|
||||
(exclusive) with the number of decimal digits after the decimal point equal
|
||||
to the truncated absolute value of **p**. If **p** is not **0**, then
|
||||
calling this function will change the value of **seed**. If **p** is **0**,
|
||||
@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**ifrand(i, p)**
|
||||
|
||||
: Generates a pseudo-random integer that is between **0** (inclusive) and the
|
||||
: Generates a pseudo-random number that is between **0** (inclusive) and the
|
||||
truncated absolute value of **i** (exclusive) with the number of decimal
|
||||
digits after the decimal point equal to the truncated absolute value of
|
||||
**p**. If the absolute value of **i** is greater than or equal to **2**, and
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
@ -1731,7 +1731,7 @@ Functions\f[R] subsection below).
|
||||
.RE
|
||||
.TP
|
||||
\f[B]frand(p)\f[R]
|
||||
Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
|
||||
Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and
|
||||
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
|
||||
decimal point equal to the truncated absolute value of \f[B]p\f[R].
|
||||
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
|
||||
@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
|
||||
\f[B]seed\f[R] is \f[I]not\f[R] changed.
|
||||
.TP
|
||||
\f[B]ifrand(i, p)\f[R]
|
||||
Generates a pseudo\-random integer that is between \f[B]0\f[R]
|
||||
Generates a pseudo\-random number that is between \f[B]0\f[R]
|
||||
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
|
||||
with the number of decimal digits after the decimal point equal to the
|
||||
truncated absolute value of \f[B]p\f[R].
|
||||
|
@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**frand(p)**
|
||||
|
||||
: Generates a pseudo-random integer between **0** (inclusive) and **1**
|
||||
: Generates a pseudo-random number between **0** (inclusive) and **1**
|
||||
(exclusive) with the number of decimal digits after the decimal point equal
|
||||
to the truncated absolute value of **p**. If **p** is not **0**, then
|
||||
calling this function will change the value of **seed**. If **p** is **0**,
|
||||
@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**ifrand(i, p)**
|
||||
|
||||
: Generates a pseudo-random integer that is between **0** (inclusive) and the
|
||||
: Generates a pseudo-random number that is between **0** (inclusive) and the
|
||||
truncated absolute value of **i** (exclusive) with the number of decimal
|
||||
digits after the decimal point equal to the truncated absolute value of
|
||||
**p**. If the absolute value of **i** is greater than or equal to **2**, and
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
@ -1731,7 +1731,7 @@ Functions\f[R] subsection below).
|
||||
.RE
|
||||
.TP
|
||||
\f[B]frand(p)\f[R]
|
||||
Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
|
||||
Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and
|
||||
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
|
||||
decimal point equal to the truncated absolute value of \f[B]p\f[R].
|
||||
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
|
||||
@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
|
||||
\f[B]seed\f[R] is \f[I]not\f[R] changed.
|
||||
.TP
|
||||
\f[B]ifrand(i, p)\f[R]
|
||||
Generates a pseudo\-random integer that is between \f[B]0\f[R]
|
||||
Generates a pseudo\-random number that is between \f[B]0\f[R]
|
||||
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
|
||||
with the number of decimal digits after the decimal point equal to the
|
||||
truncated absolute value of \f[B]p\f[R].
|
||||
|
@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**frand(p)**
|
||||
|
||||
: Generates a pseudo-random integer between **0** (inclusive) and **1**
|
||||
: Generates a pseudo-random number between **0** (inclusive) and **1**
|
||||
(exclusive) with the number of decimal digits after the decimal point equal
|
||||
to the truncated absolute value of **p**. If **p** is not **0**, then
|
||||
calling this function will change the value of **seed**. If **p** is **0**,
|
||||
@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**ifrand(i, p)**
|
||||
|
||||
: Generates a pseudo-random integer that is between **0** (inclusive) and the
|
||||
: Generates a pseudo-random number that is between **0** (inclusive) and the
|
||||
truncated absolute value of **i** (exclusive) with the number of decimal
|
||||
digits after the decimal point equal to the truncated absolute value of
|
||||
**p**. If the absolute value of **i** is greater than or equal to **2**, and
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
|
||||
.nh
|
||||
.ad l
|
||||
.SH NAME
|
||||
@ -1731,7 +1731,7 @@ Functions\f[R] subsection below).
|
||||
.RE
|
||||
.TP
|
||||
\f[B]frand(p)\f[R]
|
||||
Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
|
||||
Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and
|
||||
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
|
||||
decimal point equal to the truncated absolute value of \f[B]p\f[R].
|
||||
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
|
||||
@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
|
||||
\f[B]seed\f[R] is \f[I]not\f[R] changed.
|
||||
.TP
|
||||
\f[B]ifrand(i, p)\f[R]
|
||||
Generates a pseudo\-random integer that is between \f[B]0\f[R]
|
||||
Generates a pseudo\-random number that is between \f[B]0\f[R]
|
||||
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
|
||||
with the number of decimal digits after the decimal point equal to the
|
||||
truncated absolute value of \f[B]p\f[R].
|
||||
|
@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**frand(p)**
|
||||
|
||||
: Generates a pseudo-random integer between **0** (inclusive) and **1**
|
||||
: Generates a pseudo-random number between **0** (inclusive) and **1**
|
||||
(exclusive) with the number of decimal digits after the decimal point equal
|
||||
to the truncated absolute value of **p**. If **p** is not **0**, then
|
||||
calling this function will change the value of **seed**. If **p** is **0**,
|
||||
@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**.
|
||||
|
||||
**ifrand(i, p)**
|
||||
|
||||
: Generates a pseudo-random integer that is between **0** (inclusive) and the
|
||||
: Generates a pseudo-random number that is between **0** (inclusive) and the
|
||||
truncated absolute value of **i** (exclusive) with the number of decimal
|
||||
digits after the decimal point equal to the truncated absolute value of
|
||||
**p**. If the absolute value of **i** is greater than or equal to **2**, and
|
||||
|
@ -264,7 +264,18 @@ bc_history_line(BcHistory* h, BcVec* vec, const char* prompt)
|
||||
errno = EINTR;
|
||||
|
||||
// Get the line.
|
||||
while (line == NULL && (len == -1 || errno == EINTR))
|
||||
//
|
||||
// XXX: Why have a macro here? Because macOS needs to be special. Honestly,
|
||||
// it's starting to feel special like Windows at this point. Anyway, the
|
||||
// second SIGWINCH signal of multiple will return a valid line length on
|
||||
// macOS, so we need to allow for that on macOS. However, FreeBSD's editline
|
||||
// is different and will mess up the terminal if we do it that way.
|
||||
//
|
||||
// There is one limitation with this, however: Ctrl+D won't work on macOS.
|
||||
// But it's because of macOS that this problem exists, and I can't really do
|
||||
// anything about it. So macOS should fix their broken editline; once they
|
||||
// do, I'll fix Ctrl+D on macOS.
|
||||
while (BC_HISTORY_INVALID_LINE(line, len))
|
||||
{
|
||||
line = el_gets(h->el, &len);
|
||||
bc_history_use_prompt = false;
|
||||
|
@ -71,6 +71,9 @@ ec2_common() {
|
||||
's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \
|
||||
${DESTDIR}/etc/ssh/sshd_config
|
||||
|
||||
# RSA host keys are obsolete and also very slow to generate
|
||||
echo 'sshd_rsa_enable="NO"' >> ${DESTDIR}/etc/rc.conf
|
||||
|
||||
# Use FreeBSD Update mirrors hosted in AWS
|
||||
sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \
|
||||
${DESTDIR}/etc/freebsd-update.conf
|
||||
|
@ -1538,7 +1538,7 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
|
||||
*/
|
||||
if (sc->sc_flags & SCF_ECN_MASK) {
|
||||
sc->sc_flags &= ~SCF_ECN_MASK;
|
||||
sc->sc_flags = tcp_ecn_syncache_add(tcp_get_flags(th), iptos);
|
||||
sc->sc_flags |= tcp_ecn_syncache_add(tcp_get_flags(th), iptos);
|
||||
}
|
||||
#ifdef MAC
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user