Compare commits

..

1 Commits

Author SHA1 Message Date
Liyi Meng 9a5ecc094b chansrv: Reconnect ibus when the cached connection has gone stale
build and test / max features with clang and AddressSanitized (push) Failing after 11s
build and test / max features with clang and UndefinedBehaviorSanitized (push) Failing after 6s
build and test / max features with clang for 32-bit arch (legacy OS) (push) Failing after 6s
build and test / min features with clang (push) Failing after 7s
build and test / max features with clang (push) Failing after 6s
build and test / max features with g++ for 32-bit arch (legacy OS) (push) Failing after 6s
build and test / max features with g++ (push) Failing after 6s
build and test / min features with g++ (push) Failing after 6s
build and test / max features with gcc and DEBUG (push) Failing after 6s
build and test / max features with gcc for 32-bit arch (legacy OS) (push) Failing after 6s
build and test / min features with gcc (push) Failing after 5s
build and test / max features with gcc (push) Failing after 5s
build and test / cppcheck (push) Failing after 15m29s
build and test / FreeBSD 14.4 Build with base openssl (push) Has been cancelled
build and test / FreeBSD 14.4 Build with libressl (push) Has been cancelled
build and test / FreeBSD 15.0 Build with base openssl (push) Has been cancelled
build and test / FreeBSD 15.0 Build with libressl (push) Has been cancelled
build and test / code formatting check (push) Has been cancelled
Fixes #3230. The static `bus` global was only ever checked for
non-NULL, not for whether the underlying connection was still alive.
If ibus disconnected (daemon restart, stale socket) or the initial
connect attempt failed, `bus` was left set to a dead/freed connection,
so every later call to xrdp_input_unicode_init() took the "already
initialized" fast path and operated on it.

- Null out bus/g_engine in the "disconnected" signal handler instead
  of leaving them dangling after g_object_unref().
- Check ibus_bus_is_connected() before trusting a cached bus, and
  tear down + reconnect if it's stale.
- Unref and clear bus on a failed connect attempt instead of leaving
  it set.
- Guard the unrefs in xrdp_input_unicode_destroy() now that bus/
  g_engine can legitimately already be NULL.
2026-08-16 22:43:54 +00:00
3 changed files with 219 additions and 1112 deletions
-100
View File
@@ -1,100 +0,0 @@
FROM ubuntu:24.04 AS builder
# Pilot build against the xrdp/xorgxrdp "devel" branches (pre-0.11).
# This is NOT the same codebase as Dockerfile (v0.10.x) - devel is ~787
# commits / ~300 files ahead of v0.10.6.1, and xorgxrdp's devel branch has
# moved together with it (137 commits / 81 files ahead of v0.10.5). Track
# them as a pair; don't mix a devel xrdp with a tagged xorgxrdp or vice versa.
#
# Known deltas from the v0.10.x build baked into this file:
# - New hard dep: libxkbfile-dev (unconditional XKB header check)
# - --enable-ibus now also needs libibus-1.0-dev + libglib2.0-dev
# - NVENC support moved into a new helper binary (xrdp-accel-assist) that
# vendors its own NVENC API headers, so the nv-codec-headers clone/symlink
# step from the stable Dockerfile is gone - it's dead weight on devel.
# - --enable-accel is auto-derived from --enable-nvenc in configure.ac, so
# no new configure flag is needed to get xrdp-accel-assist built.
#
# devel is a floating branch, not a tag: Docker layer caching means a
# `docker build` with no cache change will keep reusing an old clone.
# Always pass --no-cache (or otherwise bust the git-clone layers) to actually
# pick up new commits on each pilot run.
#
# Usage:
# docker build --no-cache -f Dockerfile.devel -t xrdp-builder:devel .
# docker run --rm -v $(pwd)/packages:/output xrdp-builder:devel
# Get build and target platform info
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
# Build arguments for versions - devel branches by default for this pilot
ARG XRDP_VERSION=devel
ARG XORGXRDP_VERSION=devel
ARG PW_MODULE_XRDP_VERSION=devel
# Prevent interactive prompts during build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install -y \
git \
autoconf \
automake \
libtool \
pkg-config \
gcc \
g++ \
make \
libssl-dev \
libpam0g-dev \
libx11-dev \
libxfixes-dev \
libxrandr-dev \
libxkbfile-dev \
nasm \
xsltproc \
flex \
bison \
libxml2-dev \
dpkg-dev \
libcap-dev \
libfuse3-dev \
libpixman-1-dev \
intltool \
xserver-xorg-dev \
xserver-xorg-core \
libconfig-dev \
libjpeg-dev \
wget \
libturbojpeg-dev \
libx264-dev \
libpulse-dev \
libopus-dev \
libibus-1.0-dev \
libglib2.0-dev \
ca-certificates \
libepoxy-dev \
libasound2-dev \
libdrm-dev \
libglvnd-dev \
libgbm-dev \
pipewire \
libpipewire-0.3-dev \
libspa-0.2-dev \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
nano \
xvfb \
xdotool \
ibus \
dbus-x11 \
openbox \
&& rm -rf /var/lib/apt/lists/*
# Match the workspaceFolder set in devcontainer.json
WORKDIR /workspace
CMD [ "tail", "-f", "/dev/null" ]
-29
View File
@@ -1,29 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"name": "XRDP",
"build": { "dockerfile": "Dockerfile" },
"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"remoteUser": "root",
"mounts": [
{
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.claude",
"target": "/root/.claude",
"type": "bind",
"consistency": "cached"
},
{
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig",
"target": "/root/.gitconfig",
"type": "bind",
"consistency": "cached"
},
{
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.git-credentials",
"target": "/root/.git-credentials",
"type": "bind",
"consistency": "cached"
}
]
}
File diff suppressed because it is too large Load Diff