summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmbclient.c
AgeCommit message (Collapse)AuthorFilesLines
2007-12-15s/sid_to_string/sid_to_fstring/Volker Lendecke1-1/+1
least surprise for callers (This used to be commit eb523ba77697346a365589101aac379febecd546)
2007-12-10Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison1-3/+3
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-12-07Remove next_token - all uses must now be next_token_talloc.Jeremy Allison1-19/+36
No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
2007-12-07Don't build rpctorture anymore - not maintained. Just remove.Jeremy Allison1-7/+12
Remove all vestiges of pstring (except for smbctool as noted in previous commit). Jeremy (This used to be commit 4c32a22ac50ada3275d2ffba3c1aa08bee7d1549)
2007-12-01Fix an uninitialized variableVolker Lendecke1-1/+1
(This used to be commit edce7bd7a9dd1064ba8aec34b334c7395228f40b)
2007-11-30Fix missing error cleanup noticed by Derrell.Jeremy Allison1-3/+6
Jeremy. (This used to be commit 37f00926c29c22f27e7192c1fff0a08ce136cb86)
2007-11-30Removed all pstrings from libsmbclient. Derryl pleaseJeremy Allison1-46/+65
check. Passes valgrind tests I've run in examples/libsmbclient. Jeremy. (This used to be commit 9d0034faed939a4534637696f1631ac2da60e4a3)
2007-11-30Add talloc versions of all the next_token() functions.Jeremy Allison1-605/+728
Now I can really start removing fixed length strings... Jeremy. (This used to be commit 0ae61e26547e594e94037d4474a008221e5df8cf)
2007-11-29Remove PSTRING_LEN from smbd/ nmbd/.Jeremy Allison1-98/+71
Remove pstring from libsmb/clidfs.c except for a nasty hack (that will be removed when pstrings are gone from client/). Jeremy. (This used to be commit cc257b71d13daa47e6f2315d0f07a60eb4aaeca6)
2007-11-29Remove the explicit TALLOC_CTX * from cli_struct.Jeremy Allison1-7/+21
Make us very explicit about how long a talloc ctx should last. Jeremy. (This used to be commit ba9e2be2b5a59684e854609f9d82ea1633448c62)
2007-11-19Add stackframes to public libsmbclient functionsVolker Lendecke1-64/+245
As we use talloc_tos() in inner libsmbclient/ functions more and more, we need to make sure not to create memleaks by not free'ing talloc stackframes. This patch wraps all calls in libsmbclient.c that are publically exported into a talloc_stackframe()/talloc_free() pair. Jeremy, Derrell, can you check this? Thanks, Volker (This used to be commit db9fa472a89eb78a7b1f7cabcf195331c3b448d9)
2007-11-09Fix some warningsVolker Lendecke1-1/+2
(This used to be commit 0a1f524e8cce9bbe4fd10467c1f64f7a8862d298)
2007-11-01Fix for bug 5021Volker Lendecke1-1/+5
This is a different fix than the bug reporter (Evgeniy Dushistov <dushistov at mail.ru>, thanks!) created, but it lives without the boolean status variable. Untested so far, but I can not add attachments to bugs right now. But to me this looks really obvious. (This used to be commit b481abf5914dcafe5642c4d9394d02603e905bbb)
2007-10-27Change all occurrences of zero_addr(&ss,AF_INET) toJeremy Allison1-3/+3
zero_addr(&ss). All current uses were always of the AF_INET form, so simplify the call. If in the future we need to zero an addr to AF_INET6 this can be done separately. Jeremy. (This used to be commit 2e92418a138bf2738b77b7e0fcb2fa37ad84fc0c)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-52/+54
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-41/+41
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10Add start of IPv6 implementation. Currently most of this is avoidingJeremy Allison1-5/+5
IPv6 in winbindd, but moves most of the socket functions that were wrongly in lib/util.c into lib/util_sock.c and provides generic IPv4/6 independent versions of most things. Still lots of work to do, but now I can see how I'll fix the access check code. Nasty part that remains is the name resolution code which is used to returning arrays of in_addr structs. Jeremy. (This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-33/+43
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r24981: - Use the formal syntax for calling functions through pointers. ↵Derrell Lipman1-52/+56
I've wanted to make this change for ages, but now with the issue of "open" requiring it, this is the time to just do all of them. Derrell (This used to be commit e746aaaf4db7099252ef048da7857bd488cb681f)
2007-10-10r24969: Fwd port "open" patchSimo Sorce1-2/+2
(This used to be commit 113d62682ae8b045ff0132a743a32f3bc4856d54)
2007-10-10r24864: - Correct failure of libsmbclient against a version of Windows found ↵Derrell Lipman1-24/+2
on a NAS device. The device resets a NBT connection on port 139 when it receives a NetBIOS keepalive request. That request should be supported when NetBIOS is in use; Windows is behaving badly. libsmbclient needs a way to determine if a connection is still alive, and was using a NetBIOS keepalive request if port 139 was in use (on the assumption that it was probably NBT), and getpeername() when port 139 was not being used (assuming naked transport). This patch simplifies the code by exclusively using getpeername() to check whether a connection is still alive. The NetBIOS keepalive request is optional anyway (with preference being given to using TCP mechanisms for the same purpose), so this should be both simpler and more reliable. Derrell (This used to be commit 1f122352b02e3f4be9ac2d638b18807dafd05429)
2007-10-10r24750: Fix one more caller of name_resolve_bcast().Michael Adam1-1/+3
Michael (This used to be commit 757b5c1bd7ff3d6bbf99753c1b617338ee837531)
2007-10-10r24543: Apply missing portion of correction for bug 4750Derrell Lipman1-0/+5
(This used to be commit 5a83c306bb80b492a3c3d5e86b0767dc45e5c262)
2007-10-10r24466: - Sort ACEs according to http://support.microsoft.com/kb/269175 so thatDerrell Lipman1-10/+72
Windows Explorer doesn't complain about the order (and so that they get interpreted properly). Derrell (This used to be commit 8f371e2ea97a3b58d1c7c3aa1368a0904295f681)
2007-10-10r24462: - Removing all ACEs was causing removal of the DACL entirely. ↵Derrell Lipman1-4/+0
Win2000 ignored the request, presumably due to the PROTECTED flag not being set. Setting that flag (in make_sec_desc()) has much wider implications than just to libsmbclient, so instead of modifying that, we'll remove security descriptors by setting the number of ACEs to zero. At some point, we might want to look into whether we should actually be setting the PROTECTED flag in the DACL. Reference http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/distrib/dsce_ctl_qxju.mspx?mfr=true Derrell (This used to be commit 319df380e579fd860348a8f08a584e13161dde9d)
2007-10-10r24410: - I got tricked by function naming. Contrary to what seemed obvious ↵Derrell Lipman1-4/+0
to me, prs_mem_free() is not the function to be called to free memory allocated by prs_alloc_mem(). I've added a comment so others may not get bitten too. - Remove incorrect memory free calls added yesterday to replace SAFE_FREE. The memory is actually now on a talloc context, so gets freed by the caller when that context is freed. We don't need to free it iternally. Derrell (This used to be commit 2fde343150c17959fc970b18e1eb4efde800b4db)
2007-10-10r24388: - ACL retrieval provided incomplete information because the buffer ↵Derrell Lipman1-9/+22
pointer was incremented too far in some circumstances. In these cases, only the first of multiple concatenated strings would be seen. - Working on bug 4649 pertaining to delete an ACL, this fixes the reported crash. It appears to have been an incomplete switchover from malloc to talloc, as the memory was still being freed with SAFE_FREE. Deleting ACLs still doesn't work. Although a valid request is sent to the server and a SUCCESS response is returned, the method that's used in libsmbclient for deleting ACLs seems to be incorrect. In looking at the samba4 torture tests, it appears that we should be turning on the INHERIT flag if we want to delete the ACL. (I could use some assistance on the proper flags to send, from anyone familiar with this stuff.) - Apply patch from SATOH Fumiyasu to fix bug 4750. smbc_telldir_ctx() was not returning a value useful to smbc_lseekdir_ctx(). Derrell (This used to be commit 2ac502e29bd8390252fe4ae8344faab49ca01ff5)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().Günther Deschner1-1/+1
Guenther (This used to be commit e9a7512a9f630340004913f1379452eea8a9b6ae)
2007-10-10r23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.Jeremy Allison1-8/+11
Long overdue fix.... Jeremy. (This used to be commit 073fdc5a58139796dbaa7ea9833dca5308f11282)
2007-10-10r23001: - Fix but #4634. Type of the size parameter to getpeername was wrong.Derrell Lipman1-1/+1
(This used to be commit 6675c8acf1d83b7131d38f09f381062b6a604c7e)
2007-10-10r22914: - Fixes bug 4599. A missing <code>if</code> statement forced ↵Derrell Lipman1-4/+8
subseqeuent attempts to set attributes to fail. - I also noticed that missing attributes were setting an invalid return string by getxattr(), e.g. if there was not group, the return string had "GROUP:;" instead of excluding the GROUP attribute entirely as it should. The big problem with the way it was, is that the string could not then be passed to setxattr() and parsed. (This used to be commit 7213b5ebec8cd7f1955f5aa8ee4050c39cd11ed1)
2007-10-10r22850: - Fixes bug 4601. smbc_getxattr() would not, in one case, properly ↵Derrell Lipman1-1/+1
return the required size of a buffer needed to contain the extended attributes. (This used to be commit 34f77af02e2073ccaabe1583011abeeabbbb24e1)
2007-10-10r21932: fix compiler warning.Stefan Metzmacher1-1/+1
maybe also for 3.0.25 metze (This used to be commit 844dac912cb549b0524571df80fbaa7f2d9c36c2)
2007-10-10r21768: Fix the client dfs code such that smbclient canJeremy Allison1-15/+0
process deep dfs links (ie. links that go to non root parts of a share). Make the directory handling conanonical in POSIX and Windows pathname processing. dfs should not be fully working in client tools. Please bug me if not. Jeremy. (This used to be commit 1c9e10569cd97ee41de39f9f012bea4e4c932b5d)
2007-10-10r21239: if the workgroup name is longer than 16 chars we get garbage in the ↵Simo Sorce1-6/+7
string server_len is usually 256 (fstring). Correctly terminate saving the lenght (This used to be commit e7e44554bf7c61020e2c5c652e3f8f37a296d3aa)
2007-10-10r21132: - Fixes bug 4366. Documentation for smbc_utimes() was incorrect.Derrell Lipman1-3/+31
- Should fix bug 4115 (but needs confirmation from OP). If the kerberos use flag is set in the context, then also pass it to smbc_attr_server for use by cli_full_connection() - Should fix bug 4309 (but needs confirmation from OP). We no longer send a keepalive packet unconditionally. Instead, we assume (yes, possibly incorrectly, but it's the best guess we can make) that if the connection is on port 139, it's netbios and otherwise, it isn't. If netbios is in use, we send a keepalive packet. Otherwise, we check that the connection is alive using getpeername(). (This used to be commit 2f9be59c10ef991a51cc858ab594187b5ca61382)
2007-10-10r20832: Remove extra pointers previously added to unique [out] pointers. ↵Jelmer Vernooij1-2/+1
Instead, add [ref] pointers where necessary (top-level [ref] pointers, by spec, don't appear on the wire). This brings us closer to the DCE/RPC standard again. (This used to be commit 580f2a7197b1bc9db14a643fdd112b40ef37aaef)
2007-10-10r20333: Fix a couple of Coverity errors in one run, this was a potential ↵Volker Lendecke1-5/+8
NULL dereference (This used to be commit f9edfffeb5aa1fe0700c17cd1c8141c906080188)
2007-10-10r20269: merge -r20264:20267 from SAMBA_3_0_24Herb Lewis1-0/+3
more no previous prototype warnings (This used to be commit 41be182f78762372ae13759ede5d2bd40a71d7f5)
2007-10-10r19797: Convert the remaining pipes to the "new" unique out ptr handlingVolker Lendecke1-8/+4
(This used to be commit bc4e0a388a2859d2ddcfb8f07920f3b121a37894)
2007-10-10r19469: Another user of NetShareEnumVolker Lendecke1-0/+4
(This used to be commit 3a1be1626c1e285da70a8fd688a494eb633eee2f)
2007-10-10r18865: fixed some of the most obvious NTSTATUS/WERROR mixups in Samba3. ItAndrew Tridgell1-3/+3
still doesn't compile with immediate structures and the NTSTATUS/WERROR separation, as there are still several places where the two error types are mixed up. I haven't fixed those as they require decisions about the rpcclient code that I really don't want to get into (the error handling there is a mess) So samba3 compiles now, but only becaise HAVE_IMMEDIATE_STRUCTURES is not used (look for HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED) (This used to be commit 8438a6a7d4506d395c8b4bd0e99f9c100e5e3c4e)
2007-10-10r18802: Use the pidl-generated code for the srvsvc interface, both client ↵Jelmer Vernooij1-22/+13
and server code. This has had some basic testing. I'll do more during the next couple of days and hopefully also make RPC-SRVSVC from Samba4 pass against it. (This used to be commit ef10672399c4b82700dc431b4d93431ffdd42d98)
2007-10-10r18745: Use the Samba4 data structures for security descriptors and security ↵Jelmer Vernooij1-30/+30
descriptor buffers. Make security access masks simply a uint32 rather than a structure with a uint32 in it. (This used to be commit b41c52b9db5fc4a553b20a7a5a051a4afced9366)
2007-10-10r18271: Big change:Gerald Carter1-2/+2
* autogenerate lsa ndr code * rename 'enum SID_NAME_USE' to 'enum lsa_SidType' * merge a log more security descriptor functions from gen_ndr/ndr_security.c in SAMBA_4_0 The most embarassing thing is the "#define strlen_m strlen" We need a real implementation in SAMBA_3_0 which I'll work on after this code is in. (This used to be commit 3da9f80c28b1e75ef6d46d38fbb81ade6b9fa951)
2007-10-10r18013: Fix for "bug" (enhancement) 3684.Derrell Lipman1-1/+14
Provide a new option to specify the share mode to be used when opening a file. (This used to be commit 9b6fee5f6f60638ed80fdedcce4b3d29b091f7aa)
2007-10-10r18012: Should fix bug 4018.Derrell Lipman1-1/+9
NetApp filers expect paths in Open AndX Request to have a leading slash. Windows clients send the leading slash, so we should too. (This used to be commit fc5b6e4bd8a67994b0c56d1223c74d064164420f)
2007-10-10r18011: Should fix bug 3835.Derrell Lipman1-4/+28
Jeremy: requires your eyes... If the remote connection timed out while cli_list() was retrieving its list of files, the error was not returned to the user, e.g. via smbc_opendir(), so the user didn't have a way to know to set the timeout longer and try again. This problem would occur when a very large directory is being read with a too-small timeout on the cli. Jeremy, although there were a couple of areas that needed to be handled, I needed to make one change that you should bless, in libsmb/clientgen.c. It was setting cli->smb_rw_error = smb_read_error; but smb_read_error is zero, so this had no effect. I'm now doing cli->smb_rw_error = READ_TIMEOUT; instead, and according to the OP, these (cumulative) changes (in a slightly different form) solve the problem. Please confirm this smb_rw_error change will have no other adverse effects that you can see. Derrell (This used to be commit fa664b24b829f973156486896575c1007b6d7b01)