Verify all targets: tests+asan green, payload+plugin link, compat dup fix, build lists complete

This commit is contained in:
SirHumza committed 2026-09-23 21:56:49 +02:00
1 parent 6a1f25524e
commit 004bd67f9b
5 files changed
+23 -5

No files matched your search

+16 -1
View File
@@ -26,8 +26,23 @@
static void make_key(char *out){
unsigned char b[16];
memset(b, 0, sizeof b);
int fd=open("/dev/urandom",O_RDONLY);
if(fd>=0){ read(fd,b,16); close(fd); }
if(fd>=0){
size_t got = 0;
while(got < sizeof b){
long r = read(fd, (char *)b + got, sizeof b - got);
if(r <= 0) break;
got += (size_t)r;
}
close(fd);
if(got < sizeof b){
/* short read: mix time in rather than leaving stack bytes */
uint32_t t = (uint32_t)time(NULL);
for(size_t i = got; i < sizeof b; i++, t = t*1664525u + 1013904223u)
b[i] ^= (unsigned char)(t >> 24);
}
}
else { for(int i=0;i<16;i++) b[i]=(unsigned char)(time(NULL)+i*7); }
b64_encode(b,16,out);
}
+1
View File
@@ -19,6 +19,7 @@
#include <errno.h>
#include <stdio.h>
#else
#include <fcntl.h>
#include <orbis/Net.h>
#include <orbis/Sysmodule.h>
#include <netinet/in.h>
+4 -2
View File
@@ -21,10 +21,12 @@ INTDIR := $(BUILD_DIR)
# Our daemon sources (payload main.c is NOT part of the plugin; plugin.c is the entry)
DAEMON_SRC := $(ORBISRPC)/log.c $(ORBISRPC)/cfg.c $(ORBISRPC)/jsonlite.c $(ORBISRPC)/b64.c \
$(ORBISRPC)/sfo.c $(ORBISRPC)/tmdb_crypto.c $(ORBISRPC)/tmdb.c \
$(ORBISRPC)/updater.c $(ORBISRPC)/updater_util.c \
$(ORBISRPC)/updater.c $(ORBISRPC)/updater_http.c $(ORBISRPC)/updater_util.c \
$(ORBISRPC)/tls.c $(ORBISRPC)/ws.c $(ORBISRPC)/discord.c $(ORBISRPC)/detect.c \
$(ORBISRPC)/compat.c $(ORBISRPC)/lock.c $(ORBISRPC)/timesync.c \
$(ORBISRPC)/art.c $(ORBISRPC)/health.c $(ORBISRPC)/manifest.c \
$(ORBISRPC)/daemon.c
PLUGIN_SRC := $(SRCDIR)/plugin.c $(SRCDIR)/compat.c
PLUGIN_SRC := $(SRCDIR)/plugin.c
CFILES := $(PLUGIN_SRC) $(DAEMON_SRC)
OBJS := $(patsubst %.c,$(INTDIR)/%.o,$(notdir $(CFILES)))
MBED_SRC := $(shell find $(ROOT)/third_party/mbedtls/library -name '*.c' ! -name 'net_sockets.c' ! -name 'timing.c' ! -name 'entropy_poll.c' | sort)
+1 -1
View File
@@ -47,7 +47,7 @@ LDFLAGS="-m elf_x86_64 -pie --eh-frame-hdr -L$SDK/lib $LIBS $SDK/lib/crt1.o --sc
export OO_PS4_TOOLCHAIN="$SDK"
OUT="$ROOT/build"; mkdir -p "$OUT"
echo "=== compiling (CC=$CC LD=$LD SDK=$SDK) ==="
for f in log cfg jsonlite b64 sfo tmdb_crypto tmdb updater updater_util tls ws detect discord daemon compat main; do
for f in log cfg jsonlite b64 sfo tmdb_crypto tmdb updater updater_http updater_util tls ws detect discord daemon compat lock timesync art health manifest main; do
"$CC" $CFLAGS -c -o "$OUT/$f.o" "orbisrpc/$f.c" || fail "compile $f"
done
echo "=== mbedtls (skip net_sockets/timing: POSIX-only) ==="
+1 -1
View File
@@ -15,7 +15,7 @@ OUT="build-sdk"
mkdir -p "$OUT"
CFLAGS="-O2 -Wall -DORBISRPC_SDK_PAYLOAD -Iorbisrpc -Ithird_party/mbedtls/include"
echo "=== daemon sources (SDK) ==="
for f in log cfg jsonlite b64 sfo tmdb_crypto tmdb updater updater_util tls ws detect discord daemon compat clock lock timesync art health manifest main; do
for f in log cfg jsonlite b64 sfo tmdb_crypto tmdb updater updater_http updater_util tls ws detect discord daemon compat lock timesync art health manifest main; do
# clock has no .c (header-only helper lives in compat.c); skip if missing
[ -f "orbisrpc/$f.c" ] || continue
"$CC" $CFLAGS -c -o "$OUT/$f.o" "orbisrpc/$f.c" || { echo "FAIL: $f"; exit 1; }