Commit Graph

67 Commits

Author SHA1 Message Date
pooka 4be222467f fix prototypes of function pointers to varargs syscalls 2009-10-13 22:04:31 +00:00
pooka 0a69bf315a Fill canon_dev so that mntfromname gets properly set for p2k mounts.
Fixes problem pointed out by Nicolas Joly.

XXX: would probably be better to forget canon_dev from the parseargs
interface completely and do rump_sys_statvfs() in p2k after mounting
the fail system in the virtual kernel.
2009-09-07 13:52:05 +00:00
pooka 7fa79282e3 kill #ifndef __NetBSD code (yea, I assume it meant __NetBSD__) 2009-09-06 20:07:03 +00:00
pooka f9d2118130 Implement smbfs kernel operations (ioctl etc.) through a vector of
function pointers instead of direct linkage so that rump syscalls
are possible.
2009-09-06 18:38:17 +00:00
pooka 6ad3a66ac7 Don't use select() to wait for a single socket, just set SO_RECVTIMEO. 2009-09-06 17:02:36 +00:00
pooka 4f4e18947d Make mount_smbfs follow the standard MOUNT_NOMAIN and parseargs() structure.
(yes, this is dist, but considering the last and only import from
upstream was 7 years ago, I'm not exactly worried this will make
importing future versions harder)
2009-09-04 18:22:37 +00:00
njoly 922011108e Do set error for SMBIOC_LOOKUP ioctl failure in *SMBSERVER fallback. 2009-06-26 22:41:26 +00:00
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