Re: gnome-vfs and smb:// URI's - am I doing something wrong?



Hi Alex,

I've recompiled with the debugging flags set as you suggested and I have
attached the debug logs, with hope that you can see something that I cannot
:-)

I have 4 logs:
Test 1: running my vfs-test with a URI of smb://pauld:mypassword localhost
Test 2: running my vfs-test with a URI of
smb://pauld:mypassword localhost/test
Test 3: running nautilus with a URI of smb://pauld:mypassword localhost
Test 4: running nautilus with a URI of smb://pauld:mypassword localhost/test

The nautilus logs are successful, whereas my program is unsuccessful.

[This is unrelated], but is it a bug/feature/known issue that nautilus
doesn't
even bother with the username/password passed through the address bar for
samba URIs?
It opens up a dialog box asking for username/password, even if it is
supplied in the URI.

Anyway, without further ado... here are the logs.

thanks,
Paul


=================== TEST 1 =======================
======= running my vfs-test with a URI of smb://pauld:mypassword localhost

pauld titan cs $ ./vfs-test smb://pauld:mypassword localhost
URI parts: host: localhost, port: 0, scheme: smb, user: pauld, pass:
mypassword, path:
tostring: smb://pauld:mypassword localhost
do_open_directory() smb://pauld:mypassword localhost
lookup_uri (uri: smb://pauld:mypassword localhost)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: (null) path: (null))
get_file_type (), first smb_host_connection () said: Host not found
smb_server_connection_new_from_ip (ip: 192.168.1.1, share: IPC$, user:
(null), password: (null))
smb_server_connection_new_from_ip: caller.name: TITAN, called.name: TITAN
Trying to setup session as user pauld
Failed login as pauld, trying anon
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
get_file_type (), second smb_host_connection () said: No error
smb_connection_free: freeing connection localhost -> IPC$
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
smb_connection_free: freeing connection localhost -> IPC$
RESULT: Access denied


======================= TEST 2 ======================
====== running my vfs-test with a URI of
smb://pauld:mypassword localhost/test

pauld titan cs $ ./vfs-test smb://pauld:mypassword localhost/test
URI parts: host: localhost, port: 0, scheme: smb, user: pauld, pass:
mypassword, path: /test
tostring: smb://pauld:mypassword localhost/test
do_open_directory() smb://pauld:mypassword localhost/test
lookup_uri (uri: smb://pauld:mypassword localhost/test)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: test path: (null))
get_file_type (), first smb_host_connection () said: Host not found
smb_server_connection_new_from_ip (ip: 192.168.1.1, share: IPC$, user:
(null), password: (null))
smb_server_connection_new_from_ip: caller.name: TITAN, called.name: TITAN
Trying to setup session as user pauld
Failed login as pauld, trying anon
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
get_file_type (), second smb_host_connection () said: No error
smb_connection_free: freeing connection localhost -> IPC$
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
smb_connection_free: freeing connection localhost -> IPC$
RESULT: Access denied



======================= TEST 3 ==========================
====== running nautilus with a URI of smb://pauld:mypassword localhost

do_get_file_info() smb://pauld:mypassword localhost
lookup_uri (uri: smb://pauld:mypassword localhost)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: (null
) path: (null))
get_file_type (), first smb_host_connection () said: Host not found
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password
: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
pass
word: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
get_file_type (), second smb_host_connection () said: No error
do_get_file_info() smb://pauld:mypassword localhost
lookup_uri (uri: smb://pauld:mypassword localhost)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: (null
) path: (null))
get_file_type (), first smb_host_connection () said: No error
do_open_directory() smb://pauld:mypassword localhost
lookup_uri (uri: smb://pauld:mypassword localhost)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: (null
) path: (null))
get_file_type (), first smb_host_connection () said: No error
smb_connection_free: freeing connection localhost -> IPC$
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password
: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
pass
word: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
smb_connection_free: freeing connection localhost -> IPC$
XXX - async callback invoked.
+ uri:'smb://localhost' is_proxy_auth: 0

******* NAUTILUS NOW ASKS FOR MY USERNAME/PASSWORD ******

+ button: -5
+
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_close_directory() 0x41529878



===================== TEST 4 ========================
===== running nautilus with a URI of smb://pauld:mypassword localhost/test

do_get_file_info() smb://pauld:mypassword localhost/test
lookup_uri (uri: smb://pauld:mypassword localhost/test)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: test path: (null))
get_file_type (), first smb_host_connection () said: Host not found
smb_server_connection_new_from_ip (ip: 192.168.1.1, share: IPC$, user:
(null), password: (null))
smb_server_connection_new_from_ip: caller.name: TITAN, called.name: TITAN
Trying to setup session as user pauld
Failed login as pauld, trying anon
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
get_file_type (), second smb_host_connection () said: No error
do_get_file_info() smb://pauld:mypassword localhost/test
lookup_uri (uri: smb://pauld:mypassword localhost/test)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: test path: (null))
get_file_type (), first smb_host_connection () said: No error
do_open_directory() smb://pauld:mypassword localhost/test
lookup_uri (uri: smb://pauld:mypassword localhost/test)
lookup_uri (user: pauld password: mypassword host_name: localhost
share_name: test path: (null))
get_file_type (), first smb_host_connection () said: No error
smb_connection_free: freeing connection localhost -> IPC$
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
smb_connection_free: freeing connection localhost -> IPC$
XXX - async callback invoked.
+ uri:'smb://localhost' is_proxy_auth: 0

***** NAUTILUS ASKS FOR USERNAME AND PASSWORD *******
+ button: -5
+
smb_server_connection_new (server: localhost, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: IPC$, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
smb_server_connection_new (server: localhost, share: test, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip (ip: 127.0.0.1, share: test, user: pauld,
password: mypassword)
smb_server_connection_new_from_ip: caller.name: TITAN, called.name:
LOCALHOST
Trying to setup session as user pauld
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_read_directory()
do_close_directory() 0x4151b2a8




----- Original Message -----
From: "Alexander Larsson" <alexl redhat com>
To: "Paul Duran" <pauld hutch com au>
Cc: <gnome-vfs-list gnome org>
Sent: Tuesday, April 01, 2003 6:08 PM
Subject: Re: gnome-vfs and smb:// URI's - am I doing something wrong?


> On Thu, 27 Mar 2003, Paul Duran wrote:
>
> > 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
>
> Strange. The code looks fine. What version of gnome-vfs-extras is this?
> There was some problems with an earlier one where you had to read the smb:
> and smb://hostname/ dirs before logging in worked.
>
> > 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.
>
> No idea..
>
> > 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!
>
> If you want to debug it, try rebuilding gnome-vfs-extras with DEBUG_SMB
> enabled in smb-method.c.
>
> --
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                            Red Hat, Inc
>                    alexl redhat com    alla lysator liu se
> He's a leather-clad hunchbacked barbarian on the hunt for the last
specimen of
> a great and near-mythical creature. She's an enchanted blonde advertising
> executive on the trail of a serial killer. They fight crime!
>
>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]