I think I fixed this bug by simply removing the -N option from every occurance where it was given together with -U. It makes no sense for me to specify -U username together with -N (no password). This works for me at least. Patch attached.

--- /usr/bin/xsmbrowser	2007-05-06 00:29:51.000000000 +0200
+++ xsmbrowser	2009-06-06 19:20:02.000000000 +0200
@@ -369,7 +369,7 @@
 		if {$user_name == "" & $password == ""} {
 			set spawn_pid [spawn smbclient -N -L $computer -I $ip_num -W $workgroup]
 		} else {
-			set spawn_pid [spawn smbclient -N -U $user_name -L $computer -I $ip_num -W $workgroup]
+			set spawn_pid [spawn smbclient -U $user_name -L $computer -I $ip_num -W $workgroup]
 		}
 		set id $spawn_id
 		set timeout 3600
@@ -590,7 +590,7 @@
 			if {$user_name == "" & $password == "" } { 
 				set spawn_pid [spawn smbclient \\\\$computer\\$share -I $computer_ip_num -N -W $workgroup -c dir]
 			} else {
-				set spawn_pid [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -N -W $workgroup -c dir]
+				set spawn_pid [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -W $workgroup -c dir]
 			}
 		} else {
 			if {$user_name == "" & $password == "" } { 
@@ -4752,7 +4752,7 @@
 	if {$user_name == "" & $password == ""} {
 		set kill_id [spawn smbclient \\\\$computer\\$share -I $computer_ip_num -N -W $workgroup -c $command_line]
 	} else {
-		set kill_id [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -N -W $workgroup -c $command_line]
+		set kill_id [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -W $workgroup -c $command_line]
 	}
 	set id $spawn_id
 	set timeout 360
@@ -4898,7 +4898,7 @@
 			set spawn_pid [spawn smbclient \\\\$computer\\$share -I $computer_ip_num -N -W $workgroup -c "cd \"[DirMaker \\]\";\
 			mkdir \"[.makefol.f.e get]\""]
 		} else {
-			set spawn_pid [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -N -W $workgroup\
+			set spawn_pid [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -W $workgroup\
 			-c "cd \"[DirMaker \\]\"; mkdir \"[.makefol.f.e get]\""]
 		}
 		destroy .makefol
@@ -4993,7 +4993,7 @@
 	if {$user_name == "" & $password == ""} {
 		set spawn_pid [spawn smbclient \\\\$computer\\$share -I $computer_ip_num -N -W $workgroup -c $command_line]
 	} else {
-		set spawn_pid [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -N -W $workgroup -c $command_line]
+		set spawn_pid [spawn smbclient \\\\$computer\\$share -U $user_name -I $computer_ip_num -W $workgroup -c $command_line]
 	}
 	set id $spawn_id
 	set timeout 25
@@ -5388,7 +5388,7 @@
 		-I [lindex [lindex $file_queue_list $m] 7] -N -W [lindex [lindex $file_queue_list $m] 11] -c [lindex [lindex $file_queue_list $m] 12]]
 	} elseif {$e == "1"} {
 		set file_queue_id [spawn smbclient \\\\[lindex [lindex $file_queue_list $m] 5]\\[lindex [lindex $file_queue_list $m] 6]\
-		-I [lindex [lindex $file_queue_list $m] 7] -U [lindex [lindex $file_queue_list $m] 8] -N -W [lindex [lindex $file_queue_list $m] 11]\
+		-I [lindex [lindex $file_queue_list $m] 7] -U [lindex [lindex $file_queue_list $m] 8] -W [lindex [lindex $file_queue_list $m] 11]\
 		-c [lindex [lindex $file_queue_list $m] 12]]
 	} elseif {$e == "2"} {
 		set file_queue_id [spawn smbclient \\\\[lindex [lindex $file_queue_list $m] 5]\\[lindex [lindex $file_queue_list $m] 6]\
@@ -5396,14 +5396,14 @@
 		-Tc [lindex [lindex $file_queue_list $m] 12]]
 	} elseif {$e == "3"} {
 		set file_queue_id [spawn smbclient \\\\[lindex [lindex $file_queue_list $m] 5]\\[lindex [lindex $file_queue_list $m] 6]\
-		-I [lindex [lindex $file_queue_list $m] 7] -U [lindex [lindex $file_queue_list $m] 8] -N -W [lindex [lindex $file_queue_list $m] 11]\
+		-I [lindex [lindex $file_queue_list $m] 7] -U [lindex [lindex $file_queue_list $m] 8] -W [lindex [lindex $file_queue_list $m] 11]\
 		-D [lindex [lindex $file_queue_list $m] 10] -Tc [lindex [lindex $file_queue_list $m] 12]]
 	} elseif {$e == "4"} {
 		set file_queue_id [spawn smbclient \\\\[lindex [lindex $file_queue_list $m] 5]\\[lindex [lindex $file_queue_list $m] 6]\
 		-I [lindex [lindex $file_queue_list $m] 7] -N -W [lindex [lindex $file_queue_list $m] 11] -Tc [lindex [lindex $file_queue_list $m] 12]]
 	} elseif {$e == "5"} {
 		set file_queue_id [spawn smbclient \\\\[lindex [lindex $file_queue_list $m] 5]\\[lindex [lindex $file_queue_list $m] 6]\
-		-I [lindex [lindex $file_queue_list $m] 7] -U [lindex [lindex $file_queue_list $m] 8] -N -W [lindex [lindex $file_queue_list $m] 11]\
+		-I [lindex [lindex $file_queue_list $m] 7] -U [lindex [lindex $file_queue_list $m] 8] -W [lindex [lindex $file_queue_list $m] 11]\
 		-Tc [lindex [lindex $file_queue_list $m] 12]]
 	}
 	set id $spawn_id
@@ -8291,7 +8291,7 @@
 			if {$user_name == "" & $password == "" } {
 				spawn smbmount \\\\$computer\\$share_m $mount_path -I $computer_ip_num -N -W $workgroup
 			} else {
-				spawn smbmount \\\\$computer\\$share_m $mount_path -U $user_name -I $computer_ip_num -N -W $workgroup
+				spawn smbmount \\\\$computer\\$share_m $mount_path -U $user_name -I $computer_ip_num -W $workgroup
 			}
 		} elseif {$mount_version_tmp == 3} {
 			if {$override_mount == "yes"} {
@@ -8299,14 +8299,14 @@
 					spawn smbmount \\\\$computer\\$share_m -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\"\
 					-u $mount_uid -g $mount_gid -f $mount_file -d $mount_dir"
 				} else {
-					spawn smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -N -W $workgroup\
+					spawn smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -W $workgroup\
 					-c "mount \"$mount_path\" -u $mount_uid -g $mount_gid -f $mount_file -d $mount_dir"
 				}
 			} else {
 				if {$user_name == "" & $password == ""} {
 					spawn smbmount \\\\$computer\\$share_m -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\""
 				} else {
-					spawn smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\""
+					spawn smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -W $workgroup -c "mount \"$mount_path\""
 				}
 			}
 		} else {
@@ -8591,7 +8591,7 @@
 		if {$user_name == "" & $password == "" } {
 			spawn smbmount \\\\$computer\\$share $mount_path -I $computer_ip_num -N -W $workgroup
 		} else {
-			spawn smbmount \\\\$computer\\$share $mount_path -U $user_name -I $computer_ip_num -N -W $workgroup
+			spawn smbmount \\\\$computer\\$share $mount_path -U $user_name -I $computer_ip_num -W $workgroup
 		}
 	} elseif {$mount_version == 5} {
 		spawn mount_smbfs -I $computer_ip_num -W $workgroup //$user_n...@$computer/$share $mount_path
@@ -8599,7 +8599,7 @@
 		if {$user_name == "" & $password == ""} {
 			spawn smbmount \\\\$computer\\$share -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\""
 		} else {
-			spawn smbmount \\\\$computer\\$share -U $user_name -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\""
+			spawn smbmount \\\\$computer\\$share -U $user_name -I $computer_ip_num -W $workgroup -c "mount \"$mount_path\""
 		}
 	} else {
 		if {$user_name == ""} {
@@ -9077,7 +9077,7 @@
 		if {$user_name == "" & $password == "" } {
 			exec smbmount \\\\$computer\\$share_m $mount_path -I $computer_ip_num -N -W $workgroup
 		} else {
-			exec smbmount \\\\$computer\\$share_m $mount_path -U $user_name -I $computer_ip_num -N -W $workgroup
+			exec smbmount \\\\$computer\\$share_m $mount_path -U $user_name -I $computer_ip_num -W $workgroup
 		}
 	} elseif {$mount_version == 3} {
 		if {$override_mount == "yes"} {
@@ -9085,14 +9085,14 @@
 				exec smbmount \\\\$computer\\$share_m -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\"\
 				-u $mount_uid -g $mount_gid -f $mount_file -d $mount_dir"
 			} else {
-				exec smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -N -W $workgroup\
+				exec smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -W $workgroup\
 				-c "mount \"$mount_path\" -u $mount_uid -g $mount_gid -f $mount_file -d $mount_dir"
 			}
 		} else {
 			if {$user_name == "" & $password == ""} {
 				exec smbmount \\\\$computer\\$share_m -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\""
 			} else {
-				exec smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -N -W $workgroup -c "mount \"$mount_path\""
+				exec smbmount \\\\$computer\\$share_m -U $user_name -I $computer_ip_num -W $workgroup -c "mount \"$mount_path\""
 			}
 		}
 	} else {

Reply via email to