Make fixes and improvements

- Invent iso8601us() for faster timestamps
- Improve --strace descriptions of sigset_t
- Rebuild the Landlock Make bootstrap binary
- Introduce MODE=sysv for non-Windows builds
- Permit OFD fcntl() locks under pledge(flock)
- redbean can now protect your kernel from ddos
- Have vfork() fallback to sys_fork() not fork()
- Change kmalloc() to not die when out of memory
- Improve documentation for some termios functions
- Rewrite putenv() and friends to conform to POSIX
- Fix linenoise + strace verbosity issue on Windows
- Fix regressions in our ability to show backtraces
- Change redbean SetHeader() to no-op if value is nil
- Improve fcntl() so SQLite locks work in non-WAL mode
- Remove some unnecessary work during fork() on Windows
- Create redbean-based SSL reverse proxy for IPv4 TurfWar
- Fix ape/apeinstall.sh warning when using non-bash shells
- Add ProgramTrustedIp(), and IsTrustedIp() APIs to redbean
- Support $PWD, $UID, $GID, and $EUID in command interpreter
- Introduce experimental JTqFpD APE prefix for non-Windows builds
- Invent blackhole daemon for firewalling IP addresses via UNIX named socket
- Add ProgramTokenBucket(), AcquireToken(), and CountTokens() APIs to redbean
This commit is contained in:
Justine Tunney 2022-10-17 11:02:04 -07:00
parent 648bf6555c
commit f7ff77d865
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
209 changed files with 3818 additions and 998 deletions

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B1000000,0x1008,0,0,0,0,0
.syscon baud,B1000000,0x1008,1000000,1000000,1000000,1000000,1000000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B110,3,110,110,110,110,0
.syscon baud,B110,3,110,110,110,110,110

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B115200,0x1002,0x01c200,0x01c200,0x01c200,0x01c200,0
.syscon baud,B115200,0x1002,115200,115200,115200,115200,115200

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B1152000,0x1009,0,0,0,0,0
.syscon baud,B1152000,0x1009,1152000,1152000,1152000,1152000,1152000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B1200,9,0x04b0,0x04b0,0x04b0,0x04b0,0
.syscon baud,B1200,9,1200,1200,1200,1200,1200

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B134,4,134,134,134,134,0
.syscon baud,B134,4,134,134,134,134,134

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B150,5,150,150,150,150,0
.syscon baud,B150,5,150,150,150,150,150

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B1500000,0x100a,0,0,0,0,0
.syscon baud,B1500000,0x100a,1500000,1500000,1500000,1500000,1500000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B1800,10,0x0708,0x0708,0x0708,0x0708,0
.syscon baud,B1800,10,1800,1800,1800,1800,1800

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B19200,14,0x4b00,0x4b00,0x4b00,0x4b00,0
.syscon baud,B19200,14,19200,19200,19200,19200,19200

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B200,6,200,200,200,200,0
.syscon baud,B200,6,200,200,200,200,200

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B2000000,0x100b,0,0,0,0,0
.syscon baud,B2000000,0x100b,2000000,2000000,2000000,2000000,2000000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B230400,0x1003,0x038400,0x038400,0x038400,0x038400,0
.syscon baud,B230400,0x1003,230400,230400,230400,230400,230400

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B2400,11,0x0960,0x0960,0x0960,0x0960,0
.syscon baud,B2400,11,2400,2400,2400,2400,2400

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B2500000,0x100c,0,0,0,0,0
.syscon baud,B2500000,0x100c,2500000,2500000,2500000,2500000,2500000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B300,7,300,300,300,300,0
.syscon baud,B300,7,300,300,300,300,300

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B3000000,0x100d,0,0,0,0,0
.syscon baud,B3000000,0x100d,3000000,3000000,3000000,3000000,3000000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B3500000,0x100e,0,0,0,0,0
.syscon baud,B3500000,0x100e,3500000,3500000,3500000,3500000,3500000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B38400,15,0x9600,0x9600,0x9600,0x9600,0
.syscon baud,B38400,15,38400,38400,38400,38400,38400

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B4000000,0x100f,0,0,0,0,0
.syscon baud,B4000000,0x100f,4000000,4000000,4000000,4000000,4000000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B4800,12,0x12c0,0x12c0,0x12c0,0x12c0,0
.syscon baud,B4800,12,4800,4800,4800,4800,4800

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B50,1,50,50,50,50,0
.syscon baud,B50,1,50,50,50,50,50

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B500000,0x1005,0,0,0,0,0
.syscon baud,B500000,0x1005,500000,500000,500000,500000,500000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B57600,0x1001,0xe100,0xe100,0xe100,0xe100,0
.syscon baud,B57600,0x1001,57600,57600,57600,57600,57600

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B576000,0x1006,0,0,0,0,0
.syscon baud,B576000,0x1006,576000,576000,576000,576000,576000

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B600,8,600,600,600,600,0
.syscon baud,B600,8,600,600,600,600,600

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B75,2,75,75,75,75,0
.syscon baud,B75,2,75,75,75,75,75

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon baud,B9600,13,0x2580,0x2580,0x2580,0x2580,0
.syscon baud,B9600,13,9600,9600,9600,9600,9600

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon fcntl,F_OFD_GETLK,36,92,-1,-1,-1,5
.syscon fcntl,F_OFD_GETLK,36,-1,-1,-1,-1,-1

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon fcntl,F_OFD_SETLK,37,90,-1,-1,-1,6
.syscon fcntl,F_OFD_SETLK,37,-1,-1,-1,-1,-1

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon fcntl,F_OFD_SETLKW,38,91,-1,-1,-1,7
.syscon fcntl,F_OFD_SETLKW,38,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon termios,TIOCDRAIN,0x5409,0x2000745e,0x2000745e,0x2000745e,0x2000745e,0

View file

@ -1,10 +1,12 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_CLONE_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_CLONE_H_
#define CSIGNAL 0x000000ff
#define CLONE_VM 0x00000100
#define CLONE_FS 0x00000200
#define CLONE_FILES 0x00000400
#define CLONE_SIGHAND 0x00000800
#define CLONE_PIDFD 0x00001000
#define CLONE_PTRACE 0x00002000
#define CLONE_VFORK 0x00004000
#define CLONE_PARENT 0x00008000
@ -17,6 +19,12 @@
#define CLONE_DETACHED 0x00400000
#define CLONE_UNTRACED 0x00800000
#define CLONE_CHILD_SETTID 0x01000000
#define CLONE_STOPPED 0x02000000
#define CLONE_NEWCGROUP 0x02000000
#define CLONE_NEWUTS 0x04000000
#define CLONE_NEWIPC 0x08000000
#define CLONE_NEWUSER 0x10000000
#define CLONE_NEWPID 0x20000000
#define CLONE_NEWNET 0x40000000
#define CLONE_IO 0x80000000
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_CLONE_H_ */

View file

@ -76,7 +76,7 @@ COSMOPOLITAN_C_END_
#define F_UNLCK SYMBOLIC(F_UNLCK)
#define F_WRLCK SYMBOLIC(F_WRLCK)
/* avoid leading #ifdef astray */
/* avoid leading #ifdef configurations astray */
/* #define F_FULLFSYNC SYMBOLIC(F_FULLFSYNC) */
/* #define F_BARRIERFSYNC SYMBOLIC(F_BARRIERFSYNC) */
/* #define F_OFD_GETLK SYMBOLIC(F_OFD_GETLK) */

View file

@ -111,7 +111,6 @@ extern const uint64_t TIOCCBRK;
extern const uint64_t TIOCCDTR;
extern const uint64_t TIOCCHKVERAUTH;
extern const uint64_t TIOCCONS;
extern const uint64_t TIOCDRAIN;
extern const uint64_t TIOCEXT;
extern const uint64_t TIOCFLAG_CLOCAL;
extern const uint64_t TIOCFLAG_MDMBUF;
@ -300,7 +299,6 @@ COSMOPOLITAN_C_END_
#define TIOCCDTR SYMBOLIC(TIOCCDTR)
#define TIOCCHKVERAUTH SYMBOLIC(TIOCCHKVERAUTH)
#define TIOCCONS SYMBOLIC(TIOCCONS)
#define TIOCDRAIN SYMBOLIC(TIOCDRAIN)
#define TIOCEXT SYMBOLIC(TIOCEXT)
#define TIOCFLAG_CLOCAL SYMBOLIC(TIOCFLAG_CLOCAL)
#define TIOCFLAG_MDMBUF SYMBOLIC(TIOCFLAG_MDMBUF)