libsmb and the cli_ routines and libsmbclient connection handling

Richard Sharpe sharpe at
Thu Jan 25 06:32:32 GMT 2001


I am getting to the point where I need to change the functionality of the
cli_ routines I use from libsmb in libsmbclient.

Currently, there is a one-to-one connection between a share and a server.

That is, if you want to connect to \\server1\share1 then you get one
connection and one cli structure.

If you want to then connect to \\server1\share2, you get another connection
and another cli struct.

This is sub-optimal, and I need to change it to:

   +---------------------+                  +-----------------------+
   |  Share struct 1     |                  | Share struct 2        |
   |                     +-+              +-+                       |
   +---------------------+ |              | +-----------------------+
                           |              |
                      | Server struct with     |
                      | Username and etc       |

This makes for better use of connections and avoids prompting for passwords
all the time in libsmbclient.

Any comments/objects?

Richard Sharpe, sharpe at
Samba (Team member,, Ethereal (Team member,
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba

More information about the samba-technical mailing list