libsmbclient... is there a test program? seems not to work

Derrell.Lipman at UnwiredUniverse.com Derrell.Lipman at UnwiredUniverse.com
Wed Sep 24 02:37:00 GMT 2003


I'm using samba 3.0.0rc4 and trying to use libsmbclient.  It does not appear
to do as its internal documentation says it should.

Specifically, according to the docs at the top of smbc_parse_path(), when
passed a url of "smb://" the library should be able to return a list of
workgroups, and passing "smb://workgroup_name/" should provide a list of
servers in that workgroup.  However, for the former case, smbc_parse_path()
produces an empty server string on return, and therefore the caller,
smbc_stat_ctx(), fails to connect to any server).  In the latter case, the
workgroup name is assumed to be a server name (#20, only, is used) so no list
of servers is returned.

Am I using this incorrectly?  Shouldn't smbc_parse_path() be returning a
server string of "<some workgroup>#01" when smb:// is passed to it by
smbc_stat_ctx() or smbc_opendir_ctx()?  Shouldn't the library be using #1D on
the broadcast to find servers?  I must be missing something, but I don't know
what.

Examples of my calls that I'd expect a different result than what I'm seeing:

  ret = smbc_stat("smb://", &statbuf);
  ret = smbc_stat("smb://lipman/", &statbuf); /* "lipman" is a workgroup */

These both fail, the first with EPERM, the latter with ENOENT.

Is there a test program for libsmbclient?  Does anything or anyone use
libsmbclient?

Thanks!

Derrell



More information about the samba-technical mailing list