summaryrefslogtreecommitdiffstats
path: root/source/libsmb
Commit message (Collapse)AuthorAgeFilesLines
* s3/libsmb: Fix typo in error message.Karolin Seeger2009-06-171-1/+1
| | | | | | | | Thanks to Herb Lewis <hlewis [at] panasas.com> for noticing! Was commit 095f66b0 in master. Karolin
* s3-credentials: protect netlogon_creds_server_step() against NULL creds.Guenther Deschner2009-05-191-0/+4
| | | | | | Found by SCHANNEL torture tests. Guenther
* When doing a cli_ulogoff don't invalidate the cnum, invalidate the vuid.Jeremy Allison2009-04-161-1/+1
| | | | Jeremy.
* [Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errnoDerrell Lipman2009-03-273-1/+15
| | | | | | | | | | | | Fixed. It turns out there were a number of places where cli_resolve_path() was called and the error path upon that function failing did not set errno. There were a couple of places the failure handling code did set errno to ENOENT, so I made them all consistent, although I think better errno choices for this condition exist, e.g. EHOSTUNREACH. Derrell
* s3: parse_packet can return NULL which is then dereferenced in ↵Tim Prouty2009-03-261-0/+4
| | | | match_mailslot_name
* Fix two memleaks in the encryption codeVolker Lendecke2009-03-241-1/+2
| | | | | | | | | | ntlmssp_seal_packet creates its own signature data blob, which we then have to free. Jeremy, please check and merge appropriately (Yes, I'm asking you to do the janitor work, I want you to *look* at this :-)) Volker
* s3:dsgetdcname: use parentheses in if condition to make negation clearBjörn Jacke2009-03-241-1/+1
| | | | | Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 87b428e424e2e3cca975ecd0efed327e72950a1d)
* s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).Günther Deschner2009-03-201-12/+18
| | | | | | Guenther (cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c) (cherry picked from commit 3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7)
* s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requestsStefan Metzmacher2009-03-191-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Before we send the secondary requests we need to remove the old mid=>seqnum mapping and reset cli->mid and make the new mid=>seqnum mapping "persistent". The bug we had in cli_send_trans was this: The first cli_send_smb() incremented cli->mid and the secondary requests used the incremented mid, but as cli->outbuf still had the correct mid, we send the correct mid to the server. The real problem was that the cli_send_smb() function stored the seqnum under the wrong mid. cli_send_nttrans() was totally broken and now follows the same logic as cli_send_trans(). The good thing is that in practice the problem is unlikely to happen, because max_xmit is large enough to avoid secondary requests. metze (cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b) (cherry picked from commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3) (cherry picked from commit d01cca5e3ddb925696d49a1ea728013ec1032372)
* Allow DFS client paths to work when POSIX pathnames have beenJeremy Allison2009-03-181-2/+12
| | | | | selected (we need to path in pathname /that/look/like/this). Jeremy.
* Fix a malloc/talloc mismatch when cli_initialise() failsVolker Lendecke2009-03-151-1/+1
|
* Gah, typo :-(. Sorry.Jeremy Allison2009-02-181-1/+1
|
* Fix coverity CID-602. Possible use of uninitialized var.Jeremy Allison2009-02-181-1/+1
| | | | Jeremy.
* Don't miss an absolute pathname as a kerberos keytab path. From Glenn Machin ↵Jeremy Allison2009-02-171-0/+5
| | | | | | <gmachin@sandia.gov>. Jeremy.
* Probably fixes a crash during name resolution when log level >= 10Ted Percival2009-02-031-1/+1
| | | | | and libc segfaults if printf is passed NULL for a "%s" arg (eg. Solaris).
* Fix a valgrind error when the socket diesVolker Lendecke2009-01-281-2/+3
| | | | | Don't reference anything that might have been deleted in the async_req_error call.
* Determine case sensitivity based on file system attributes.Derrell Lipman2009-01-173-11/+78
| | | | | | | | | | - Most of the time, we can determine from the file system we're connecting to whether it supports case sensitivity. In those cases, we now set the internal case sensitivity flag automatically. For those cases where the request to retrieve file system attributes fails, we'll use the user-specified option value. Derrell
* [Bug 6022] smbc_urlencode and smbc_urldecode were not exportedDerrell Lipman2009-01-162-5/+5
| | | | | | | | | | - Since the revamp of libsmbclient, there has still been an external declaration for smbc_urlencode and smbc_urldecode in libsmbclient.h, yet those functions were renamed and made private. The two choices were to remove the function names from libsmbclient.h or to make them public again. The reported requested that they be public. This commit makes it so. Derrell
* Treat file names in POSIX-like case-sensitive fashion by defaultDerrell Lipman2009-01-163-1/+23
| | | | | | | | | | | | | | | *** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! *** - libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default, it requests case-sensitive, but the old behavior of case-insensitive can be requested with smbc_setOptionCaseSensitive(context, False); The change of behavior is considered a bug fix, as it was previously possible to accidentally overwrite a file that had the same case-insensitive name but a different case-sensitive name as a previously-existing file, while creating a new file. Derrell
* Fix a segfault if ? is there but the options are NULL. This is the case if ↵Andreas Schneider2009-01-161-1/+1
| | | | SMBC_parse_path is called by SMBC_stat_ctx.
* s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp casesStefan Metzmacher2009-01-121-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | SMB signing works the same regardless of the used auth mech. We need to start with the temp signing ("BSRSPYL ") and the session setup response with NT_STATUS_OK is the first signed packet. Now we set the krb5 session key if we got the NT_STATUS_OK from the server and then recheck the packet. All this is needed to make the fallback from krb5 to ntlmssp possible. This commit also resets the cli->vuid value to 0, if the krb5 auth didn't succeed. Otherwise the server handles NTLMSSP packets as krb5 packets. The restructuring of the SMB signing code is needed to make sure the krb5 code only starts the signing engine on success. Otherwise the NTLMSSP fallback could not initialize the signing engine (again). metze (cherry picked from commit 7d9fd64f38aa5821b38c1223cf87979fc87bfb71) (cherry picked from commit 8e29070ccd0b5103af2e6da75644169f46700313)
* Fix bug #6021 - smbclient du command does not recuse properlyJeremy Allison2009-01-081-1/+2
| | | | Jeremy.
* Attempt to fix bug 5953: Make cli_send_smb_direct_writeX use writevVolker Lendecke2008-12-291-27/+13
| | | | | | It seems there are SMB servers around which can't cope with the write header being sent in a packet of its own. With writev we keep the advantage of direct writes, giving the kernel the chance to coalesce the write calls.
* Fix a valgrind errorVolker Lendecke2008-12-171-1/+2
| | | | | | | | | | Reported by naga_kishore_kommuri@yahoo.com Derrel, please check! Thanks, Volker
* (Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new ↵Kai Blin2008-12-161-4/+5
| | | | segmentation fault (with NAS-BASIC server).
* Revert "Final part of fix for bug #5953 - smbclient crashes: cli_list_new ↵Jeremy Allison2008-12-161-24/+683
| | | | | | | | segmentation fault (with NASBASIC server)." Error in commit ! This reverts commit 10e7d6b428c6e44f8b95c2794154dc1bfe4bde2d.
* Final part of fix for bug #5953 - smbclient crashes: cli_list_new ↵Kai Blin2008-12-161-683/+24
| | | | segmentation fault (with NASBASIC server).
* commit b520befe6f51644d20434add9864d7a2fa30aa2eSATOH Fumiyasu2008-12-161-6/+4
| | | | | | | | | | | | | Author: SATOH Fumiyasu <fumiyas@osstech.co.jp> Date: Wed Dec 17 00:42:25 2008 +0900 libsmbclient: Fix SIGBUS on non-x86 CPUs We must align the struct smbc_dirent in the struct SMBC_internal_data because the struct smbc_dirent has numeric values that require alignment. Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
* s3:dsgetdcname: retry with the clients siteStefan Metzmacher2008-12-131-6/+43
| | | | | | metze (cherry picked from commit 1b7b0e924f3064a9774fd5d46bedc3d342b39ddb) (cherry picked from commit f7a811f2ae3572791035014b6e20410b07ea011e)
* s3:libsmb/namequery.c: add saf_join_store() functionStefan Metzmacher2008-12-131-3/+65
| | | | | | | | | | | | | | saf_join_store() should be called after a successful domain join, the affinity to the dc used at join time has a larger ttl, to avoid problems with delayed replication. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 80e74a27c55c01221091e3eec930c2ac4433c22c) (cherry picked from commit 895c40d03a07182c054a6fd857e7dd6838e698f4) (cherry picked from commit 7b56268b3c9652e3089bd75e4e51dd626fa742a6)
* s3: libsmb/namequery: fallback to returning all dcs, when none is available ↵Stefan Metzmacher2008-12-131-0/+9
| | | | | | | | | | | | | | | | in the requested site It could happen that all dcs in a site are unavailable (some sites have only one dc) and then we need to fallback to get all dcs. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit c127367b1dd622eeceb1f47de0a047c297dda222) (cherry picked from commit 0c43f96330f2935805ba4f0f8f858a027a90bc4c) (cherry picked from commit caaf59383ceabdc555f7db098dae0455dea65023)
* Fix bug #5953 - smbclient crashes: cli_list_new segmentation fault.Jeremy Allison2008-12-081-1/+1
| | | | | Karolin: must be in 3.2-stable. Thanks, Jeremy.
* Fix for crash bug freeing a non-malloc'ed buffer if the client sends a ↵Volker Lendecke2008-12-051-0/+7
| | | | non-encrypted packet with the crypto state set.
* Change sockaddr util function names for consistency and to eliminate name ↵Tim Prouty2008-12-035-13/+13
| | | | conflicts
* libsmb: Fix up pointer passed to cli_send_trans in cli_link_internalKai Blin2008-11-181-1/+1
| | | | | Seems like this one fell victim to the pstring removal. The other callers seem to be fine, even though removing the casts would make the code less confusing.
* fix build warning.Günther Deschner2008-11-141-2/+5
| | | | | | Guenther (This used to be commit 507660706901a79544d436046127947e4baa7e52) (cherry picked from commit 1939177582867fb54a416f3ea979ebd8d4335885)
* Error return is boolean false, not -1Derrell Lipman2008-10-241-3/+3
| | | | | | | | | | | | - There were a few places in SMBC_getatr() that returned -1 instead of a boolean. -1 was intended to mean error, but that's what False/false is for, and the usages of this function assume that it returns a boolean false as the error condition. - per Jelmer's request, use false vs. False in new code, even if not making changes globally. Derrell
* Fix an uninitialized variable warningVolker Lendecke2008-10-051-0/+2
| | | | Not sure if we can ever not get domain and dns_domain, but gcc complained
* Fix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu ↵Jeremy Allison2008-09-111-34/+55
| | | | | | | <fumiyas@osstech.co.jp>. Fix for smbclient and libsmbclient. Jeremy.
* Fix blocker bug 5745 kerberos authentication with (lib)smbclient is broken.Jeremy Allison2008-09-101-8/+13
| | | | Jeremy.
* Do proper error handling if the socket is closedVolker Lendecke2008-09-051-2/+8
| | | | | | | | This is a step in fixing bug 5707. Thanks to Igor Galić <i.galic@brainsware.org> for reporting! Volker
* Correct the netsamlogon_clear_cached_user function.Ephi Dror2008-08-271-36/+18
|
* Fix Bug #5710 and make machine account password changing work again.Günther Deschner2008-08-211-23/+52
| | | | | | | | | When we negotiated NETLOGON_NEG_PASSWORD_SET2 we need to use NetrServerPasswordSet2 to change the machine password. Tested with NT4, W2k, W2k3 and W2k8. Guenther
* Fix length error in wrapping spnego blob. Karoling this needs to be in 3.2.2 ↵Igor Mammedov2008-08-181-1/+1
| | | | (sorry).
* Prevent NT_STATUS 0xF1000000 errors from appearing whenJim McDonough2008-08-131-0/+6
| | | | | | dos errors are used and there is no error. It should be mapped directly to NT_STATUS_OK. smbclient to older servers didn't work.
* Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.Jeremy Allison2008-08-121-22/+16
| | | | | | | | | Here is a patch to allow many subsystems to be re-initialized. The only functional change I made was to remove the null context tracking, as the memory allocated here is designed to be left for the complete lifetime of the program. Freeing this early (when all smb contexts are destroyed) could crash other users of talloc. Jeremy.
* fix build warning.Günther Deschner2008-08-111-1/+1
| | | | Guenther
* One more build fix. Ensure we have KRB5_AUTH_CONTEXT_USE_SUBKEY defined ↵Jeremy Allison2008-08-081-3/+3
| | | | | | before we compile the new code. Jeremy.
* Try and fix the build for systems that don't have ↵Jeremy Allison2008-08-081-3/+3
| | | | | | krb5_auth_con_set_req_cksumtype(). Jeremy.
* Add Derrick Schommer's <dschommer@F5.com> kerberos delegation patch. SomeJeremy Allison2008-08-082-3/+185
| | | | | work by me and advice by Love. Jeremy.