Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I also found 'smb_conn.h' in the following location so
I changed that as well:

/usr/src/sys/netsmb/smb_conn.h

I then recompiled and re-installed my kernel.

mount_smbfs still gave the error it did before about
the name being too long.  I also trying re-making the
port from the '/usr/ports/net/smbfs' directory but
this didn't seem to do anything.  I am a bit of a
novice at this so please bear with with.

Any hints?

Thanks,
Paul

 --- Ruslan Ermilov <ru@xxxxxxxxxxx> wrote: > On Tue,
Oct 23, 2001 at 01:22:05AM +1000, Paul
> Jansen wrote:
> > I'm wondering whether I've come across a bug in
> smbfs.
> >  I've maanged to get this working at home and it's
> > doing a great job.  I brought one of my FreeBSD
> boxes
> > into work tongight and plugged it into the LAN
> with
> > the intention of showing smbfs to one of my
> > co-workers.  I tried attaching to a workstation on
> the
> > network and got the following error:
> > 
> > "mount_smbfs: server name 'auadwesm1511625' too
> long"
> > 
> > This NT workstation works fine on our network so I
> > know that it isn't a problem.  As I mentioned
> earlier
> > I've used  smbfs successfully at home but that
> with
> > with machines that had netbios names less than 15
> > characters in length.
> > I know that netbios names can be 16 characters in
> > length but that the 16th character is a reserved
> > 'special' character used to denote a particular
> > function.  15 character netbios names for machines
> are
> > perfectly legal - does smbfs have a bug?
> > 
> Seems like a bug.
> 
> kernel/netsmb/smb.h:#define SMB_MAXSRVNAMELEN   15  
>    /* NetBIOS limit */
> lib/smb/ctx.c:  if (strlen(name) >=
> SMB_MAXSRVNAMELEN) {
> lib/smb/ctx.c-          smb_error("server name '%s'
> too long", 0, name);
> 
> The attached patch (untested) should fix this.
> Make sure to apply smb_conn.h patch in
> /usr/src/sys/net/netsmb,
> if you have this directory, and recompile smbfs KLD
> and/or
> your kernel (if you have it compiled in statically).
> 
> 
> Cheers,
> -- 
> Ruslan Ermilov		Oracle Developer/DBA,
> ru@xxxxxxxxxx		Sunbay Software AG,
> ru@xxxxxxxxxxx		FreeBSD committer,
> +380.652.512.251	Simferopol, Ukraine
> 
> http://www.FreeBSD.org	The Power To Serve
> http://www.oracle.com	Enabling The Information Age
> > diff --exclude=CVS -ru
> smbfs-1.4.1/kernel/netsmb/smb_conn.h
> smbfs-1.4.1/kernel/netsmb/smb_conn.h
> --- smbfs-1.4.1/kernel/netsmb/smb_conn.h	Tue Apr 10
> 08:37:22 2001
> +++ smbfs-1.4.1/kernel/netsmb/smb_conn.h	Mon Oct 22
> 18:47:08 2001
> @@ -148,7 +148,7 @@
>  	int		flags;
>  	enum smbiod_state iodstate;
>  	struct smb_sopt	sopt;
> -	char		srvname[SMB_MAXSRVNAMELEN];
> +	char		srvname[SMB_MAXSRVNAMELEN + 1];
>  	char		vcname[128];
>  };
>  
> diff --exclude=CVS -ru smbfs-1.4.1/lib/smb/ctx.c
> smbfs-1.4.1/lib/smb/ctx.c
> --- smbfs-1.4.1/lib/smb/ctx.c	Fri Apr  6 18:47:14
> 2001
> +++ smbfs-1.4.1/lib/smb/ctx.c	Mon Oct 22 18:47:16
> 2001
> @@ -266,7 +266,7 @@
>  int
>  smb_ctx_setserver(struct smb_ctx *ctx, const char
> *name)
>  {
> -	if (strlen(name) >= SMB_MAXSRVNAMELEN) {
> +	if (strlen(name) > SMB_MAXSRVNAMELEN) {
>  		smb_error("server name '%s' too long", 0, name);
>  		return ENAMETOOLONG;
>  	}
>  

http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.

To Unsubscribe: send mail to majordomo@xxxxxxxxxxx
with "unsubscribe freebsd-ports" in the body of the message