summaryrefslogtreecommitdiffstats
path: root/source3/client
Commit message (Collapse)AuthorAgeFilesLines
* Fix all warnings in source3 with gcc4.3.Jeremy Allison2008-12-311-5/+12
| | | | Jeremy.
* Fix more asprintf and "ignoring return code" warnings from gcc 4.3.Jeremy Allison2008-12-311-24/+36
| | | | Jeremy.
* Make smbclient "put" use cli_pushVolker Lendecke2008-12-191-37/+31
| | | | | This should fill the TCP socket even beyond the smbclient io_bufsize, very much like smbclient "get" should do it since 3.2
* Remove the global "cmdline_auth_info" from source3/lib/util.cVolker Lendecke2008-12-141-14/+26
| | | | This involves changing all our clients, that's why it's so large.
* mount.cifs: allow mounts to ipv6 capable serversJeff Layton2008-12-121-101/+120
| | | | | | | | | | The current name resolution scheme in mount.cifs is IPv4 only. Expand it to be protocol-independent. Also take advantage of the fact that getaddrinfo() returns a list of addresses and have mount.cifs try each in turn until it hits one that's reachable and allows the socket to connect. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* mount.cifs: if mount user not specified use USER environment variableSteve French2008-12-051-1/+7
| | | | | | | | | | | | | smbfs also would use the USER environment variable if the user was not specified on the mount command and no credential file specified, and mount.cifs man page says that we will use this environment variable (in most cases this will not cause a behavior change, because we were doing getuid of the current process which will usually be the same name). Fixes Samba bug #5934 Acked-by: Jeff Layton
* s3: Change sockaddr util function names for consistencyTim Prouty2008-12-031-1/+1
| | | | Also eliminates name conflicts with OneFS system libraries
* mount.cifs: use lock/unlock_mtab scheme from util-linux-ng mount progJeff Layton2008-11-064-67/+309
| | | | | | | | | | | | | | | | The util-linux-ng sources have a good, but rather complex scheme for locking the mtab before updating it. Mount helpers need to follow the same scheme. Advisory locking only works if everyone is using the same locking scheme. Copy the routines we need from util-linux-ng into a separate source file and then have mount.cifs and umount.cifs link in this object. The long term goal is to have these routines in a separate helper library (libmount). Mount helpers can then dynamically link in that lib. Until that happens, this should serve as a suitable stopgap solution. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* Fix CID: 456 - resource leak on function exit.Jeremy Allison2008-10-291-0/+13
| | | | Jeremy.
* Make use of a large buffer for smbclient put commandVolker Lendecke2008-10-231-0/+3
|
* Use separate make variables for libutil and libcrypto.Jelmer Vernooij2008-10-182-4/+4
|
* Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij2008-10-142-22/+22
|
* mount.cifs: make return codes match the return codes for /bin/mount (try #3)Jeff Layton2008-10-091-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>
* mount.cifs: have uppercase_string return success on NULL pointerJeff Layton2008-10-091-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>
* Fix the build farm. In this branch cli_echo returns NTSTATUS.Jeremy Allison2008-10-031-1/+4
| | | | Jeremy
* Correctly fix smbclient to terminate on eof from server.Jeremy Allison2008-10-031-2/+11
| | | | Jeremy.
* Attempt to fix bug 5778Volker Lendecke2008-09-211-0/+10
| | | | Jeff, Steve, please check!
* Fix display of POSIX ACLs.Timur2008-09-151-2/+2
|
* mount.cifs: make local versions of strlcat and strlcpy staticJeff Layton2008-09-121-2/+2
| | | | | | | ...to silence -Wmissing-prototypes Signed-off-by: Jeff Layton <jlayton@redhat.com> (This used to be commit fc7c71f15b39158ac58beaa90cc9038db680b8cb)
* cifs.upcall: make most functions static and silence compiler warningsJeff Layton2008-09-121-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> (This used to be commit f0ee2c145fa031f91c28a69a44b7652f18eea0f0)
* Use the given name, not the absolute pathname, when printing out ACL info.Jeremy Allison2008-09-111-1/+1
| | | | | | Make this match the non-ACL case. Jeremy. (This used to be commit e695c1cc2b715afd713595e8daa77910d9f04138)
* Fix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu ↵Jeremy Allison2008-09-111-1/+1
| | | | | | | | <fumiyas@osstech.co.jp>. Fix for smbclient and libsmbclient. Jeremy. (This used to be commit dbd5d6b145528527a614c6207d81a6c955e57461)
* Clarify usage of "force create mode".Jeremy Allison2008-08-281-1/+1
| | | | | Jeremy. (This used to be commit 1d252ffd313e0cd6fcb3d7cb2c99f2daf56728c1)
* Add async smbecho client supportVolker Lendecke2008-08-281-4/+6
| | | | (This used to be commit c1d645fbe39433541d8bfe6b818c855cee318dc5)
* mount.cifs: unclear error message with "credentials"Steve French2008-08-271-2/+3
| | | | | Thanks to Christophe Curis for the suggestion (This used to be commit 3b5ad9190d2ad6d2ca0a569194bdff9003bda13b)
* cifs.upcall: bump SPNEGO msg version number and don't reject old versionsJeff Layton2008-08-222-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> (This used to be commit b868463015dedc684eb13d12118a98ccca71250a)
* cifs.upcall: fix build warningJeff Layton2008-08-211-1/+2
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> (This used to be commit aa3443492c58a7c109fe159e15d763dbafc66f2a)
* 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> (This used to be commit 6287e13b34efeaa8fd94c7c6d99468350ce6172e)
* mount.cifs: don't prompt for password on krb5 mountsJeff Layton2008-08-211-1/+2
| | | | | | | | | | krb5 mounts require that the user already have a valid krb5 ticket. Since we can't currently use the password entered, don't prompt for it. Also, switch to using strncmp instead of strcmp here. Signed-off-by: Jeff Layton <jlayton@redhat.com> (This used to be commit c75791c34abebe23c6f6a5534b0358514ec4eabc)
* 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 (This used to be commit 250f5a40d6e80305220d7cdc6a8f8459d8d0de74)
* cifs.upcall: negatively instantiate keys on errorJeff Layton2008-08-121-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> (This used to be commit f760dd3f3128c846cdeab16cc52bbb5189427955)
* Fix bug #5675 with a varient of Tim Waugh's patch,Jeremy Allison2008-08-071-1/+1
| | | | | | as proposed by James Peach. Jeremy. (This used to be commit 5c27ad75836136c39774c9456d63f46fa62e281f)
* Building cifs.upcall is giving this build warning:Steve French2008-08-051-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> (This used to be commit 148a012421cdd875167e708c5dfa771d97bf9856)
* cifs.upcall: fix manpage and commentsSteve French2008-08-051-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(-) (This used to be commit 24a93d03c2ca4e718968e2024604e0f398c96659)
* Backing out most of changeset 5222b8db3fb692e5071bfd1b41849a8eb0a17995Steve French2008-08-051-2/+5
| | | | | | | | | | | | | | | | | | (so parsing for domain parameter in mount.cifs matches online help) and rephrasing original code to make it more clear. The check for "domain" was meant to allow for "dom" or "DOM" and the option ("dom") described in the help (e.g. "/sbin/mount.cifs -?") is the shorter ("dom") form. The reason that the string we compare against is larger was to improve readability (we could compare against "dom" but note /* "domain" or "DOMAIN" or "dom" or "DOM" */ but it seemed terser to just show the larger string in the strcmp target. The change to "workgoup" from workg* (anything which begins with "workg" doesn't matter - it is a minor behavior change - but probably few scripts depend on the "alias" for this option). Rework code so that it is clearer what we are comparing against. (This used to be commit 92fad0fc537e75c726d5d6794dd0c4fd61edca2d)
* cifs.upcall was not recognizing the newer name "dns_resolver" key typeSteve French2008-07-241-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 (This used to be commit 22c36b27c60193102b3153e073216865adb1b6c1)
* cifs.upcall: fix compile warningSteve French2008-07-231-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> (This used to be commit 4b8362f9777debd21c47154e786b7017fbf847f7)
* Refactoring: Change calling conventions for cli_rpc_pipe_open_noauthVolker Lendecke2008-07-201-2/+3
| | | | | Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS (This used to be commit 9abc9dc4dc13bd3e42f98eff64eacf24b51f5779)
* This patchset comprises a number of cleanups for the cifs upcallJeremy Allison2008-07-161-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. This set should apply cleanly to the 3.3 test branch. Signed-off-by: Jeff Layton <jlayton@redhat.com> Jeremy. (This used to be commit c633f10d9e78327664e6bca51f66756bcf0505a6)
* Fix bug #5578, reported by sendel2000@hotbox.ru. Bad (non-Samba) use of ↵Jeremy Allison2008-07-021-0/+3
| | | | | | | strlcat gives error. Jeremy. (This used to be commit d7c82997bdcf1acd7ac104efa0ad05e0b94935ea)
* Fix two IBM checker warningsVolker Lendecke2008-06-271-2/+2
| | | | | | | | | Steve, please check! Thanks, Volker (This used to be commit 5222b8db3fb692e5071bfd1b41849a8eb0a17995)
* Fix a brown paper bag segfault in clitarVolker Lendecke2008-06-172-2/+2
| | | | | | | | Thanks to "No Body is Perfect" from gmail, whoever that is :-) Volker (cherry picked from commit 679d8dfa390601f777bfb43c02cd921eae5edcf4) (This used to be commit b8e1d62b8e8f724b855c8ab9801abee0b2791e36)
* Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into ↵Jeremy Allison2008-05-301-1/+1
|\ | | | | | | | | | | v3-3-test (This used to be commit 3d01248f63d0d476c16236453983ffe759d0b2c2)
| * Security fix for CVE-2008-1105: Boundary failure when parsing SMB responsesJeremy Allison2008-05-281-1/+1
| | | | | | | | | | | | can result in a buffer overrun. Jeremy. (This used to be commit 23b825e9d2c74c5b940cf4d3aa56c18692259972)
* | From Michael R Sweet <mike@easysw.com>.Jeremy Allison2008-05-301-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. (This used to be commit 9f5897e28dfa0d0563cd2568b4bedc601681e41b)
* Remove stuff from client_proto.hVolker Lendecke2008-05-251-404/+0
| | | | (This used to be commit c1e115964b671802a4af5beab3ad3222ee17b9c0)
* rpc_client: use endpoint mapper to get the port for rpc_pipe_open_tcp().Michael Adam2008-05-221-1/+0
| | | | | Michael (This used to be commit f7db445c828c0eef2c08b538bd07d485dc248689)
* client: Fix the proto header to fix the build.Kai Blin2008-05-221-1/+1
| | | | (This used to be commit 9e39ac1cc31d48db968e79c4698901e079007ff7)
* smbclient: freeze client_proto.h from "make proto"Michael Adam2008-05-181-0/+457
| | | | | Michael (This used to be commit f8c0710165ee1ede46d7ed34daa5564d20d3f069)
* Fix client authentication with -P switch in client tools (Bug 5435).Günther Deschner2008-05-051-0/+5
| | | | | Guenther (This used to be commit d077ef64cd1d9bbaeb936566c2c70da508de829f)