f31522130f
Build system (5 gaps hardened): - COOKBOOK_OFFLINE defaults to true (fork-mode) - normalize_patch handles diff -ruN format - New 'repo validate-patches' command (25/25 relibc patches) - 14 patched Qt/Wayland/display recipes added to protected list - relibc archive regenerated with current patch chain Boot fixes (fixable): - Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset) - D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped) - redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped) - daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch) - udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async) - relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs - greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait) - greeter-ui: built and linked (header guard unification, sem_compat stubs removed) - mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps - greeter config: removed stale keymapd dependency from display/greeter services - prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified Unfixable (diagnosed, upstream): - i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort - kded6/greeter-ui: page fault 0x8 — Qt library null deref - Thread panics fd != -1 — Rust std library on Redox - DHCP timeout / eth0 MAC — QEMU user-mode networking - hwrngd/thermald — no hardware RNG/thermal in VM - live preload allocation — BIOS memory fragmentation, continues on demand
112 lines
2.3 KiB
C
112 lines
2.3 KiB
C
/*
|
|
* Copyright 2015 Ralf Habacker
|
|
* Copyright 2015-2020 Collabora Ltd.
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Simple manual paths check
|
|
*
|
|
* syntax: manual-paths
|
|
*
|
|
*/
|
|
|
|
#include "config.h"
|
|
#include "dbus/dbus-list.h"
|
|
#include "dbus/dbus-internals.h"
|
|
#include "dbus/dbus-sysdeps.h"
|
|
#include "test-utils.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
static dbus_bool_t
|
|
print_install_root (void)
|
|
{
|
|
DBusString runtime_prefix;
|
|
|
|
if (!_dbus_string_init (&runtime_prefix))
|
|
{
|
|
_dbus_test_fatal ("out of memory");
|
|
return FALSE;
|
|
}
|
|
|
|
if (!_dbus_get_install_root (&runtime_prefix))
|
|
{
|
|
_dbus_test_fatal ("out of memory");
|
|
_dbus_string_free (&runtime_prefix);
|
|
return FALSE;
|
|
}
|
|
|
|
if (_dbus_string_get_length (&runtime_prefix) == 0)
|
|
{
|
|
fprintf (stderr, "_dbus_get_install_root() failed\n");
|
|
_dbus_string_free (&runtime_prefix);
|
|
return FALSE;
|
|
}
|
|
|
|
fprintf (stdout, "_dbus_get_install_root() returned '%s'\n",
|
|
_dbus_string_get_const_data (&runtime_prefix));
|
|
_dbus_string_free (&runtime_prefix);
|
|
return TRUE;
|
|
}
|
|
|
|
static dbus_bool_t
|
|
print_service_dirs (void)
|
|
{
|
|
DBusList *dirs;
|
|
DBusList *link;
|
|
dirs = NULL;
|
|
|
|
if (!_dbus_get_standard_session_servicedirs (&dirs))
|
|
_dbus_test_fatal ("couldn't get standard dirs");
|
|
|
|
while ((link = _dbus_list_pop_first_link (&dirs)))
|
|
{
|
|
printf ("default service dir: %s\n", (char *)link->data);
|
|
dbus_free (link->data);
|
|
_dbus_list_free_link (link);
|
|
}
|
|
dbus_free (dirs);
|
|
return TRUE;
|
|
}
|
|
|
|
static dbus_bool_t print_replace_install_prefix(const char *s)
|
|
{
|
|
DBusString str;
|
|
|
|
if (!_dbus_string_init (&str))
|
|
{
|
|
_dbus_test_fatal ("out of memory");
|
|
return FALSE;
|
|
}
|
|
|
|
if (!_dbus_string_append (&str, s) ||
|
|
!_dbus_replace_install_prefix (&str))
|
|
{
|
|
_dbus_test_fatal ("out of memory");
|
|
_dbus_string_free (&str);
|
|
return FALSE;
|
|
}
|
|
|
|
fprintf(stdout, "replaced '%s' by '%s'\n", s,
|
|
_dbus_string_get_const_data (&str));
|
|
_dbus_string_free (&str);
|
|
return TRUE;
|
|
}
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
if (!print_install_root())
|
|
return -1;
|
|
|
|
if (!print_service_dirs())
|
|
return -2;
|
|
|
|
if (!print_replace_install_prefix(DBUS_BINDIR "/dbus-daemon"))
|
|
return -3;
|
|
|
|
if (!print_replace_install_prefix("c:\\Windows\\System32\\testfile"))
|
|
return -4;
|
|
|
|
return 0;
|
|
}
|