🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Jesse Rehmer Sun, 25 Oct 2026 00:39
Diablo 6-CUR-20261024-BWH released - portability updates and bug fixes
#5
Author: Jesse Rehmer
Date: Sun, 25 Oct 2026 00:39
159 lines
7619 bytes
I've published an updated version of Diablo 6, based on the original
6-CUR-20170901-00 source with numerous portability improvements and bug fixes.
Yes, AI is at the wheel, I am not a developer.

The original build system, based on Matt Dillon's xmake, has been replaced
with GNU Make and BSD Make implementations. The new build system supports
parallel compilation, automatic dependency tracking, incremental builds, and
portable installation.

Builds have been tested on current releases of FreeBSD, SmartOS, OmniOS, and
Linux. Compiler warnings have been eliminated on FreeBSD (Clang),
SmartOS/OmniOS (GCC), and Linux (GCC).

Beyond the build-system work, quite a few issues were uncovered in the
original source code.

**Portability and compiler fixes**

- Updated legacy C declarations, function prototypes, socket argument types,
and header handling for modern GCC and Clang.
- Improved compatibility with modern illumos systems, including native
strsep(), file-descriptor passing, and platform-specific libraries.
- Added automatic Berkeley DB 1.85 compatibility detection on illumos, along
with the necessary Linux linking support.
- Updated deprecated OpenSSL SHA-256 interfaces to use EVP.
- Replaced deprecated Linux signal-handling calls with sigprocmask(),
preserving the previous signal mask.
- Corrected numerous buffer-size calculations, unsafe string operations,
pointer-size assumptions, and compiler diagnostics.
- Improved error handling for oversized paths, filenames, DNS responses, and
authentication identities.

**Original source bugs corrected**

Several changes address actual runtime defects rather than simply compiler
warnings.

1. Stale host authorization cache

Removing the final incoming feed/host entry from dnewsfeeds exposed a
long-standing issue with dhosts.cache.

Diablo would correctly regenerate an empty host cache, but the original code
refused to replace an existing cache with a zero-byte file.

Consequently, the deleted feed authorization remained cached indefinitely.
Incoming connections could receive a misleading "label missing in dnewsfeeds"
configuration error rather than the expected transfer-permission denial.

The cache rebuild logic now accepts a valid empty cache and safely replaces
the previous contents. This was reproduced and verified during runtime
testing.

2. General logging could crash incoming connections

Enabling path_generallog uncovered two related problems.

When started as root, Diablo could create general.log owned by root,
subsequently dropping privileges to the news account. Connection-handling
children were then unable to append to the file.

More seriously, the error handler for a failed log open called the general
logging function itself, recursively attempting to open the same inaccessible
file until the process crashed with SIGSEGV.

The master now adjusts ownership of the root-created general log before
dropping privileges, and log-open failures are reported directly through
syslog rather than recursively invoking the general logger.

Both problems were reproduced on SmartOS and the combined fix was verified.

3. Incorrect dicmd configuration responses

The "dicmd config" command could report success when an unsupported runtime
configuration option was supplied, even though the setting had not changed.

The command now checks the configuration error status before reporting
success.

Runtime-configurable settings continue to work, while startup-only path_
directives are correctly rejected.

4. Missing version directives in sample configurations

The sample feeder and reader diablo.config files lacked the required "version
2.0" directive.

As a result, configuration directives could be silently ignored. This was
discovered while testing path_dumphist.

Both sample configurations have been corrected.

5. Authentication and DNS handling

Corrected several cases involving hostname truncation, oversized authenticated
usernames, and connection accounting.

In particular, 63-character ignored AUTHINFO usernames are now handled without
truncation or identity collisions, while preserving existing IPC structure
sizes.

Additional validation was added for socket control messages used in
file-descriptor passing.

6. History and overview utilities

Replaced unsafe tmpnam()-based temporary-file handling with mkstemp() in
overview rewriting.

Corrected compressed overview buffer handling, filename construction, and
various bounds checks.

The old dhisctl -a bulk-history scanner was found to be incomplete and unsafe;
that option now explicitly reports unsupported rather than attempting to
execute the broken implementation.

7. Other corrections

Additional fixes include a format-string vulnerability in drequeue, incorrect
memory-context clearing, zlib buffer handling, feeder streaming configuration
propagation, and numerous potential buffer overruns or silent truncations.

**Runtime testing**

In addition to successful native builds, the following tests have been
completed:

- Incoming peer configuration and host authorization.
- Incoming NNTP article transfers from a remote server.
- History database and article spool creation.
- Article and history expiration using dexpire.
- Outgoing feed configuration and article delivery.
- Removal of the last authorized incoming peer and host-cache regeneration.
- Runtime configuration error reporting.
- General-log ownership and connection handling.

These tests establish basic feeder functionality, although reader
functionality and production-scale regression testing remain ongoing.

**Release information**

Version: 6-CUR-20261024-BWH

https://github.com/jrehmer/diablo-nntp/releases/tag/6-CUR-20261024-BWH

The release includes README.md with platform-specific build instructions and a
detailed change history, along with CHANGELOG.md.

The intention is to preserve Diablo's existing NNTP protocol, history/spool
formats, and overall architecture while making it easier to build and maintain
on current Unix-like systems.

Feedback and additional testing, particularly on other FreeBSD, illumos, and
Linux configurations, would be appreciated. I especially need assistance
testing reader functionality.

Cheers,

Jesse Rehmer
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads