susmb

mounting of SMB/CIFS shares via FUSE
git clone git://git.codemadness.org/susmb
Log | Files | Refs | README | LICENSE

commit 5850de552b8d27e79371e56f6ffb52142ca54717
parent d1b4281f1bd5c710b3346bb823fbc71f083693dc
Author: Geoff Johnstone <geoffSHEEP.johnstoneFROG@googlemail.com>
Date:   Fri, 30 May 2008 18:49:14 +0100

Put XML declaration in the example configuration file.
Removed doc directory.

Diffstat:
MREADME | 2+-
Ddoc/README | 104-------------------------------------------------------------------------------
Ddoc/usmb.conf | 55-------------------------------------------------------
Ausmb.conf | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 60 insertions(+), 160 deletions(-)

diff --git a/README b/README @@ -63,7 +63,7 @@ Configuration ------------- You need an XML configuration file - ${HOME}/.usmb.conf by default. There's an -example in doc/usmb.conf. +example in usmb.conf. There are two main elements: credentials and mounts. diff --git a/doc/README b/doc/README @@ -1,104 +0,0 @@ -usmb - Unprivileged mounting of SMB/CIFS shares via FUSE -======================================================== - -Acknowledgement ---------------- - -Jonathan Schultz (Email firstname at imatix.com) provided a patch -to fix the display of file modification times. - - -Introduction ------------- - -usmb lets you mount SMB/CIFS shares via FUSE, in the vein of the Map Network -Drive functionality in Windows. - -The two existing FUSE filesystems that I know of (SMB for FUSE and fusesmb) -mimic Windows' Network Neighbourhood by letting you browse hosts and shares. -This means that you must run a NetBIOS name server and can't see hosts that -aren't advertised via NetBIOS. - -You can build [u]mount.cifs in the Samba distribution and install them -setuid root, but that has its own set of security implications. In any -case there's no need for network filesystem code to be in the kernel: -bugs could lead to remotely exploitable kernel vulnerabilities. Running -the SMB client code in user space as an unprivileged user limits the -potential damage due to bugs. - -A user space implementation will be slower than a kernel filesystem since -the data must be copied in and out of the fuse process' context as well as -in/out of the user process' context. Mitigating factors are: - -1. Increased security. -2. Containment of bugs. -3. Throughput is more likely to be limited by network bandwidth rather than - local memory copying. -4. The client filesystem code can be upgraded/fixed without kernel changes. - - -Pre-Requisites --------------- - -glib 2.6 or later - www.gtk.org. -libxml2 - ftp.gnome.org. -FUSE 2.6 or later - fuse.sourgeforge.net. -libsmbclient 3.0 (part of Samba) - www.samba.org. - - -Installation ------------- - -Sorry, no autoconf yet. -You need GNU sed. -Edit the Makefile with brain engaged. -Run make. -Run make install (maybe as root). - - -Configuration -------------- - -You need an XML configuration file - ${HOME}/.usmb.conf by default. There's an -example in doc/usmb.conf. - -There are two main elements: credentials and mounts. - -Credentials: - - <credentials id="some_id"> - <domain>mydomain</domain> - <username>username</username> - <password>password</password> - </credentials> - -Each credentials element gives authentication details. You can have multiple -credentials elements; each must have a distinct id attribute. - -A mount element describes an SMB share: - - <mount id="mount_id" credentials="some_id"> - <server>1.2.3.4</server> - <share>sharename</share> - <mountpoint>/tmp/share</mountpoint> - </mount> - -The credentials attribute identifies the id of the credentials element that -provides authentication details for the share. The server, share and -mountpoint should be self-explanatory. The id is given on the usmb command -line to identify the SMB share to mount. - -You can specify multiple mount elements; each must have a distinct id -(though credentials and mount IDs can be the same). - -The whole file is wrapped in a <usmbconfig> element. - - -Usage ------ - -$ usmb [options] mount_ID - -Use usmb --help for a list of options. -Mount IDs are defined in the configuration file. - diff --git a/doc/usmb.conf b/doc/usmb.conf @@ -1,55 +0,0 @@ -<!-- - Example usmb.conf - ================= - - This defines two shares: - - \\192.168.0.5\share on /tmp/smb authenticating as WORKGROUP\user - \\winbox\music on /tmp/music authenticating as mydomain\anotheruser - - These can be mounted using - - usmb home - usmb music - - Mount options are comma-separated. Useful options: - - hard_remove - immediate removal (don't hide files) - umask=M - set file permissions (octal) - uid=N - set file owner - gid=N - set file group - allow_other - allow access to other users - allow_root - allow access to root - nonempty - allow mount over non-empty directory - ---> - -<usmbconfig> - - <credentials id="cred1"> - <domain>WORKGROUP</domain> - <username>user</username> - <password>pass</password> - </credentials> - - <credentials id="cred2"> - <domain>mydomain</domain> - <username>anotheruser</username> - <password>secret</password> - </credentials> - - <mount id="home" credentials="cred1"> - <server>192.168.0.5</server> - <share>myshare</share> - <mountpoint>/tmp/smb</mountpoint> - </mount> - - <mount id="music" credentials="cred2"> - <server>winbox</server> - <share>music</share> - <mountpoint>/tmp/music</mountpoint> - <options>allow_root</options> - </mount> - -</usmbconfig> - diff --git a/usmb.conf b/usmb.conf @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- + Example usmb.conf + ================= + + This defines two shares: + + \\192.168.0.5\share on /tmp/smb authenticating as WORKGROUP\user + \\winbox\music on /tmp/music authenticating as mydomain\anotheruser + + These can be mounted using + + usmb home + usmb music + + Mount options are comma-separated. Useful options: + + hard_remove - immediate removal (don't hide files) + umask=M - set file permissions (octal) + uid=N - set file owner + gid=N - set file group + allow_other - allow access to other users + allow_root - allow access to root + nonempty - allow mount over non-empty directory + +--> + +<usmbconfig> + + <credentials id="cred1"> + <domain>WORKGROUP</domain> + <username>user</username> + <password>pass</password> + </credentials> + + <credentials id="cred2"> + <domain>mydomain</domain> + <username>anotheruser</username> + <!-- No password element => prompt for password at runtime. + <password>secret</password> + --> + </credentials> + + <mount id="home" credentials="cred1"> + <server>192.168.0.5</server> + <share>myshare</share> + <mountpoint>/tmp/smb</mountpoint> + </mount> + + <mount id="music" credentials="cred2"> + <server>winbox</server> + <share>music</share> + <mountpoint>/tmp/music</mountpoint> + <options>allow_root</options> + </mount> + +</usmbconfig> +