summaryrefslogtreecommitdiffstats
path: root/source3/libsmb
Commit message (Collapse)AuthorAgeFilesLines
* [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-241-0/+2
| | | | 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>
* s3:libsmb: use new simplified smb_signing code for the client sideStefan Metzmacher2009-03-235-686/+204
| | | | | | | | | | We store the seqnum/mid mapping in the cli_request structure for async requests and in the cli_state structure for sync calls. We skip the signing check for oplock requests while waiting for async requests coming in. metze
* s3:smbd: use new simplified snb_signing code in the serverStefan Metzmacher2009-03-231-333/+0
| | | | | | | | | We keep the seqnum/mid mapping in the smb_request structure. This also moves one global variable into the smbd_server_connection struct. metze
* s3:libsmb: add a much simplified smb_siging infrastructureStefan Metzmacher2009-03-231-0/+370
| | | | | | | | It's the job of the caller to maintain the seqnum/mid mapping. Hopefully we can use this code in s4 later too. metze
* s3:libsmb: rename smb_signing.c => clisigning.cStefan Metzmacher2009-03-231-0/+0
| | | | | | This prepares a large simplification of the smb_signing code metze
* Fix connect to port 139 only -- thanks gd for bugging me :-)Volker Lendecke2009-03-231-4/+3
|
* s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).Günther Deschner2009-03-201-12/+18
| | | | Guenther
* Fix crash in async_smb.cBo Yang2009-03-201-3/+6
|
* s3:libsmb: always create bytes array in cli_trans codeStefan Metzmacher2009-03-191-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
* 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
* 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.
* s3: remove POLICY_HND.Günther Deschner2009-03-182-7/+7
| | | | Guenther
* Remove the global "struct cm_cred_struct" and associated calls, makeJeremy Allison2009-03-176-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.
* Convert open_socket_out_defer to tevent_reqVolker Lendecke2009-03-161-22/+37
|
* Fix a malloc/talloc mismatch when cli_initialise() failsVolker Lendecke2009-03-151-3/+2
|
* Remove pwd_cache.c, it was doing nothing. Make user_name, domain, andJeremy Allison2009-03-134-78/+95
| | | | | password talloc'ed strings within the cli_struct. Jeremy.
* 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