--- gnome-vfs-2.6.0/ChangeLog	2005-01-13 20:24:12.138097128 +0530
+++ gnome-vfs-2.6.0-new/ChangeLog	2005-01-13 20:23:58.640149128 +0530
@@ -1,3 +1,11 @@
+2005-01-13  Narayana Pattipati  <narayana.pattipati@wipro.com>
+
+	* modules/smb-method.c: (add_cached_server), (initial_authentication)
+	(prompt_authentication):
+	Make smb:// browse work when username and/or domain name is as
+	part of smb:// URI. Fixes the issues mentioned in bugzilla
+	bug#132933.
+
 2005-01-11  Alexander Larsson  <alexl@redhat.com>
 
 	* libgnomevfs/gnome-vfs-volume-ops.c: (mount_unmount_thread),
--- gnome-vfs-2.6.0/modules/smb-method.c	2005-01-13 20:23:46.858940144 +0530
+++ gnome-vfs-2.6.0-new/modules/smb-method.c	2005-01-13 02:55:29.509790616 +0530
@@ -373,20 +373,12 @@ add_cached_server (SMBCCTX *context, SMB
 
 	cache_access_failed = FALSE;
 
-	if (current_auth_context && current_auth_context->uri != NULL) {
-		toplevel = (GnomeVFSToplevelURI *)current_auth_context->uri;
-
-		if (toplevel->user_name == NULL ||
-		    toplevel->user_name[0] == 0) {
-			default_user = g_new0 (SmbDefaultUser, 1);
-			default_user->server_name = string_dup_nzero (server_name);
-			default_user->share_name = string_dup_nzero (share_name);
-			default_user->username = string_dup_nzero (username);
-			default_user->domain = string_dup_nzero (domain);
-			g_hash_table_replace (default_user_hashtable, default_user, default_user);
-		}
-	}
-
+	default_user = g_new0 (SmbDefaultUser, 1);
+	default_user->server_name = string_dup_nzero (server_name);
+	default_user->share_name = string_dup_nzero (share_name);
+	default_user->username = string_dup_nzero (username);
+	default_user->domain = string_dup_nzero (domain);
+	g_hash_table_replace (default_user_hashtable, default_user, default_user);
 	return 0;
 }
 
@@ -734,8 +726,10 @@ initial_authentication (SmbAuthContext *
 			DEBUG_SMB(("[auth] User from URI: %s\n", actx->use_user));
 		}
 
+	} 
+
 	/* Lookup a default user and domain */
-	} else {
+	if (actx->use_user == NULL || actx->use_domain == NULL) {
 		
 		/* lookup default user/domain */
 		lookup.server_name = actx->for_server;
@@ -841,6 +835,10 @@ prompt_authentication (SmbAuthContext *a
 	if (actx->uri && ((GnomeVFSToplevelURI*)actx->uri)->user_name == NULL) {
 		in_args.flags |= GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_USERNAME |
 	  			 GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_DOMAIN;
+	} else if (actx->use_user == NULL) {
+		in_args.flags |= GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_USERNAME; 
+	} else if (actx->use_domain == NULL) {
+		in_args.flags |= GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_DOMAIN;
 	}
 
 	in_args.uri = get_auth_display_uri (actx);
@@ -864,10 +862,12 @@ prompt_authentication (SmbAuthContext *a
 
 	if (invoked) {
 		cancelled = out_args.abort_auth;
-		g_free (actx->use_user);
-		actx->use_user = string_dup_nzero (out_args.username);
-		g_free (actx->use_domain);
-		actx->use_domain = string_dup_nzero (out_args.domain);
+		if (actx->use_user == NULL) {
+			actx->use_user = string_dup_nzero (out_args.username);
+		}
+		if (actx->use_domain == NULL) {
+			actx->use_domain = string_dup_nzero (out_args.domain);
+		}
 		g_free (actx->use_password);
 		actx->use_password = out_args.password ? g_strdup (out_args.password) : NULL;
 		g_free (actx->keyring);
