summaryrefslogtreecommitdiffstats
path: root/source3/libsmb
Commit message (Collapse)AuthorAgeFilesLines
* s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHTS_MAXIMUM_ALLOWED.Günther Deschner2009-04-281-1/+1
| | | | | | Guenther (cherry picked from commit b5bec1a6d73f5939b306e157937d027a7286163c) (cherry picked from commit c7d5e0a19057b6ad7301a390fc766bb438967eb2)
* When doing a cli_ulogoff don't invalidate the cnum, invalidate the vuid.Jeremy Allison2009-04-281-1/+1
| | | | | Jeremy. (cherry picked from commit be46b98ee38e17e4561ab58fe9b6ecc6b7919392)
* Fix a bug in smbclient not sending the correct called nameVolker Lendecke2009-04-151-1/+5
| | | | | | | | | | | | | | | Jeremy, I think the ability to say smbclient //foo/bar -I <ip-address> -p 139 making the called name to "foo" got lost with 3d2d0203. Was this removed deliberately? If so, please revert this patch. If not, please merge appropriately. Thanks, Volker (cherry picked from commit f13763ca4be49c08dfc533e39dd338b508ba4709)
* s3:kerberos Rework smb_krb5_unparse_name() to take a talloc contextAndrew Bartlett2009-04-151-11/+12
| | | | | | Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 574a6a8c350a4bab3f42f3f9cfb382db721d69b5) (cherry picked from commit 7e6d6eeff3e082d7223264c17cb27c2ab89df9aa)
* [Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errnoDerrell Lipman2009-04-153-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 (cherry picked from commit ebc4c0b50db16cdb11222c3d536a211bb86bcdfd)
* s3: parse_packet can return NULL which is then dereferenced in ↵Tim Prouty2009-04-151-0/+2
| | | | | | | match_mailslot_name (cherry picked from commit db5677d071fc58f38cab4ab800111455a8637edb) (cherry picked from commit 0f01296bbb08d75ce693a65ea6cb0df80c1b4927)
* Fix two memleaks in the encryption codeVolker Lendecke2009-04-151-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 (cherry picked from commit 17616dddfaa26688387f671c870873056896f6b7)
* s3:dsgetdcname: use parentheses in if condition to make negation clearBjörn Jacke2009-04-151-1/+1
| | | | | | Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 87b428e424e2e3cca975ecd0efed327e72950a1d) (cherry picked from commit a2e138419138a2f675f6370426a6caeda0a314b4)
* Fix connect to port 139 only -- thanks gd for bugging me :-)Volker Lendecke2009-04-151-4/+3
| | | | | (cherry picked from commit 298bff5019be5a40dc0023b5af1e980fba91abd9) (cherry picked from commit c96d0ffd944f536a1228812c761ba4fb4313ee05)
* s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).Günther Deschner2009-04-151-12/+18
| | | | | | Guenther (cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c) (cherry picked from commit 42a692da477d7986767ad90a15087aa8a2ebcb40)
* Fix crash in async_smb.cBo Yang2009-04-151-3/+6
| | | | (cherry picked from commit b20cace3a7c312f44f39390954bc087b888d9b27)
* s3:libsmb: always create bytes array in cli_trans codeStefan Metzmacher2009-04-151-5/+14
| | | | | | | | | | | Otherwise we return NO_MEMORY without a reason for fragmented trans requests, as talloc_append_blob() returns buf if we append a 0 length blob. When we pass buf = NULL we'll get back NULL and then assume NO_MEMORY... metze (cherry picked from commit 88dd6af605dc5754b7e146a068272d37651da710) (cherry picked from commit 5bbf96dd63227a19fe1f95ff8d8f2b3c75a5a497)
* s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requestsStefan Metzmacher2009-04-151-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)
* Allow DFS client paths to work when POSIX pathnames have beenJeremy Allison2009-04-151-2/+12
| | | | | | selected (we need to path in pathname /that/look/like/this). Jeremy. (cherry picked from commit 913d1f2af87fa449881a6fd2774a9dfdcb198fb4)
* s3: remove POLICY_HND.Günther Deschner2009-04-152-7/+7
| | | | | | Guenther (cherry picked from commit 531af136f9dd5c6050f78948837294aed02de440) (cherry picked from commit 91216ffa95b4ed53e54b11665e96b911cb4e4ab5)
* Remove the global "struct cm_cred_struct" and associated calls, makeJeremy Allison2009-04-156-168/+148
| | | | | | | | | | callers pass in a struct user_auth_info * instead. This commit causes smbc_set_credentials() to print out a message telling callers to use smbc_set_credentials_with_fallback() instead, as smbc_set_credentials() has a broken API (no SMBCCTX * pointer). No more global variables used in the connection manager API for client dfs calls. Jeremy. (cherry picked from commit 8b44877eb82c1c9270cb8099fefc621922f82719)
* Convert open_socket_out_defer to tevent_reqVolker Lendecke2009-04-151-22/+37
| | | | | (cherry picked from commit 20cee26a3dbd231672eec9133c6e84641def298d) (cherry picked from commit 1e08799f3c5bb7059f6d355b99f8617461c31d1a)
* Fix a malloc/talloc mismatch when cli_initialise() failsVolker Lendecke2009-04-151-3/+2
| | | | (cherry picked from commit 68456130ff23cb8139c9710fc674ca5b52230197)
* Remove pwd_cache.c, it was doing nothing. Make user_name, domain, andJeremy Allison2009-04-154-78/+95
| | | | | | password talloc'ed strings within the cli_struct. Jeremy. (cherry picked from commit 6be4bf17de47d1b468389de1225a72daa94e0119)
* Remove the static "struct client_connection" mess which is part ofJeremy Allison2009-03-123-113/+82
| | | | | | | | the problem that stops libsmbclient being thread safe. Subsidiary DFS connections are now hung off a list inside the cli_state struct. Much more to do in order to get libsmbclient to thread safety, but this is a good start. Jeremy.
* Revert "s3:libsmb: add an option to cli_push to let the caller provide the ↵Stefan Metzmacher2009-03-121-25/+8
| | | | | | | | | | | | | buffers" This reverts commit 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22. It's confusing to have a boolean to alter the behavior of cli_push and as the new feature isn't used yet I revert it. We can readd a extra function later. metze
* s3:libsmb: add an option to cli_push to let the caller provide the buffersStefan Metzmacher2009-03-101-8/+25
| | | | metze
* s3:libsmb: only treat a return 0 as end of fileStefan Metzmacher2009-03-101-4/+1
| | | | metze
* s3:libsmb: fix a lot of cli_push() bugsStefan Metzmacher2009-03-101-95/+107
| | | | | | | | | | | | There were the following problems: 1.) if window_size was a multiple of the chunk_size, we silently dropped the last truncated chunk. 2.) if window_size was 0 pushed only the first chunk to the server and silently dropped the rest. 3.) we had only transferred state->num_reqs writes, even if there would be more data to send. metze
* Fix a smbclient segfault against security=share serversVolker Lendecke2009-03-071-3/+10
|
* Fix some nonempty blank linesVolker Lendecke2009-03-071-22/+22
|
* s3:libsmb: merge cli_setup_signing_state() into cli_initialise_ex()Stefan Metzmacher2009-03-061-27/+25
| | | | metze
* s3:libsmb: remove cli_setup_signing_state() and add struct cli_state ↵Stefan Metzmacher2009-03-063-7/+10
| | | | | | | | *cli_initialise_ex() This prepares the next changes. metze
* s3:signing: the seqnum should only be decremented by 1 for ntcancel requestsStefan Metzmacher2009-03-061-2/+4
| | | | | | | | | [MS-SMB] 3.3.5.1 Receiving Any Message says that the seqnum is incremented by only for ntcancel requests for any other request it's by incremented by 2, even if it doesn't expect a response. metze
* s3:libsmb: smb signing works the same for extented and non-extended securityStefan Metzmacher2009-03-061-5/+18
| | | | | | This is only cosmetic, but it makes it easier to understand. metze
* Convert name_mangle() to use tallocVolker Lendecke2009-02-242-8/+32
|
* More warning fixes for Solaris.Jeremy Allison2009-02-231-1/+1
| | | | Jeremy.
* Make char* parameters constDerrell Lipman2009-02-231-16/+6
| | | | | | | | | | | | | - Use const in function signatures whenever appropriate, to help prevent errant scribbling on users' buffers. smbc_set_credentials() always acted as if its formal parameters were const char *, and changing the formal declaration to specify that should not cause any change to the ABI. It is still allowable to pass a writable buffer to a function which specifies that it will not write to the buffer. I'm making this change only in master. Derrell
* Remove the static "chal" from ntlmssp.c:get_challenge()Volker Lendecke2009-02-211-7/+5
|
* Move some bytes from the data to the text segmentVolker Lendecke2009-02-211-3/+3
|
* Change smbc_set_credentials_with_fallback() (unreleased) to useJeremy Allison2009-02-201-7/+14
| | | | | const approptiately. Jeremy.
* variable grouping: just my OCD desire to keep similar things togetherDerrell Lipman2009-02-201-5/+7
|
* Make libsmbclient work with DFSBo Yang2009-02-206-6/+96
| | | | Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
* s3: Add extid to the dev/inode pairTim Prouty2009-02-191-12/+27
| | | | | | | | | | | This extends the file_id struct to add an additional generic uint64_t field: extid. For backwards compatibility with dev/inodes stored in xattr_tdbs and acl_tdbs, the ext id is ignored for these databases. This patch should cause no functional change on systems that don't use SMB_VFS_FILE_ID_CREATE to set the extid. Existing code that uses the smb_share_mode library will need to be updated to be compatibile with the new extid.
* Interesting C compiler you have there... :-)Volker Lendecke2009-02-191-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.
* remove accidental white spaceDerrell Lipman2009-02-141-1/+0
|
* Get rid of the warnings I had for testingDerrell Lipman2009-02-141-5/+0
|
* It seems some systems use f_flags instead of f_flag. Use the appropriate one.Derrell Lipman2009-02-141-4/+11
|
* f_frsize field is not ubiquitous. Check for it.Derrell Lipman2009-02-141-0/+4
|
* The f_fsid field is not always an integer type. Don't set it in that case.Derrell Lipman2009-02-141-0/+5
|
* Ensure consistency of values on stack (caught by AIX compiler)Derrell Lipman2009-02-141-16/+16
|
* Check for the right error return valueDerrell Lipman2009-02-141-2/+3
|
* [Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2009-02-142-4/+4
| | | | | | | - Revert Tim's changes for the moment. I need to see what the issue is and arrange to use "struct statvfs" if at all possible. Derrell