Skip to content

Instantly share code, notes, and snippets.

View frobware's full-sized avatar

Andy McDermott frobware

  • Red Hat
  • UK
  • 19:56 (UTC +01:00)
View GitHub Profile
@frobware
frobware / faccessat-trailing-slash-probe.c
Created August 30, 2026 20:02
Standalone C probe: macOS 15.7.x kernel drops POSIX trailing-slash ENOTDIR for symlinks to regular files (PASS/FAIL, self-contained fixture; cc -o probe probe.c && ./probe)
/* faccessat-trailing-slash-probe.c
*
* POSIX pathname resolution requires a path with a trailing slash
* to resolve only to a directory: syscalls on
* "symlink-to-regular-file/" must fail with ENOTDIR.
*
* macOS 15.7.9 (xnu-11417.140.69.711.44) violates this at the
* kernel's pathname-resolution layer for the symlink case only: a
* plain "regular-file/" still fails correctly, but
* "symlink-to-regular-file/" resolves as if the slash were absent
@frobware
frobware / file-name-completion-dirp.patch
Created August 30, 2026 19:58
macOS 15.7.x kernel drops POSIX trailing-slash ENOTDIR for symlinks to regular files; breaks Emacs file-name completion (patch + shell reproducer)
Replace the faccessat-with-trailing-slash directory probe in
file_name_completion_dirp with an explicit fstatat + S_ISDIR check.
POSIX says a path ending in "/" must resolve only to a directory;
access(2)-family calls on "symlink-to-regular-file/" must fail with
ENOTDIR. macOS 15.7.9 (xnu-11417.140.69.711.44, kernel built
2026-07-21) violates this at the pathname-resolution layer: for a
symlink whose target is a regular file, faccessat(fd, "link/",
F_OK, AT_EACCESS) returns 0 and even stat("link/") succeeds. A
plain regular file ("file/", no symlink) still fails with ENOTDIR;
import CommonCrypto
import CSSH2
import Foundation
/// Raw libssh2 operations with no orchestration logic.
///
/// Each method performs a single discrete step (TCP connect,
/// handshake, authenticate, open channel). The TransportDriver
/// calls these in the order dictated by the state machine.
public final class SSHConnection: @unchecked Sendable {

❯ And how did I advertise the local LAN?

● Let me check the NixOS configuration for tailgate01.

● Searched for 2 patterns, read 1 file (ctrl+o to expand)

● The route is advertised via the services.tailscale-gateway NixOS module at line 50-56. Let me find the module to show you the details.

● Searched for 1 pattern, read 1 file (ctrl+o to expand)

@frobware
frobware / issue.md
Last active March 18, 2026 17:33
konflux

Konflux bundle coordination problem

Background

The openshift/bpfman-operator repository builds three container images from the same codebase via Konflux:

  • bpfman-operator (the operator binary)
  • bpfman-agent (the agent DaemonSet binary)
  • bpfman-operator-bundle (the OLM bundle)
@frobware
frobware / bpfman-cli-walkthrough.md
Created February 11, 2026 14:39
bpfman CLI walkthrough -- real output from every program type and output format

bpfman CLI Walkthrough

Real output from running bpfman against a live kernel, demonstrating every supported program type and output format. Each section follows the full lifecycle: load, attach, list, detach, unload.

Table of Contents

@frobware
frobware / bpfman-help.md
Last active February 11, 2026 13:07
bpfman: complete CLI help reference
@frobware
frobware / tmux.conf
Last active January 7, 2026 15:13
tmux.conf
# On macOS Sequoia 15.2, the Nix-generated default-command uses
# reattach-to-user-namespace, which causes the shell to default to
# bash even though $SHELL is set to /bin/zsh. Override these to ensure
# the correct shell is used. I don't know why or when this behaviour
# changed.
set-option -g default-shell "$SHELL"
set-option -g default-command "$SHELL"
# Unbind all key bindings in the 'copy-mode-vi' table to use Emacs key bindings throughout.
unbind-key -a -T copy-mode-vi
@frobware
frobware / tpm2-ssh-keys.md
Last active January 2, 2026 12:23
TPM2-backed SSH Keys on NixOS with tpm2-pkcs11

TPM2-backed SSH Keys on NixOS

This describes how I set up TPM2 hardware-backed SSH keys using tpm2-pkcs11 on NixOS. Keys are generated inside the TPM and cannot be extracted, providing hardware-bound authentication.

Overview

  • Uses the kernel resource manager (/dev/tpmrm0) directly—no tpm2-abrmd daemon needed
  • Uses the esysdb backend instead of FAPI for simpler configuration
  • Integrates with pass for PIN storage (non-interactive operation)
  • Provides helper scripts for key management
@frobware
frobware / rebrand.patch
Created October 2, 2025 11:01
rebranding
diff --git a/bundle/manifests/bpfman-operator.clusterserviceversion.yaml b/bundle/manifests/bpfman-operator.clusterserviceversion.yaml
index 7120fc07..287d2b44 100644
--- a/bundle/manifests/bpfman-operator.clusterserviceversion.yaml
+++ b/bundle/manifests/bpfman-operator.clusterserviceversion.yaml
@@ -993,19 +993,21 @@ metadata:
]
capabilities: Basic Install
categories: OpenShift Optional
- containerImage: quay.io/bpfman/bpfman-operator:latest
- createdAt: "2025-06-03T12:16:50Z"