Commit Graph

60 Commits

Author SHA1 Message Date
gmcgarry
21385c9124 Remove gcc comma-eliminating variadic macro. Prefer __func__. 2008-06-27 02:09:49 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
he
917131a2cf When checking for the length of the user name, check against the size
of the correct field.  Fix provided by Bernhard Moellemann in PR#37137.
2007-10-16 15:37:32 +00:00
rumble
23622f237e Ensure that the special host token '*SMBSERVER' is not automatically
hyphenated, as this can lead to some confusion (e.g.: '*SMB-SERVER' isn't
valid).

(Thanks Wiz!)
2007-07-21 22:41:09 +00:00
dsl
71edd4968d Add new 'data_len' parameter to mount(). 2007-07-14 16:03:05 +00:00
christos
5b106e45c5 kill empty else. 2006-10-16 03:38:08 +00:00
mrg
084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
skrll
a9f4c28a3d Fix a bunch of cast lvalues. 2006-05-10 06:24:02 +00:00
tron
63cb4a87e2 Cast precision argument for sprintf() to int to fix build problems
on 64-bit platforms.
2006-05-02 10:09:18 +00:00
christos
3e168a2a10 Use the sizeof the field instead of the #define constant. Fixes off-by-one
error.
2006-05-01 18:40:02 +00:00
peter
a7819c4f5c Coverity CID 2783: Fix dereference of a freed pointer. 2006-03-25 16:06:04 +00:00
christos
1174f5b4bb Coverity CID 2060: Fix memory leak. 2006-03-22 02:29:42 +00:00
dsl
91d3fe12d9 Add (unsigned char) cast to ctype function 2004-10-29 19:15:20 +00:00
tshiozak
f7d656a488 revert the last all changes related to iconv(3). 2004-08-02 13:38:21 +00:00
tshiozak
ab8d4be7c6 make sure that the iconv(3) follows the POSIX specification;
change the 2nd argument from "const char ** restrict" to "char ** restrict".
2004-08-01 16:40:58 +00:00
jdolecek
f7461cc453 make the fallback to *SMBSERVER actually work (tested against Windows NT
share)

this fixes PR kern/23401 by Hubert Feyrer for real, and also fixes
PR kern/20991 by Robert Vargason
2004-03-21 12:30:51 +00:00
jdolecek
55447aba3b change the default SMB share owner - when run by non-root, use same uid as
the owner of the mount point (or user specified via -u); this is necessary
to succeed the permission check in the kernel SMB share code

owner setting via -O would still apply, but it's now not necessary when
doing non-root mount
2004-03-21 08:35:18 +00:00
jdolecek
b717338fee clarify the error message when the open of /dev/nsmb* fails
enable the check for cloned /dev/nsmb, to simplify eventual future switch
to cloned /dev/nsmb device

use compile time string concatenation for one constant string
2004-03-21 07:16:39 +00:00
jdolecek
f72b1e5951 automatically fallback to server name *SMBSERVER if using -I and initial
request fails
fixes PR bin/23401 by Hubert Feyrer
2004-03-20 08:55:00 +00:00
jdolecek
638863d716 convert to using the libc iconv rather than trying to load libiconv.so 2004-03-01 07:46:33 +00:00
jdolecek
10677fb827 switch nb_resolvehost_in() to getaddrinfo()
g/c commented out nbns_*() functions, they are implemented elsewhere
2004-02-21 10:09:01 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
wiz
3df7a01f61 Ar -I -> Fl I; bump date for previous. 2003-11-09 21:24:15 +00:00
hubertf
007e11ede2 Document the special server name "*SMBSERVER" 2003-11-09 21:19:31 +00:00
fvdl
ccd0060f62 Don't return NULL as an int. 2003-10-21 02:36:06 +00:00
christos
3a06209abb make this compile again. 2003-08-13 01:13:41 +00:00
martin
9fca39993e Remove unessecary intermediate void* casts. 2003-08-10 14:12:43 +00:00
mrg
71d44508da add an extra cast to quiet gcc3 2003-07-26 14:59:11 +00:00
jdolecek
c94b972ba9 terminate Xo/Xc, they are not needed with groff and new tmac macros 2003-07-04 20:20:22 +00:00
jdolecek
350a2ec006 don't print any warning message when no config file is found 2003-04-11 17:31:58 +00:00
jdolecek
96af0b754d use Xo/Xc for the //user@server/share part of synopsis, to avoid
the argument count limit
2003-04-11 12:02:09 +00:00
jdolecek
210e3d8b14 if the share name contains a dot, assume it's actually a server name
or server IP address - this allows 'mount_smbfs //192.168.0.1/foo /mnt'
to work as expected, i.e. being same as if -I 192.168.0.1 would be
specified too
perhaps we should resolve the IP to real NetBIOS name, but
apparently both Samba 2.2.8 and Windows XP accept the logon request
even when the NetBIOS name isn't correct

adresses PR kern/20991 by Robert Vargason
2003-04-09 09:12:38 +00:00
jdolecek
489f0e16b9 fix a fatal pasto in -O parsing code - if only the 'cowner:cgroup'
part would be specified (i.e. no '/' in the string), smb_parse_owner()
would be called with NULL 'cp' with obvious results; call it with 'p'
instead, so that the 'sowner:sgroup' is really optional as the code intended

problem pointed out by Masao Uebayashi <uebayasi at pultek dot co dot jp>
in private mail

smb_parse_owner(): put the group/user name in apostrophes in error message,
for readability
2003-04-07 12:36:26 +00:00
jdolecek
1233bcc56f sprinle __RCSID() 2003-04-04 08:05:32 +00:00
jdolecek
9801788f6d add /etc/nsmb.conf to FILES
refer to /usr/share/examples/smbfs/dot.nsmbrc rather than ./examples/dot.nsmbrc
2003-04-04 07:57:58 +00:00
jdolecek
83474bb6d9 fix the name of global configuration file - it's /etc/nsmb.conf, not
/usr/local/etc/nsmb.conf
pointed out in FreeBSD misc/45273
2003-04-04 07:54:44 +00:00
jdolecek
9b2bc3e8c8 use /etc/nsmb.conf rather than /usr/local/etc/nsmb.conf by default 2003-04-04 07:41:32 +00:00
jdolecek
a05dbc8c48 add NetBSD RCS Id 2003-04-04 07:37:44 +00:00
jdolecek
d9bc15eb32 there is no nsmb(8), so don't xref it here
pointed out in private mail by Kurt Schreiner
2003-04-01 11:24:47 +00:00
jdolecek
102ae64e46 remove BUGS section & don't Xr send-pr(1) - the code seems to be generally
working well and could be used without particular fear

use "SMB/CIFS" in the description

bump date
2003-03-31 17:22:31 +00:00
drochner
dcee882e84 Use getifaddrs(3) instead of SIOCGIFCONF. 2003-03-31 12:22:02 +00:00
drochner
faf7f09d5f Do the address calculations inside the data delivered by SIOCGIFCONF
correctly (this isn't a plain array!), and sort the checks a bit
to avoid duplicates in the interface list.
Now broadcast capable interfaces are identified and "mount_smbfs"
can be used without the "-I <addr>" argument.
2003-03-28 16:56:37 +00:00
jdolecek
cd7975662e memsetw(): fix mistake where the 'word' value would get written byteswapped
on i386, resulting in ' ' being encoded incorrectly in session
setup query - just use memcpy() as rest of code, it DTRT for both LE and
BE machines in this case,  since the function is called with 'word'
in little-endian format

Many thanks to Martin Husemann for testing on i386 and sparc64 against
both w2k and Samba.
2003-03-28 13:08:00 +00:00
wiz
bf95548fc6 Sort sections. 2003-03-03 07:32:29 +00:00
jdolecek
02229c5641 print also the description of error if mount(2) fails 2003-02-24 09:13:08 +00:00
jdolecek
f31ba31b00 change smbfs_args:
* g/c unused members 'mount_point', 'root_path', which only take space
* rename 'dev' to 'dev_fd' to more closely match what it is
* add 'export' member to avoid changing this again if ever smbfs would
  be made exportable

bump SMBFS_VERMIN - ABI/API change; mount_smbfs needs to be recompiled
to work again
2003-02-23 22:31:17 +00:00
jdolecek
a2e6fb66e5 do not initialize/use member 'mount_point' of struct smbfs_args
allocate mount_point[] on stack
2003-02-23 22:14:09 +00:00
martin
58a4ff2fef Avoid lots of stupid alignement problems.
You can now actually use this on sparc64 systems. Unfortunately the
kernel part contains lots more of this ****** code.
2003-02-20 14:07:12 +00:00
martin
d47d521c0f Since size_t is unsigned, better use (unsigned long) and %lu to print
a size_t. Spotted by kleink.
2003-02-19 19:15:28 +00:00
martin
93f473507c Replace some int's with size_t. Use %ld and cast to long when printing
size_t's.
2003-02-19 16:53:26 +00:00