summaryrefslogtreecommitdiffstats
path: root/source/client
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Correctly fix smbclient to terminate on eof from server."Karolin Seeger2008-11-171-11/+2
| | | | This reverts commit 28fa519a80bfcd30737a51ad157d134322c1fed9.
* Revert "Attempt to fix bug 5778"Karolin Seeger2008-11-171-10/+0
| | | | This reverts commit ecc67001315111493738e893917c4550be7828a1.
* Revert "mount.cifs: have uppercase_string return success on NULL pointer"Karolin Seeger2008-11-171-2/+2
| | | | This reverts commit 3f4cdabc965f824b70891f6a6bcb29e5f9b579e5.
* Revert "mount.cifs: make return codes match the return codes for /bin/mount ↵Karolin Seeger2008-11-171-46/+36
| | | | | | (try #3)" This reverts commit 98bcd52a568c274707cc6ccb9071d07a8bfca1ca.
* mount.cifs: make return codes match the return codes for /bin/mount (try #3)Jeff Layton2008-10-151-36/+46
| | | | | | | | | | | | | | The manpage for /bin/mount specifies that the return code should be a positive integer (actually, it's a bitfield). Clean up the return codes from mount.cifs to make them match the expected return values from /bin/mount. This necessary for proper integration with autofs. This is the third attempt at this patch. The changes here are minor, just changing some return's from main() into exit() calls for consistency's sake. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 2374799c8114ae3ed422d1cbe4ca12c4fd075274)
* mount.cifs: have uppercase_string return success on NULL pointerJeff Layton2008-10-151-2/+2
| | | | | | | | | We currently don't attempt to uppercase the device portion of the mount string if there isn't a prefixpath. Fix that by making uppercase_string return success without doing anything on a NULL pointer. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 34b5cfe8a0cb8674da0c5ac7d81b6e64160ccaa2)
* Attempt to fix bug 5778Volker Lendecke2008-10-061-0/+10
| | | | | | Jeff, Steve, please check! (cherry picked from commit 110756cc7bcaed5a9d6aa58f3b3fe4481f8d1f31) (cherry picked from commit 46b050e525b339fbac68329f668e47ebd11b3e08)
* Correctly fix smbclient to terminate on eof from server.Jeremy Allison2008-10-061-2/+11
| | | | | Jeremy. (cherry picked from commit 4dc2eb7f42bad6812d21bf4577e2901b04a5ca83)
* Fix display of POSIX ACLs.Timur2008-09-161-2/+2
| | | | (cherry picked from commit faa732c245c9296ff4cd4a56f353c3d5d1b0d202)
* mount.cifs: make local versions of strlcat and strlcpy staticJeff Layton2008-09-151-2/+2
| | | | | | | ...to silence -Wmissing-prototypes Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit b08f07f84e448e56116b84ba5fa59b211e584822)
* cifs.upcall: make most functions static and silence compiler warningsJeff Layton2008-09-151-7/+11
| | | | | | | | ...to silence -Wmissing-prototypes and some uninit'ed variable warnings. Thanks to GD for the extra-paranoid compiler flags. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit bc5274eb66ebe40aea3ab917a20f2f353172ca93)
* Use the given name, not the absolute pathname, when printing out ACL info.Jeremy Allison2008-09-151-1/+1
| | | | | | Make this match the non-ACL case. Jeremy. (cherry picked from commit 1ca6239b9f67caafed50db5f284df00c5988ba03)
* Fix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu ↵Jeremy Allison2008-09-151-1/+1
| | | | | | | | <fumiyas@osstech.co.jp>. Fix for smbclient and libsmbclient. Jeremy. (cherry picked from commit 71d00ef2888834ebed2a387a111a95bac1d227ad)
* mount.cifs: unclear error message with "credentials"Steve French2008-08-281-2/+3
| | | | | Thanks to Christophe Curis for the suggestion (cherry picked from commit a122df5dc01ed9767c53d77a73aabd44f7c8a7ca)
* cifs.upcall: bump SPNEGO msg version number and don't reject old versionsJeff Layton2008-08-282-3/+3
| | | | | | | | | | | | | When we added the ability for the kernel to send sec=mskrb5 to the upcall, we subtly broke old cifs.upcall versions that don't understand it. Bump the spnego message version to 2 to make this clear. Also, change cifs.upcall to not reject requests with a version that's lower than the current one, and to send the reply with the same version that the request sent. The idea is to try and keep cifs.upcall backward compatible with old kernels. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 2744bcbf3f22102911b5a3c4676e7d2f970a86eb)
* cifs.upcall: fix build warningJeff Layton2008-08-281-1/+2
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit dffb2d8eea03bb75224c3d8b4d0ab210993c645a)
* cifs.upcall: handle MSKRB5 OID properlyJeff Layton2008-08-281-5/+13
| | | | | | | | | | | When the kernel sends the upcall a sec=mskrb5 parameter, that means the the MSKRB5 OID is preferred by the server. This patch fixes the upcall to use that OID in place of the "normal" krb5 OID when it gets a sec=mskrb5 parameter. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve French <smfrench@gmail.com> (cherry picked from commit 3d96409c115b3ad4ef29ff75e40b39a26e316afe)
* Revert "cifs.upcall: handle MSKRB5 OID properly"Karolin Seeger2008-08-271-13/+5
| | | | This reverts commit 64ebfe4b2e5b7e3e07a0af424b35000693148e48.
* Revert "cifs.upcall: fix build warning"Karolin Seeger2008-08-271-2/+1
| | | | This reverts commit b3a8b823361d6144f14c2d800e956f26ff9ad6d6.
* cifs.upcall: fix build warningJeff Layton2008-08-221-1/+2
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit dffb2d8eea03bb75224c3d8b4d0ab210993c645a)
* cifs.upcall: handle MSKRB5 OID properlyJeff Layton2008-08-211-5/+13
| | | | | | | | | | | When the kernel sends the upcall a sec=mskrb5 parameter, that means the the MSKRB5 OID is preferred by the server. This patch fixes the upcall to use that OID in place of the "normal" krb5 OID when it gets a sec=mskrb5 parameter. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve French <smfrench@gmail.com> (cherry picked from commit 3d96409c115b3ad4ef29ff75e40b39a26e316afe)
* cifs.upcall: negatively instantiate keys on errorJeff Layton2008-08-181-2/+10
| | | | | | | | | | | | | | | When a request-key upcall exits without instantiating a key, the kernel will negatively instantiate the key with a 60s timeout. Older kernels, however seem to also link that key into the session keyring. This behavior can interefere with subsequent mount attempts until the key times out. The next request_key() call will get this negative key even if the upcall would have worked the second time. Fix this by having cifs.upcall negatively instantiate the key itself with a 1s timeout and don't attach it to the session keyring. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 7e05ff65a7907bf34e2d422f7c941002cfb86971)
* Building cifs.upcall is giving this build warning:Steve French2008-08-181-1/+1
| | | | | | | | | | client/cifs.upcall.c:205: warning: function declaration isn’t a prototype This patch fixes this by properly declaring usage() args as void. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@samba.org> (cherry picked from commit 7b25c4d2363ee772eed44174c882a7fbc59f0568)
* cifs.upcall: fix manpage and commentsSteve French2008-08-181-4/+4
| | | | | | | | | | | | | The "cifs.resolver" key type has been changed to "dns_resolver". Fix the comments at the top of cifs.upcall and the manpage accordingly. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@samba.org> --- docs-xml/manpages-3/cifs.upcall.8.xml | 4 ++-- source/client/cifs.upcall.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (cherry picked from commit 34cf3c012e463d0ea04616308738aadea438f48b)
* cifs.upcall was not recognizing the newer name "dns_resolver" key typeSteve French2008-08-181-1/+2
| | | | | | | | (as a synonym for the older "cifs.resolver" name) when resolving host names to ip addresses for the kernel. Acked-by: Jeff Layton (cherry picked from commit 370722392d7f42f8094f574cac08a6a12e5893a3)
* cifs.upcall: fix compile warningSteve French2008-08-181-3/+3
| | | | | | | | | | | | | | | | | Steve French noticed these warnings when building cifs.upcall: Compiling client/cifs.upcall.c client/cifs.upcall.c: In function 'usage': client/cifs.upcall.c:204: warning: declaration of 'prog' shadows a global declaration client/cifs.upcall.c:33: warning: shadowed declaration is here Change the usage function to not take and arg and have it just use the global "prog" variable. Fix a typo in the log message generated when an unknown option is specified. Also getopt() always returns '?' when it sees an unknown option so there's no point in printing it out. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit bd1cf48d7e20cb534bd672bacbf3ac4a87d1a7b4)
* This patchset comprises a number of cleanups for the cifs upcallJeremy Allison2008-08-181-11/+20
| | | | | | | | | | | | binary. The biggest change is that it renames it from cifs.spnego to cifs.upcall since the cifs.spnego name really isn't applicable anymore. It also fixes a segfault when the program is run without any args and adds a manpage. Comments and/or suggestions appreciated. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 1d88c3431a1abf5fe6527fcbdf43972607a317ee)
* smbspool: Fix printing on port 139.Karolin Seeger2008-08-141-1/+1
| | | | | | | | | | | This one was introduced with 8eff35bc. Thanks to Noèl Köthe for tracking that down! Karolin (cherry picked from commit 250f5a40d6e80305220d7cdc6a8f8459d8d0de74) (cherry picked from commit d7a50f1b22f5ccc5d027f8c2eeb73fa335d49f81) (cherry picked from commit 50d6d617e5b76c3566b719dffe0058c5a0599dd0) (cherry picked from commit 8e4f9b935f57f73c0f1a653ac02b59677c1192d1)
* Fix bug #5675 with a varient of Tim Waugh's patch,Jeremy Allison2008-08-111-1/+1
| | | | | | as proposed by James Peach. Jeremy. (cherry picked from commit 1ee1e8306f3578c19fe015145eb8da1013f7b820)
* Fix bug #5578, reported by sendel2000@hotbox.ru. Bad (non-Samba) use of ↵Jeremy Allison2008-07-061-0/+3
| | | | | | | strlcat gives error. Jeremy. (cherry picked from commit a93c7a2170124f24aac4063c853475ae3f6b0720)
* Fix a brown paper bag segfault in clitarVolker Lendecke2008-06-182-2/+2
| | | | | | | Thanks to "No Body is Perfect" from gmail, whoever that is :-) Volker (cherry picked from commit 679d8dfa390601f777bfb43c02cd921eae5edcf4)
* From Michael R Sweet <mike@easysw.com>.Jeremy Allison2008-05-311-1/+1
| | | | | | | | | | | All, Noticed that smbspool.c still has my Easy Software Products copyright on it. The following patch fixes it to match the other code I've contributed over the years... Jeremy. (cherry picked from commit d5ee3b19ebc7b19d7e02f3fb849dcec20fca476f)
* Security fix for CVE-2008-1105: Boundary failure when parsing SMB responsesJeremy Allison2008-05-301-1/+1
| | | | | | can result in a buffer overrun. Jeremy. (cherry picked from commit 353d9cb0fdd941781698c6b334db5f2997eef991)
* Fix client authentication with -P switch in client tools (Bug 5435).Günther Deschner2008-05-151-0/+5
| | | | | Guenther (cherry picked from commit d077ef64cd1d9bbaeb936566c2c70da508de829f)
* smbspool: Fix the smbspool build.James Peach2008-05-051-11/+15
| | | | (cherry picked from commit a51cb3c1a9549d74c1e5cf05bc43b955af1a25b7)
* smbspool: minor formatting cleanups.James Peach2008-05-051-88/+133
| | | | (cherry picked from commit 831a09ae25e98eacc0b0be5390d3ac3aa671a8a5)
* smbspool: Run indent to approximate conding standards.James Peach2008-05-051-533/+485
| | | | (cherry picked from commit 4244be792eeb69e883a1ece013b62fe6941086f2)
* smbspool: add my copyright.James Peach2008-05-051-0/+1
| | | | (cherry picked from commit b294b2055a422e1af59e3b6843b84750b6786d99)
* smbspool: Fix CUPS authentication protocol support.Mike Sweet2008-05-051-34/+75
| | | | | | | There were a couple of places where we weren't checking for authentication correctly. This chance fixes those places and properly supports Kerberos where available. (cherry picked from commit 8eff35bc4acc13807c895af43b52db79ee195cb5)
* smbspool: fix Kerberos support for CUPS 1.3.Mike Sweet2008-05-051-144/+87
| | | | | | | | | | | | | | | | | | | | | | | To summarize the changes, the patches remove the old (probably non- working) Kerberos support code which is unnecessary with CUPS 1.3 and adds some checks on the NT status we get back to see whether the connection error is related to authentication. If so, we send the ATTR: message to tell CUPS we need a username and password and return exit code 2 so cupsd will do the right thing. AUTH_USERNAME, AUTH_PASSWORD, and KRB5CCNAME are set and supported by CUPS 1.3. The new exit code is supported by CUPS 1.2.x and 1.3, and it treated as a general failure in CUPS 1.1. The ATTR: message is only supported by CUPS 1.3, while CUPS 1.2 will assume the "username,password" value we are setting. The current code only uses the AUTH_* env vars if they are set. If not, we fall back to the previous behavior. I really can't tell whether the Kerberos code that was in there would work at all. It did not work for Mac OS X which is why I dropped it. (cherry picked from commit 8c12c5cea01d9b801fe80c2a87b8139c488a62a5)
* Remove hard coded sizes.Jeremy Allison2008-05-051-3/+3
| | | | | Jeremy. (cherry picked from commit b9eec6e73fbcd0256d5cc507bb4434976d7133a0)
* Tidyup to ensure '\n' is treated identically in allJeremy Allison2008-05-051-0/+2
| | | | | | cases. Karolin please pull for 3.2-stable. Jeremy. (cherry picked from commit 92b5ff39b17e4d07e78c285991027745ad6e2e13)
* Fix bug #5434 found by Ted Percival <ted@midg3t.net>.Jeremy Allison2008-05-051-0/+2
| | | | | | | | Introduced by me in the strlcpy cleanup. Ensure the loaded password doesn't contain the '\n' at the end. Karolin - please pull for 3.2 stable ! Jeremy. (cherry picked from commit 0bdefa423fbb9469635f8e08c0a3f80a8996b1b6)
* Revert "mount.cifs: Zero mountpassword content before freeing."Volker Lendecke2008-04-281-24/+3
| | | | | This reverts commit d99a31848bd2172c15500dd61ce30fef963c1ac6. (cherry picked from commit 46614ca3eca67aee4c1ab699e85493f9832e4b37)
* mount.cifs: Zero mountpassword content before freeing.Karolin Seeger2008-04-251-3/+24
| | | | | Karolin (cherry picked from commit d99a31848bd2172c15500dd61ce30fef963c1ac6)
* Make mount.cifs.c consistent with other Samba code usage w.r.tJeremy Allison2008-04-251-69/+54
| | | | | | | | SAFE_FREE. Use #define constants not arbitrary numbers. Stevef please check. Karolyn, once Steve has checked please pull for 3.2-stable. Jeremy. (cherry picked from commit cc23f91d639db61903bf8b6c9fa46ec9c1f44178)
* Fix the problem when -L is used with IPv6 addresses. Don't try toJeremy Allison2008-04-231-0/+8
| | | | | | | connect on port 139 with IPv6. Found by David Holder @ Erion. Karolin please merge to 3.2-stable. Jeremy. (cherry picked from commit c003e66ff10b23bb30aef0071ba7a3ae9579174e)
* mount.cifs: fix several problems when mounting subdirectories of shares (try 2)Jeff Layton2008-04-011-24/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit e03d1dfdb80333c071b600245eb749ef5664aa22)
* Use rpccli_srvsvc_NetShareEnumAll in smbclient.Günther Deschner2008-03-311-15/+21
| | | | | Guenther (cherry picked from commit 1121633652ffb77dce8df9cc91b7dfc2d55fd348)
* More ssize_t->SMB_OFF_TVolker Lendecke2008-03-281-1/+1
| | | | (cherry picked from commit 8dd6458049d1b9d6849730ac19c39b049a68f302)