In KDE 3 there are two different smb ioslaves, one written by me which uses smbclient (kdebase/kioslave/smbro) and another one using libsmbclient from Samba 2.2.2 or later.

To be able to write data with my ioslave (which wraps smbclient) a very small change has to be made to the smbclient sources. You can do this by either editing the source directly (really very simple, only one line) or by applying a patch.

On the rest of this page you can find a short explanation how this is done and you can download the patches.

Have fun
Alexander Neundorf



Editing the source by hand

  1. enter the directory /usr/src/samba-2.2.2/source/lib/ (if your samba sources are located there, otherwise replace the path until /usr/src/samba-2.2.2 with the actual path)
  2. open the file util.c with your favourite text exitor
  3. search for file_exist, this will take you to the function BOOL file_exist(..);
  4. replace the line
    return (S_ISREG(sbuf->st_mode));
    with
    return ((S_ISREG(sbuf->st_mode)) || (S_ISFIFO(sbuf->st_mode)));
  5. enter make in /usr/src/samba-2.2.2/source and install the new smbclient binary
  6. Congratulation, you did it :-)

Applying a patch

  1. download the patch for your samba version
  2. enter the parent directory, where your samba source are installed, e.g. if the are located in /usr/src/samba-2.2.2, enter the directory /usr/src
  3. execute "patch -p0 < smbclient-2.x.x-patch"
  4. enter make in /usr/src/samba-2.2.2/source and install the new smbclient binary
  5. Congratulation, you did it :-)

Download patches

smbclient-2.0.7-patch for Samba 2.0.7

smbclient-2.2.0-patch for Samba 2.2.0

smbclient-2.2.3a-patch for Samba 2.2.3a