Hello,
I'm trying to familiarise myself with the gnome-vfs
library so I tried writing
a program to basically list directories, obtained
through gnome-vfs.
This program works fine with file:/// URI's and ftp://user:pass host URI's
however I am having problems with smb:// URI's. smb
URI's work fine in
nautilus, after prompting for username and password
of course.
basically the code is:
int main( int argc, char *argv[]
)
{ GnomeVFSResult
result;
GList
*list;
gnome_vfs_init(0;
result =
gnome_vfs_directory_list_load( &list, argv[1], 0 );
printf("RESULT:
%s\n", gnome_vfs_result_to_string(result));
}
Whenever I call this with smb:// URI's (with
correct login information etc)
I get:
RESULT: Access denied
I have verified that the URI is being parsed
correctly using the gnome_vfs_uri_get_*
functions.
To test, I have created a new share in my samba
config file as follows:
[test]
path = /usr/local/src
public = yes
only guest = yes
writable = yes
printable = no
I run my program as: ./vfs-test
smb://localhost/test
Following is the relevant part from the samba
log.
[2003/03/27 20:18:21, 3]
smbd/password.c:authorise_login(855)
authorise_login: ACCEPTED: guest account and guest ok
(nobody)
[2003/03/27 20:18:21, 3]
smbd/service.c:make_connection(487)
Connect path is /tmp
[2003/03/27 20:18:21, 3]
smbd/vfs.c:vfs_ChDir(574)
vfs_ChDir to /tmp
[2003/03/27 20:18:21, 3]
smbd/service.c:make_connection(636)
titan (127.0.0.1) connect to service IPC$ as user nobody
(uid=65534, gid=65534) (pid 27260)
[2003/03/27 20:18:21, 3]
smbd/reply.c:reply_tcon_and_X(395)
tconX service=ipc$ user=nobody
[2003/03/27 20:18:21, 3]
smbd/process.c:timeout_processing(1066)
end of file from client
[2003/03/27 20:18:21, 2]
smbd/server.c:exit_server(511)
Closing connections
[2003/03/27 20:18:21, 3]
smbd/service.c:close_cnum(677)
titan (127.0.0.1) closed connection to service
IPC$
[2003/03/27 20:18:21, 3]
smbd/connection.c:yield_connection(48)
Yielding connection to IPC$
[2003/03/27 20:18:21, 3]
smbd/vfs.c:vfs_ChDir(574)
vfs_ChDir to /
[2003/03/27 20:18:21, 3]
smbd/connection.c:yield_connection(48)
Yielding connection to
[2003/03/27 20:18:21, 3]
smbd/process.c:timeout_processing(1066)
end of file from client
[2003/03/27 20:18:21, 2]
smbd/server.c:exit_server(511)
Closing connections
[2003/03/27 20:18:21, 3]
smbd/service.c:close_cnum(677)
titan (192.168.1.1) closed connection to service
IPC$
[2003/03/27 20:18:21, 3]
smbd/connection.c:yield_connection(48)
Yielding connection to IPC$
[2003/03/27 20:18:21, 3]
smbd/vfs.c:vfs_ChDir(574)
vfs_ChDir to /
[2003/03/27 20:18:21, 3]
smbd/connection.c:yield_connection(48)
Yielding connection to
[2003/03/27 20:18:21, 3]
smbd/server.c:exit_server(545)
Server exit (normal exit)
As you can see, the client (ie: my app) is
apparently trying to
connect to a share at: /tmp. There is no share of
that name
in my samba config and that is why I am getting
Access Denied.
The question is, why is it trying to connect to a
/tmp share.
This happens regardless of the hostname or the path (share
name) that
I use as I have tried on a couple of
machines.
any help would be appreciated!
regards,
Paul |