add susmb page (markdown) - www.codemadness.org - www.codemadness.org saait content files
HTML git clone git://git.codemadness.org/www.codemadness.org
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 493014aa0e36785a33eac7e2056a3f7f1583cf32
DIR parent 9b2a439ea8b020383160bc4fd7d7bdc7a511583f
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 6 Mar 2026 13:07:18 +0100
add susmb page (markdown)
Diffstat:
A output/susmb.html | 149 +++++++++++++++++++++++++++++++
A output/susmb.md | 121 +++++++++++++++++++++++++++++++
A pages/susmb.cfg | 6 ++++++
A pages/susmb.md | 121 +++++++++++++++++++++++++++++++
4 files changed, 397 insertions(+), 0 deletions(-)
---
DIR diff --git a/output/susmb.html b/output/susmb.html
@@ -0,0 +1,149 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <meta name="viewport" content="width=device-width" />
+ <meta name="keywords" content="susmb, Samba, FUSE, OpenBSD, usmb fork" />
+ <meta name="description" content="susmb: unprivileged mounting of SMB/CIFS shares via FUSE" />
+ <meta name="author" content="Hiltjo" />
+ <meta name="generator" content="Static content generated using saait: https://codemadness.org/saait.html" />
+ <title>susmb: unprivileged mounting of SMB/CIFS shares via FUSE - Codemadness</title>
+ <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="print.css" type="text/css" media="print" />
+ <link rel="alternate" href="atom.xml" type="application/atom+xml" title="Codemadness Atom Feed" />
+ <link rel="alternate" href="atom_content.xml" type="application/atom+xml" title="Codemadness Atom Feed with content" />
+ <link rel="icon" href="/favicon.png" type="image/png" />
+</head>
+<body>
+ <nav id="menuwrap">
+ <table id="menu" width="100%" border="0">
+ <tr>
+ <td id="links" align="left">
+ <a href="index.html">Blog</a> |
+ <a href="/git/" title="Git repository with some of my projects">Git</a> |
+ <a href="/releases/">Releases</a> |
+ <a href="gopher://codemadness.org">Gopherhole</a>
+ </td>
+ <td id="links-contact" align="right">
+ <span class="hidden"> | </span>
+ <a href="feeds.html">Feeds</a> |
+ <a href="pgp.asc">PGP</a> |
+ <a href="mailto:hiltjo@AT@codemadness.DOT.org">Mail</a>
+ </td>
+ </tr>
+ </table>
+ </nav>
+ <hr class="hidden" />
+ <main id="mainwrap">
+ <div id="main">
+ <article>
+<header>
+ <h1>susmb: unprivileged mounting of SMB/CIFS shares via FUSE</h1>
+ <p>
+ <strong>Last modification on </strong> <time>2026-03-06</time>
+ </p>
+</header>
+
+<p>usmb is a program to mount SMB shares from userland via FUSE.
+Under-the-hood it uses Samba and exposes the network share as a regular local filesystem.
+Programs can just access the filesystem and for example do not need to add code for SMB support or link against Samba.
+It is more convenient than scripting around smbclient in some cases.<br />
+smbclient(1): <a href="https://www.samba.org/samba/docs/current/man-html/smbclient.1.html">https://www.samba.org/samba/docs/current/man-html/smbclient.1.html</a></p>
+<p>susmb is a fork of usmb from 2013-02-04.
+<a href="http://repo.or.cz/w/usmb.git/snapshot/aa94e132c12faf1a00f547ea4a96b5728612dea6.tar.gz">http://repo.or.cz/w/usmb.git/snapshot/aa94e132c12faf1a00f547ea4a96b5728612dea6.tar.gz</a>
+(git commit aa94e132c12faf1a00f547ea4a96b5728612dea6)</p>
+<p>usmb has been unmaintained since 2013. Sometimes programs are finished and so
+being unmaintained is not so bad. I think the general idea of the code was good
+and it is still a useful program for some systems, probably mostly BSD systems.
+Linux has a SMB/CIFS driver anyway.</p>
+<p>The two main reasons I forked usmb were performance issues with it on OpenBSD
+(because of hardcoded options and assumptions for FUSE for Linux) and issues by
+using it in non-interactive mode.</p>
+<h2>Clone</h2>
+<pre><code>git clone git://git.codemadness.org/susmb
+</code></pre>
+<h2>Browse</h2>
+<p>You can browse the source-code at:</p>
+<ul>
+<li><a href="https://git.codemadness.org/susmb/">https://git.codemadness.org/susmb/</a></li>
+<li><a href="gopher://codemadness.org/1/git/susmb">gopher://codemadness.org/1/git/susmb</a></li>
+</ul>
+<h2>Download releases</h2>
+<p>Releases are available at:</p>
+<ul>
+<li><a href="https://codemadness.org/releases/susmb/">https://codemadness.org/releases/susmb/</a></li>
+<li><a href="gopher://codemadness.org/1/releases/susmb">gopher://codemadness.org/1/releases/susmb</a></li>
+</ul>
+<h2>Build and install</h2>
+<pre><code>$ make
+# make install
+</code></pre>
+<h2>Dependencies</h2>
+<ul>
+<li>C compiler.</li>
+<li>libc + BSD extensions (libbsd on Linux).</li>
+<li>FUSE 2.6 or later (and probably version <3).</li>
+<li>Samba / libsmbclient 4.20+.</li>
+</ul>
+<h2>Usage example</h2>
+<pre><code>susmb \
+ -u hiltjo \
+ -f \
+ -o 'uid=1000,gid=1000,allow_other' \
+ "smb://domain\someuser@192.168.1.1/Storage" \
+ /mnt/share
+</code></pre>
+<h2>Changes</h2>
+<p>susmb has the patches applied from OpenBSD ports 7.6:
+<a href="https://cvsweb.openbsd.org/ports/sysutils/usmb/patches">https://cvsweb.openbsd.org/ports/sysutils/usmb/patches</a></p>
+<p>Below is a summary of the most important changes:</p>
+<h2>Performance</h2>
+<ul>
+<li>Set struct stat st.st_blksiz to a higher number for more efficient buffering
+for programs using the standard FILE* stdio interfaces. Huge improvement for
+reads and writes.<br />
+On OpenBSD the default block size for FUSE is 512 bytes.
+This crippled network performance.<br />
+On OpenBSD there is no FUSE caching layer (at time of writing 2025-09-07), so
+each read call had more overhead.</li>
+<li>Remove the hardcoded FUSE mount option max_read=N.<br />
+This crippled network performance.</li>
+</ul>
+<h2>Security</h2>
+<ul>
+<li>Many code simplifications and deletions (reducing attack surface and makes it
+easier to review).</li>
+<li>Use unveil(2) syscall to lock down much of the filesystem except the
+mountpoint and required FUSE devices.</li>
+<li>Optional privilege dropping support: on OpenBSD FUSE would need to run as root:
+(sysctl kern.usermount was removed around July 2016, around
+commit 65c8a8a0394483b41de8f02c862e65fb529cf538).<br />
+After mounting the filesystem and acquiring access to the FUSE driver
+privileges are dropped. This is not perfect, but at least now the Samba smbclient
+code runs as a user again.</li>
+<li>Reading the password from the terminal in a secure way using readpassphrase(3).</li>
+</ul>
+<h2>Cleanups</h2>
+<ul>
+<li>Merge everything into one C file for easier code review.</li>
+<li>Remove Samba < 3.3 compatibility layer and code. This is hard to test
+nowadays anyway.</li>
+<li>Use getopt for option parsing: remove dependencies on glib which was used for
+option parsing only.</li>
+<li>Remove long option support.</li>
+<li>Remove libxml2 dependency and configuration via XML. Configuration is now
+done via a simpler syntax as a URI from the command-line. This was also
+listed in the man page under the BUGS section as a wanted feature.</li>
+<li>Remove autoconf and Debian-specific packaging files. Use a simple Makefile.</li>
+<li>Man page rewritten from roff to mandoc.</li>
+</ul>
+<h2>OpenBSD port added as sysutils/susmb</h2>
+<p>An OpenBSD port was added to sysutils/susmb (thanks to Pascal Stumpf!).</p>
+<p>Mailinglist thread: <a href="https://marc.info/?l=openbsd-ports&m=177169411929407&w=2">https://marc.info/?l=openbsd-ports&m=177169411929407&w=2</a></p>
+
+ </article>
+ </div>
+ </main>
+</body>
+</html>
DIR diff --git a/output/susmb.md b/output/susmb.md
@@ -0,0 +1,121 @@
+usmb is a program to mount SMB shares from userland via FUSE.
+Under-the-hood it uses Samba and exposes the network share as a regular local filesystem.
+Programs can just access the filesystem and for example do not need to add code for SMB support or link against Samba.
+It is more convenient than scripting around smbclient in some cases.
+smbclient(1): <https://www.samba.org/samba/docs/current/man-html/smbclient.1.html>
+
+susmb is a fork of usmb from 2013-02-04.
+<http://repo.or.cz/w/usmb.git/snapshot/aa94e132c12faf1a00f547ea4a96b5728612dea6.tar.gz>
+(git commit aa94e132c12faf1a00f547ea4a96b5728612dea6)
+
+usmb has been unmaintained since 2013. Sometimes programs are finished and so
+being unmaintained is not so bad. I think the general idea of the code was good
+and it is still a useful program for some systems, probably mostly BSD systems.
+Linux has a SMB/CIFS driver anyway.
+
+The two main reasons I forked usmb were performance issues with it on OpenBSD
+(because of hardcoded options and assumptions for FUSE for Linux) and issues by
+using it in non-interactive mode.
+
+
+## Clone
+
+ git clone git://git.codemadness.org/susmb
+
+
+## Browse
+
+You can browse the source-code at:
+
+* <https://git.codemadness.org/susmb/>
+* <gopher://codemadness.org/1/git/susmb>
+
+
+## Download releases
+
+Releases are available at:
+
+* <https://codemadness.org/releases/susmb/>
+* <gopher://codemadness.org/1/releases/susmb>
+
+
+## Build and install
+
+ $ make
+ # make install
+
+
+## Dependencies
+
+* C compiler.
+* libc + BSD extensions (libbsd on Linux).
+* FUSE 2.6 or later (and probably version <3).
+* Samba / libsmbclient 4.20+.
+
+
+## Usage example
+
+ susmb \
+ -u hiltjo \
+ -f \
+ -o 'uid=1000,gid=1000,allow_other' \
+ "smb://domain\someuser@192.168.1.1/Storage" \
+ /mnt/share
+
+
+## Changes
+
+susmb has the patches applied from OpenBSD ports 7.6:
+<https://cvsweb.openbsd.org/ports/sysutils/usmb/patches>
+
+Below is a summary of the most important changes:
+
+
+## Performance
+
+* Set struct stat st.st_blksiz to a higher number for more efficient buffering
+ for programs using the standard FILE* stdio interfaces. Huge improvement for
+ reads and writes.
+ On OpenBSD the default block size for FUSE is 512 bytes.
+ This crippled network performance.
+ On OpenBSD there is no FUSE caching layer (at time of writing 2025-09-07), so
+ each read call had more overhead.
+* Remove the hardcoded FUSE mount option max_read=N.
+ This crippled network performance.
+
+
+## Security
+
+* Many code simplifications and deletions (reducing attack surface and makes it
+ easier to review).
+* Use unveil(2) syscall to lock down much of the filesystem except the
+ mountpoint and required FUSE devices.
+* Optional privilege dropping support: on OpenBSD FUSE would need to run as root:
+ (sysctl kern.usermount was removed around July 2016, around
+ commit 65c8a8a0394483b41de8f02c862e65fb529cf538).
+ After mounting the filesystem and acquiring access to the FUSE driver
+ privileges are dropped. This is not perfect, but at least now the Samba smbclient
+ code runs as a user again.
+* Reading the password from the terminal in a secure way using readpassphrase(3).
+
+
+## Cleanups
+
+* Merge everything into one C file for easier code review.
+* Remove Samba < 3.3 compatibility layer and code. This is hard to test
+ nowadays anyway.
+* Use getopt for option parsing: remove dependencies on glib which was used for
+ option parsing only.
+* Remove long option support.
+* Remove libxml2 dependency and configuration via XML. Configuration is now
+ done via a simpler syntax as a URI from the command-line. This was also
+ listed in the man page under the BUGS section as a wanted feature.
+* Remove autoconf and Debian-specific packaging files. Use a simple Makefile.
+* Man page rewritten from roff to mandoc.
+
+
+## OpenBSD port added as sysutils/susmb
+
+An OpenBSD port was added to sysutils/susmb (thanks to Pascal Stumpf!).
+
+Mailinglist thread: <https://marc.info/?l=openbsd-ports&m=177169411929407&w=2>
DIR diff --git a/pages/susmb.cfg b/pages/susmb.cfg
@@ -0,0 +1,6 @@
+title = susmb: unprivileged mounting of SMB/CIFS shares via FUSE
+id = susmb
+description = susmb: unprivileged mounting of SMB/CIFS shares via FUSE
+keywords = susmb, Samba, FUSE, OpenBSD, usmb fork
+created = 2026-03-06
+updated = 2026-03-06
DIR diff --git a/pages/susmb.md b/pages/susmb.md
@@ -0,0 +1,121 @@
+usmb is a program to mount SMB shares from userland via FUSE.
+Under-the-hood it uses Samba and exposes the network share as a regular local filesystem.
+Programs can just access the filesystem and for example do not need to add code for SMB support or link against Samba.
+It is more convenient than scripting around smbclient in some cases.
+smbclient(1): <https://www.samba.org/samba/docs/current/man-html/smbclient.1.html>
+
+susmb is a fork of usmb from 2013-02-04.
+<http://repo.or.cz/w/usmb.git/snapshot/aa94e132c12faf1a00f547ea4a96b5728612dea6.tar.gz>
+(git commit aa94e132c12faf1a00f547ea4a96b5728612dea6)
+
+usmb has been unmaintained since 2013. Sometimes programs are finished and so
+being unmaintained is not so bad. I think the general idea of the code was good
+and it is still a useful program for some systems, probably mostly BSD systems.
+Linux has a SMB/CIFS driver anyway.
+
+The two main reasons I forked usmb were performance issues with it on OpenBSD
+(because of hardcoded options and assumptions for FUSE for Linux) and issues by
+using it in non-interactive mode.
+
+
+## Clone
+
+ git clone git://git.codemadness.org/susmb
+
+
+## Browse
+
+You can browse the source-code at:
+
+* <https://git.codemadness.org/susmb/>
+* <gopher://codemadness.org/1/git/susmb>
+
+
+## Download releases
+
+Releases are available at:
+
+* <https://codemadness.org/releases/susmb/>
+* <gopher://codemadness.org/1/releases/susmb>
+
+
+## Build and install
+
+ $ make
+ # make install
+
+
+## Dependencies
+
+* C compiler.
+* libc + BSD extensions (libbsd on Linux).
+* FUSE 2.6 or later (and probably version <3).
+* Samba / libsmbclient 4.20+.
+
+
+## Usage example
+
+ susmb \
+ -u hiltjo \
+ -f \
+ -o 'uid=1000,gid=1000,allow_other' \
+ "smb://domain\someuser@192.168.1.1/Storage" \
+ /mnt/share
+
+
+## Changes
+
+susmb has the patches applied from OpenBSD ports 7.6:
+<https://cvsweb.openbsd.org/ports/sysutils/usmb/patches>
+
+Below is a summary of the most important changes:
+
+
+## Performance
+
+* Set struct stat st.st_blksiz to a higher number for more efficient buffering
+ for programs using the standard FILE* stdio interfaces. Huge improvement for
+ reads and writes.
+ On OpenBSD the default block size for FUSE is 512 bytes.
+ This crippled network performance.
+ On OpenBSD there is no FUSE caching layer (at time of writing 2025-09-07), so
+ each read call had more overhead.
+* Remove the hardcoded FUSE mount option max_read=N.
+ This crippled network performance.
+
+
+## Security
+
+* Many code simplifications and deletions (reducing attack surface and makes it
+ easier to review).
+* Use unveil(2) syscall to lock down much of the filesystem except the
+ mountpoint and required FUSE devices.
+* Optional privilege dropping support: on OpenBSD FUSE would need to run as root:
+ (sysctl kern.usermount was removed around July 2016, around
+ commit 65c8a8a0394483b41de8f02c862e65fb529cf538).
+ After mounting the filesystem and acquiring access to the FUSE driver
+ privileges are dropped. This is not perfect, but at least now the Samba smbclient
+ code runs as a user again.
+* Reading the password from the terminal in a secure way using readpassphrase(3).
+
+
+## Cleanups
+
+* Merge everything into one C file for easier code review.
+* Remove Samba < 3.3 compatibility layer and code. This is hard to test
+ nowadays anyway.
+* Use getopt for option parsing: remove dependencies on glib which was used for
+ option parsing only.
+* Remove long option support.
+* Remove libxml2 dependency and configuration via XML. Configuration is now
+ done via a simpler syntax as a URI from the command-line. This was also
+ listed in the man page under the BUGS section as a wanted feature.
+* Remove autoconf and Debian-specific packaging files. Use a simple Makefile.
+* Man page rewritten from roff to mandoc.
+
+
+## OpenBSD port added as sysutils/susmb
+
+An OpenBSD port was added to sysutils/susmb (thanks to Pascal Stumpf!).
+
+Mailinglist thread: <https://marc.info/?l=openbsd-ports&m=177169411929407&w=2>