From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 10 00:10:26 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA82016A415 for ; Tue, 10 Oct 2006 00:10:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7716F43D45 for ; Tue, 10 Oct 2006 00:10:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9A0APjX048223 for ; Tue, 10 Oct 2006 00:10:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9A0APwK048222; Tue, 10 Oct 2006 00:10:25 GMT (envelope-from gnats) Resent-Date: Tue, 10 Oct 2006 00:10:25 GMT Resent-Message-Id: <200610100010.k9A0APwK048222@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bernhard Höckner Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC3A816A415 for ; Tue, 10 Oct 2006 00:02:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0243643D68 for ; Tue, 10 Oct 2006 00:02:57 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k9A02uWQ030462 for ; Tue, 10 Oct 2006 00:02:56 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k9A02u0W030461; Tue, 10 Oct 2006 00:02:56 GMT (envelope-from nobody) Message-Id: <200610100002.k9A02u0W030461@www.freebsd.org> Date: Tue, 10 Oct 2006 00:02:56 GMT From: Bernhard Höckner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/104234: Problem with mounting a smb share out of linneighborhood X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 00:10:26 -0000 >Number: 104234 >Category: ports >Synopsis: Problem with mounting a smb share out of linneighborhood >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 10 00:10:24 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Bernhard Höckner >Release: 6.1 >Organization: private >Environment: FreeBSD yuri 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #0: Mon Sep 4 16:33:03 CEST 2006 yuri@yuri:/usr/obj/usr/src/sys/KERNEL_2205 i386 >Description: I had a problem with mounting shares in my network out of LinNeighborhood: The smb shares were found, and could be mounted with mount_smbfs from the commandline, but not from within LinNeighborhood. The problem was a commandline option used of LinNeighborhood without an argument. The problem was that a pointer to a string wasn't checked if the pointer was set properly, so it could happen that an empty string was used as argument. >How-To-Repeat: >Fix: Just checks if the pointer is set properly. --- smbmount.c.orig Mon Oct 9 18:55:21 2006 +++ smbmount.c Mon Oct 9 19:15:03 2006 @@ -450,9 +450,11 @@ argv[++argnr]=num3; argv[++argnr]="-g"; argv[++argnr]=num4; - argv[++argnr]="-I"; - strcpy(tmp, ipaddr); - argv[++argnr]=tmp; + if( *ipaddr) + { + argv[++argnr]="-I"; + argv[++argnr]=ipaddr; + } if (*group_name) { argv[++argnr]="-W"; Patch attached with submission follows: --- smbmount.c.orig Mon Oct 9 18:55:21 2006 +++ smbmount.c Mon Oct 9 19:15:03 2006 @@ -450,9 +450,11 @@ argv[++argnr]=num3; argv[++argnr]="-g"; argv[++argnr]=num4; - argv[++argnr]="-I"; - strcpy(tmp, ipaddr); - argv[++argnr]=tmp; + if( *ipaddr) + { + argv[++argnr]="-I"; + argv[++argnr]=ipaddr; + } if (*group_name) { argv[++argnr]="-W"; >Release-Note: >Audit-Trail: >Unformatted: