fix: macOS and Windows test/lint failures; repo.dixon.cx packaging for nexusterminal

CI hadn't run on macOS or Windows for a while (billing); once it did:
- Windows: the RDP shared-drive code and its symlink test are Unix-only
  but were compiled there (and the unused pieces failed clippy). The drive
  type, its impls, imports and test are now cfg(unix); refusing a drive
  request is a free function used everywhere. Other Windows-only warnings
  fixed (serial test import, unused mut, harden_process).
- macOS: the local shell's directory was sampled on the first output
  after Enter, which is the shell echoing the command before a cd runs,
  so restored tabs opened one directory behind. It's now sampled shortly
  after Enter and again once the command has had time to finish.
- packaging/repo.sh publishes the 'nexusterminal' .deb/.rpm/Arch packages
  to repo.dixon.cx from the release's own Linux binaries, verified
  against SHA256SUMS.
- The desktop entry mentions RDP.
This commit is contained in:
Andy Dixon
2026-10-13 11:36:45 +01:00
parent 9805681c2c
commit 73c1f77ca3
7 changed files with 291 additions and 40 deletions
+8 -9
View File
@@ -175,15 +175,14 @@ fn init_logging(data_dir: &std::path::Path) {
/// files, and on Linux the process is non-dumpable (also blocks ptrace attach by other processes
/// of the same user). Debug builds skip this so they can still be debugged.
fn harden_process() {
if cfg!(debug_assertions) {
return;
}
#[cfg(unix)]
// SAFETY: plain syscalls on this process with valid arguments; failure is harmless.
unsafe {
let none = libc::rlimit { rlim_cur: 0, rlim_max: 0 };
libc::setrlimit(libc::RLIMIT_CORE, &none);
#[cfg(target_os = "linux")]
libc::prctl(libc::PR_SET_DUMPABLE, 0, 0, 0, 0);
if !cfg!(debug_assertions) {
// SAFETY: plain syscalls on this process with valid arguments; failure is harmless.
unsafe {
let none = libc::rlimit { rlim_cur: 0, rlim_max: 0 };
libc::setrlimit(libc::RLIMIT_CORE, &none);
#[cfg(target_os = "linux")]
libc::prctl(libc::PR_SET_DUMPABLE, 0, 0, 0, 0);
}
}
}