History log of /freebsd-10-stable/contrib/smbfs/lib/smb/nb_name.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 294364 19-Jan-2016 ian

MFC r292337, r292552, r292553:

Build mount_smbfs for arm. Also sort the subdirs.

Avoid unaligned memory accesses when encoding netbios names in libsmb.

The current code for encoding a netbios name converts each byte to a 16-bit
value and stores the result by casting a char* to u_short*, resulting in
alignment faults on strict-alignment platforms.

This change reimplements the encoding routine using only byte accesses to
memory. There is no particular reason to work with 16-bit values just
because the encoding process creates two bytes of output for every byte of
input. Working a byte at at time also avoids endian problems for big-endian
platforms.

Make the building of libsmb and mount_smbfs unconditional, now that r292552
has eliminated alignment and endian problems that were making it fail on
some platforms.

PR: 180438
PR: 189415
Relnotes: Yes


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 184567 02-Nov-2008 rwatson

When encoding an smb name, truncate one byte earlier in order than we did
previously in order to ensure it fit properly in the bufer when encoded.
This prevents a debugging printf from firing if a source or destination
host name for an smb mount exceeds 15 characters.

MFC after: 3 days
Obtained from: Apple, Inc.


# 150312 19-Sep-2005 imura

Remove macros
htole{s,l,q}, letoh{s,l,q}, htobe{s,l,q}, betoh{s,l,q}
and replace it with more standard byteorder macros in our system.


# 88283 20-Dec-2001 sheldonh

This commit was generated by cvs2svn to compensate for changes in r88282,
which included commits to RCS files with non-trunk default branches.


# 88282 20-Dec-2001 sheldonh

Import smbfs-1.4.2.


# 87866 14-Dec-2001 sheldonh

Import smbfs-1.4.1.

This is Boris Popov's SMB/CIFS file system implementation for FreeBSD.

Obtained from: Boris Popov via ftp://ftp.butya.kz/pub/smbfs/