Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2001 19:11:24 +0100 (CET)
From:      Dimitry Andric <dim@xs4all.nl>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/33068: /dev/nsmb* devices not created with make world
Message-ID:  <20011221181124.4B57E3E38@tensor.xs4all.nl>

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

>Number:         33068
>Category:       bin
>Synopsis:       /dev/nsmb* devices not created with make world
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 21 10:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dimitry Andric <dim@xs4all.nl>
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
n/a
>Environment:
System: FreeBSD tensor.xs4all.nl 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Fri Dec 21 04:19:53 CET 2001 root@tensor.xs4all.nl:/usr/obj/usr/src/sys/TENSOR i386
>Description:
When smbfs was still a port, its Makefile created the required (at
least on -STABLE, without devfs) /dev/nsmb0 device during the install
phase. Now that smbfs has been imported into the base system, this
doesn't seem to be the case anymore, leading to mount_smbfs etc
failing. Also, MAKEDEV seems to be missing code to create these nsmb*
devices.
>How-To-Repeat:
Uninstall any smbfs ports
Update to 4.5-PRERELEASE
Try "mount_smbfs //LUSER@WINBOX/C$ /mnt", you'll get:
mount_smbfs: can't get handle to requester (no /dev/net/nsmb* device)
Also note that "/dev/net/nsmb*" in the message could be bisleading, it
should probably be "/dev/nsmb*", or even "/dev/"NSMB_NAME.
>Fix:
I'm not sure about this. The nsmb* devices can be created as part of
installworld, or they can simply be added to the MAKEDEV script, as
in the following patch. It also creates nsmb0 and nsmb1 as part of
"MAKEDEV all", which seems reasonable to me. The devices are created
with default owner/group (root/wheel) and permissions (0600), as the
smbfs port has always done.

Note that I'm just guessing that an nsmb1 device can exist or makes
any sense. I haven't been able to find much documentation about that,
except the source. ;) There seems to be no nsmb(4) man page
available, alas.

diff -ud etc/MAKEDEV.orig etc/MAKEDEV
--- MAKEDEV.orig	Tue Dec 18 05:18:23 2001
+++ MAKEDEV	Fri Dec 21 18:54:32 2001
@@ -334,6 +334,7 @@
 	sh MAKEDEV i4btel0 i4btel1 i4bteld0 i4bteld1	# cdev, ISDN
 	sh MAKEDEV i4brbch0 i4brbch1			# cdev, ISDN
 	sh MAKEDEV agpgart				# cdev, AGP
+	sh MAKEDEV nsmb0 nsmb1				# cdev, smbfs device
 	;;
 
 # a much restricted set of the above, to save precious i-nodes on the
@@ -1799,6 +1800,11 @@
 cfs*)
 	unit=`expr $i : 'cfs\(.*\)'`
 	mknod cfs$unit c 93 $unit root:operator
+	;;
+
+nsmb*)
+	unit=`expr $i : 'nsmb\(.*\)'`
+	mknod nsmb$unit c 144 $unit
 	;;
 
 local)
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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