Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2006 00:02:56 GMT
From:      Bernhard Höckner<berhoeckner@gmx.at>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/104234: Problem with mounting a smb share out of linneighborhood
Message-ID:  <200610100002.k9A02u0W030461@www.freebsd.org>
Resent-Message-ID: <200610100010.k9A0APwK048222@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610100002.k9A02u0W030461>