1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

910 Commits

Author SHA1 Message Date
Jeremy Allison
4939a24cbc Fix the problem when -L is used with IPv6 addresses. Don't try to
connect on port 139 with IPv6. Found by David Holder @ Erion.
Karolin please merge to 3.2-stable.
Jeremy.
(This used to be commit c003e66ff10b23bb30aef0071ba7a3ae9579174e)
2008-04-17 09:24:54 -07:00
Jeff Layton
161db3e8e8 mount.cifs: fix several problems when mounting subdirectories of shares (try 2)
This patch is the second patch to attempt to fix up some of the problems
with mounting subdirectories of shares. The earlier patch didn't handle
this correctly when POSIX extensions were enabled. This one does.

This is a bit of a confusing area since the different components of
a service string have different rules:

1) hostname: no '/' (slash) or '\' (backslash) is allowed to be
	     embedded within the string

2) sharename: same rules as hostname

3) prefixpath: '\' *is* allowed to be embedded in a path component,
	       iff POSIX extensions are enabled. Otherwise, neither
	       character is allowed.

The idea here is to allow either character to act as a delimiter when we
know that the character can't be anything but a delimiter (namely
everywhere up to the start of the prefixpath). The patch will convert
any '\' unconditionally to '/' in the UNC portion of the string.

However, inside the prefixpath, we can't make assumptions about what
constitutes a delimiter because POSIX allows for embedded '\'
characters. So there we don't attempt to do any conversion, and pass the
prefixpath to the kernel as is. Once the kernel determines whether POSIX
extensions are enabled, it can then convert the path if needed and it's
able to do so. A patch to handle this has already been committed to the
cifs-2.6 git tree.

This patch also fixes an annoyance. When you mount a subdir of a share,
mount.cifs munges the device string so that you can't tell what the
prefixpath is. So if I mount:

	//server/share/p1/p2/p3

..then /proc/mounts and mtab will show only:

	//server/share

Finally, it also tries to apply some consistent rules to the uppercasing
of strings.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit e03d1dfdb80333c071b600245eb749ef5664aa22)
2008-03-31 16:05:20 -04:00
Volker Lendecke
8f6b03b673 More ssize_t->SMB_OFF_T
(This used to be commit 8dd6458049d1b9d6849730ac19c39b049a68f302)
2008-03-28 15:32:02 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d22590550f0539215d020e4411bf5b14363)
2008-03-17 20:52:25 +01:00
Volker Lendecke
82117aaaea Fix Coverity ID 563
dirmask is always set here, we've dereferenced it before anyway
(This used to be commit e6787aa133a1b241987319486c3bc46ac6ad41af)
2008-03-15 22:30:25 +01:00
Volker Lendecke
fa495ce1c1 Fix Coverity ID 564
finfo1==NULL just does not happen in current code
(This used to be commit 9ea0078c3151984a901c9bba559ae2bd7959e077)
2008-03-15 22:30:25 +01:00
Günther Deschner
251a16c900 Use rpccli_srvsvc_NetShareEnumAll in smbclient.
Guenther
(This used to be commit 1121633652ffb77dce8df9cc91b7dfc2d55fd348)
2008-03-10 04:33:06 +01:00
Derrell Lipman
914cd3e483 Eliminate global variable in_client and a plethora of extern declarations.
Derrell
(This used to be commit b7f34e7ef2907b498a0645ce68f2773ed7d60cdc)
2008-03-06 10:41:42 -05:00
Volker Lendecke
5193ae9b5a Change default bufsize to 512k
I did not do any scientific tests, but the dummy test on my laptop against a
w2k3 vmware shows that in this specific situation going beyond 512k seems not
to gain anything anymore.

smb: \> iosize 64512
iosize is now 64512
smb: \> lcd /dev
smb: \> get random null
getting file \random of size 104857600 as null (33453,1 kb/s) (average 19718,5 kb/s)
smb: \> get random null
getting file \random of size 104857600 as null (34236,0 kb/s) (average 20509,1 kb/s)
smb: \> iosize 524288
iosize is now 524288
smb: \> get random null
getting file \random of size 104857600 as null (49042,1 kb/s) (average 22521,9 kb/s)
smb: \> get random null
getting file \random of size 104857600 as null (49420,8 kb/s) (average 23432,9 kb/s)
smb: \> iosize 1048576
iosize is now 1048576
smb: \> get random null
getting file \random of size 104857600 as null (49420,8 kb/s) (average 24284,2 kb/s)
smb: \> get random null
getting file \random of size 104857600 as null (49136,3 kb/s) (average 25076,9 kb/s)
(This used to be commit 1bcfef6a9093aa873550a263dc142c8a3f5edffd)
2008-03-06 13:28:23 +01:00
Volker Lendecke
a8003f1af2 Use io_bufsize as window size in smbclient get command
(This used to be commit e602f06cbba852a7eacd15b2511ef2571a95cc80)
2008-03-06 13:28:23 +01:00
Volker Lendecke
6244578835 Add async cli_pull support
This is the big (and potentially controversial) one. It took a phone call to
explain to metze what is going on inside cli_pull_read_done, but I would really
like everybody to understand this function. It is a very good and reasonably
complex example of async programming. If we want more asynchronism in s3, this
is what we will have to deal with :-)

Make use of it in the smbclient "get" command.

Volker
(This used to be commit 76f9b360ee1d973630d82d401eeddce858189301)
2008-03-06 13:28:23 +01:00
Volker Lendecke
a34d158880 Revert "Add async cli_pull support"
This reverts commit 844a163458c7585e4306a21ffdae5d08e03d6e4d.
(This used to be commit 5ab1cfda500de07ff3c712442ab2fc74eecc8886)
2008-03-01 09:38:14 +01:00
Volker Lendecke
1c02bee829 Revert "Fix warnings"
This reverts commit 9a966e5593ae4474014aec5d8c68c489ac8ce0c9.
(This used to be commit 413695e8d0d8232a9c35e693f9a4a8009418ede4)
2008-03-01 09:38:14 +01:00
Volker Lendecke
b50eb31bb4 Fix warnings
(This used to be commit 9a966e5593ae4474014aec5d8c68c489ac8ce0c9)
2008-02-29 15:17:38 +01:00
Karolin Seeger
e1b32594c7 Remove smbmount.
Karolin
(This used to be commit 5fbd98f7065268ae134108310119078ad8f62322)
2008-02-28 15:53:43 +01:00
Volker Lendecke
525aac775e Add async cli_pull support
This is the big (and potentially controversial) one. It took a phone call to
explain to metze what is going on inside cli_pull_read_done, but I would really
like everybody to understand this function. It is a very good and reasonably
complex example of async programming. If we want more asynchronism in s3, this
is what we will have to deal with :-)

Make use of it in the smbclient "get" command.

Volker
(This used to be commit 844a163458c7585e4306a21ffdae5d08e03d6e4d)
2008-02-28 15:27:55 +01:00
Volker Lendecke
c7522804a5 Do the formatting change in all 3 places :-)
(This used to be commit d32066eaef1d09ec41fd5365e18eacd93e485d53)
2008-02-25 09:55:53 +01:00
Volker Lendecke
90ad42fad3 Fix confusing error message -- bug 5252
Thanks to Walter Franzini
(This used to be commit 19de47fef1b35c47885acc40760a232e4643079c)
2008-02-25 09:51:33 +01:00
Simo Sorce
d88e40106f Make sure mount.cifs.c compiles on Fedora 9 with gcc 4.3
(This used to be commit ce57d388251063c22f89680e9d1c2129d9879975)
2008-02-22 14:10:28 -05:00
Tim Potter
2cd374db8d Replace C++-style comments with C.
(This used to be commit a1d07469236c06b65f14a59a27d7f7abcb106b5e)
2008-02-18 10:15:22 +01:00
Simo Sorce
31e5116a88 Revert "Merge in J.Layton patch and resolve conflict."
This reverts commit 6b1a118eaaab405eeef0cf3c0488a2747af562ba.

We found that this patch does not play well with currently released cifs.ko
code, so after discussions with Jeff Layton and Steve french we decided it
is best to back it off and re-think a better approach. Jeff will send new
patches later, but for now it is better to just revert to the previous code
(This used to be commit c5b7d538ecfa93377ff20704633ac57dbf8dd530)
2008-02-14 12:03:32 -05:00
Jeremy Allison
7a694af2f4 Fix bug #5247 "Wildcard expansion in mget is broken"
for 3.2.
Jeremy.
(This used to be commit 69aa0766203cb88b8b07e364f7148ade809f5ce6)
2008-02-08 16:59:52 -08:00
Volker Lendecke
88c27f83d4 Convert receive_smb_raw to NTSTATUS
(This used to be commit ba771bd858602452a9e58c3aab1336f2ac8a25ef)
2008-02-02 11:03:23 +01:00
Volker Lendecke
b679dda6c9 Fix bogus uninitialized variable warnings
(This used to be commit 71d6580c837adcc2cddcdff561f6fb09701501ee)
2008-01-25 21:20:39 +01:00
Volker Lendecke
ba6c78c355 Fix Coverity ID 463
(This used to be commit 21d126c56a633d2d72ffad08db7331ecc0ee3c0c)
2008-01-24 16:31:55 +01:00
Volker Lendecke
587cf54c61 strtok -> strtok_r
(This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789)
2008-01-23 15:08:04 +01:00
Jeremy Allison
b97fbf5888 Fix error message for new allinfo command.
Jeremy.
(This used to be commit 3a1bcbfa7ca2b55265eb486e2b7c740e04775698)
2008-01-18 13:47:10 -08:00
Volker Lendecke
3d3d6e7020 Add the "allinfo" command to smbclient
Modeled after the Samba4 allinfo command
(This used to be commit 3fa0cf3fe5f819f6e76df6f7cef3bb4e1c307a52)
2008-01-18 11:08:17 +01:00
Igor Mammedov
94fdd59f1c Adds support for cifs.resolver upcall.
Here is a patch for userspace cifs.spnego handler that adds support for cifs.resolver
upcall used in DFS code.
Any comments are appreciated.

#############################

Cifs upcall with key type cifs.resolver is used for resolving
server names in handling DFS refferals.

Signed-off-by: Igor Mammedov <niallain@gmail.com>
(This used to be commit dfc80b4f1c00c131ba8077432bfe79f22f63ccd1)
2008-01-16 09:51:06 -05:00
Karolin Seeger
1ac5e6cdfe Correct comment. Default debug level of smbclient is 1, not 0.
(This used to be commit 9c81125e6d3df49806e1c0b39409ffac8e3a0fd1)
2008-01-09 12:21:44 +01:00
Steve French
56a8ef0bbb Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit d3b91e494c824a65506ba1bc1cba5bba77000530)
2008-01-05 14:51:23 -06:00
Jeremy Allison
722d288d21 Use the common -e option not the custom one.
Jeremy.
(This used to be commit ef1bbcdfb98da185c07005dd7810039f99f0685f)
2008-01-05 00:46:04 -08:00
Jeremy Allison
9baa97a46e Add general '-e' option to enable smb encryption
on tools.
Jeremy.
(This used to be commit 757653966fc1384159bd2d57c5670cd8af0cae96)
2008-01-05 00:23:35 -08:00
Jeremy Allison
01afb07321 Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3a45f62310faf63cd6864d2cb10f941492eda818)
2008-01-04 19:06:37 -08:00
Jeremy Allison
058ba641f3 Fix idle client reading keepalive.
Jeremy.
(This used to be commit 4ce0bf785635371e2923217b1e0b7f30986c25bb)
2008-01-04 14:56:56 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
2008-01-04 12:56:23 -08:00
Steve French
8122eb767a Update mount.cifs help
Steve
(This used to be commit b9d2da4d10e6e7ac2dc604565c7f2ce39d0916b5)
2008-01-03 17:13:38 -06:00
Jeremy Allison
06f80cf8be We may use 127k read/write for encrypted connections.
Jeremy.
(This used to be commit 656c9d0844e3d9d87ae768fe5a5538759b94d953)
2007-12-30 18:05:33 -08:00
Jeremy Allison
f04daa682a Fix error message.
Jeremy.
(This used to be commit a0494b115b644c1c4afa50442c46a54779687571)
2007-12-29 22:42:20 -08:00
Jeremy Allison
6d9b2439d2 Added -e, --encrypt option to smbclient that immediately
forces encrypted smb after initial connect. Will document
for 3.2 official release.
Jeremy.
(This used to be commit f02bf419282419950471deae74c4a6fe1543ed26)
2007-12-29 22:39:52 -08:00
Jeremy Allison
afce2b245a Add the capability to set "smb encrypt = required"
on a share (or global) and have the server reply with
ACCESS_DENIED for all non-encrypted traffic (except
that used to query encryption requirements and set
encryption state).
Jeremy.
(This used to be commit d241bfa57729bb934ada6beabf842a2ca7b4f8a2)
2007-12-27 23:51:03 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601af787731f0737b8627450018902b104)
2007-12-26 17:12:36 -08:00
Volker Lendecke
bea1659911 Remove next_token_nr_talloc and its associated global
Only client.c and clitar.c used this, I think they should carry the static
themselves. Also move the a bit funny routine toktocliplist to clitar.c, the
only place where it is used.
(This used to be commit 86d9412611fd99c21e15c71d30a3f95e35d8535b)
2007-12-21 09:58:20 +01:00
Volker Lendecke
042201bcc1 Fix a "no prototype" warning
(This used to be commit e5bd32812dd1e864e51c2199fd90d71813517f68)
2007-12-19 20:48:45 +01:00
Rishi Srivatsavai
bf2c5e2bde Add smbclient support for basic mDNS browsing.
Patch from Rishi Srivatsavai (bugzilla #4150), with tallocification
and minor syle changes by me.
(This used to be commit db74b99d0ef1a60894c838b4c9d0d454db6cf620)
2007-12-17 22:09:09 -08:00
Simo Sorce
d20608c8f3 Merge in J.Layton patch and resolve conflict.
(This used to be commit 6b1a118eaaab405eeef0cf3c0488a2747af562ba)
2007-12-17 09:43:18 -05:00
Karolin Seeger
6a364ce330 Revert smbclient changes.
Patch broke option -p.
Sorry for breaking the build!

Karolin
(This used to be commit 81dab4145ffaf21d5d2176b16b5989f4035dd791)
2007-12-14 12:08:30 +01:00
Karolin Seeger
4d7a337d52 Make smbclient to display error message and usage in the case of invalid options.
(This used to be commit 04131b26de08b3cea948ef89921c56561d69dd1d)
2007-12-14 11:20:27 +01:00
Jeremy Allison
138333ed1f We don't need to call endpwent if we never call getpwent.
Jeremy.
(This used to be commit 27078d1292e8588956ae78e4cddb1bcebbe84478)
2007-12-13 17:25:26 -08:00
Jeremy Allison
03ccaab05f Add a varient of Steve Langasek <vorlon@debian.org> patch
for bug #4780. Cause user mounts to inherit uid= and gid= from the
calling user when called as non-root, except when overridden on the
commandline.
Jeremy.
(This used to be commit 7fad5f38ea86ef76dc8e0853926b3248230616be)
2007-12-13 17:18:48 -08:00