summaryrefslogtreecommitdiff
path: root/examples/libsmbclient
AgeCommit message (Collapse)AuthorFilesLines
2010-11-02s3-libsmbclient-examples Add tests for debug behaviour.Andrew Bartlett1-1/+16
2010-04-13examples: Fix typo in comment.Karolin Seeger1-1/+1
Karolin
2009-06-18s4: Call va_end() after all va_start()/va_copy() calls.Andrew Kroeger1-5/+9
This corrects the issues reaised in bug #6129, and some others that were not originally identified. It also accounts for some code that was in the original bug report but appears to have since been made common between S3 and S4. Thanks to Erik Hovland <erik@hovland.org> for the original bug report.
2009-03-27Ensure parameter types match format stringDerrell Lipman4-18/+38
2009-02-14[Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2-2/+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
2009-02-13s3 libsmbclient: Fix fstatvfs to be more portableTim Prouty2-4/+2
The statvfs struct isn't guaranteed to be portable across operating systems. Since libsmbclient isn't actually calling statvfs and just using the statvfs struct to store similar information, this patch adds a new portable smbc_statvfs struct. This fixes a few of the failures in the build farm introduced by: ae259575c447e61665c8e7070c476914161b953f Derrell, please check.
2009-02-12[Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman3-0/+228
- port functionality from v3_3_test to master Derrell
2008-09-17examples/libsmbclient: fix Makefile after merged build patch changes.Michael Adam1-18/+18
New variable FLAGS in source3/Makefile.in introduced recursive variable FLAGS in Makefile.internal. Michael
2008-09-17examples/libsmbclient: adapt to new samba3 source dir "source3/Michael Adam2-3/+3
Michael
2008-08-21libsmbclient examples: source/bin to the library search path for smbwrapper ↵Michael Adam1-1/+1
build Michael (This used to be commit fe62098666a16b31b025867f273d407e77152c4c)
2008-08-21libsmbclient examples: add Makefile.internal.in for building from a samba sourceMichael Adam1-0/+138
Without needing to install libsmbclient to /usr/local/samba first. Michael (This used to be commit f0e47bce2e98131812e96fb88cc3d1fe939e8d6c)
2008-08-21libsmbclient examples: fix prototype for readlinkMichael Adam1-1/+1
Michael (This used to be commit 28688cfd57c322937f2c63087380c377bd961018)
2008-08-12Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.Jeremy Allison2-0/+21
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. (This used to be commit 8c630efd25cf17aff59448ca05c1b44a41964b16)
2008-06-23Add krb5 support for the testbrowse example.Andreas Schneider2-1/+15
Signed-off-by: Andreas Schneider <anschneider@suse.de> Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com> (This used to be commit 84b1ea39a4f27ebcf06a2bafed78396c7353df0e)
2008-06-17man pages: Move 'smbsh' man page to the examples directory.Karolin Seeger3-0/+475
smbsh.c is located in the examples directory. It does not make sense to install a man page without installing the tool itself. This fixes bug #4724. Karolin (This used to be commit 797ed744b15c94fa4831d9796b40bb0ab5df55b7)
2008-05-30Working on bug #5475Derrell Lipman1-14/+34
- Add code to test whether smbc_stat() munges future smbc_getxattr() results. Derrell (This used to be commit 5f6b301f92e9e9d5ee1dab9ef8eca2cc77e12941)
2008-05-30Update libsmbclient examples to match new librariesDerrell Lipman2-2/+2
- talloc and tdb have been moved to separate libraries. Link with those. Derrell (This used to be commit e4060ad864ec9d4e9092a832c3c664ee31b6125a)
2008-03-03Missed a few 'deprecated' markersDerrell Lipman1-1/+1
(This used to be commit 76ba37ac46b4a77fe228ca90635fa19140541ccd)
2008-03-03Continued revamping of libsmbclient.Derrell Lipman2-3/+3
- James suggested using gcc's "deprecated" attribute to mark the context structure fields to generate warnings. This creates a scenario with the best of all worlds. I'm able to move to an organization that more easily allows future enhancements, while avoiding any mandatory changes by applications. Thanks, James! - Updated WHATSNEW.txt so that it accurately reflects the current state of affairs. Derrell (This used to be commit a67f96fbe9683b46c2149f7cb439d13f7f0e6ecd)
2008-03-02Remove use of deprecated functionDerrell Lipman5-8/+8
(This used to be commit 93580bce833453ba512ee436d6dfdbdcd2c53777)
2008-03-01Additional revamped libsmbclient documentationDerrell Lipman1-13/+4
- Ensured that all public functions have documentation in libsmbclient.h - Reformatted for "proper" indentation - Re-added temporarily-disabled alternate authentication function capability Derrell (This used to be commit 64b7150d92849a1e1e2416b9dcc12fae8d6bea99)
2008-03-01Initial revamp of the libsmbclient interface.Derrell Lipman3-14/+21
The libsmbclient interface has suffered from difficulty of improvement and feature enrichment without causing ABI breakage. Although there were a number of issues, the primary ones were: (a) the user of the library would manually manipulate the context structure members, meaning that nothing in the context structure could change other than adding stuff at the end; (b) there were three methods of setting options: setting bits in a flags field within the context structure, setting explicit options variables within an options structure in the context structure, and by calling the smbc_option_set() function; (c) the authentication callback did not traditionally provide enough information to the callee which required adding an option for a callback with a different signature, and now there are requests for even more information at the callback, requiring yet a third signature and option to set it (if we implement that feature). This commit provides a reorganization of the code which fixes (a) and (b). The context structure is now entirely opaque, and there are setter and getter functions for manipulating it. This makes maintaining ABI consistency much, much easier. Additionally, the options setting/getting has been unified into a single mechanism using smbc_option_set() and smbc_option_get(). Yet to be completed is a refactoring of the authentication callback (c). The test programs in examples/libsmbclient have been modified (if necessary; some applications require no changes at all) for the new API and a few have been minimally tested. Derrell (This used to be commit d4b4bae8ded824d06ad5ab0e219f71187ee5c771)
2008-02-26add a test program for the new ftruncate functionalityDerrell Lipman2-0/+87
(This used to be commit df995eddbddec80a0d9d4659bbb9c6ca8a45d02b)
2008-01-17Add a program to test repeated calls to smbc_getxattr().Derrell Lipman2-0/+67
(This used to be commit f5f46de404dba2e4a03d205a62cd5cf7ea4e075a)
2008-01-17Add some additional libsmbclient test programs.Derrell Lipman3-1/+158
testwrite: create or truncate a file and write to it. teststat3: compare the results from smbc_stat() and smbc_fstat() Derrell (This used to be commit 5a4a7aec761c3388b741b9b47fa6358fc71a66ce)
2008-01-16Modify testread example to loop using same context.Derrell Lipman1-42/+34
There's been a problem seen where open/read/close a number of times causes open failures eventually. This program has been modified to create the context once and then loop requesting file names to open/read/close. This program also demonstrates the current error in cli_read() where it returns an error instead of length 0 upon end of file. Derrell (This used to be commit 9d75ea577b407ccab59196760d376831062a3ab5)
2008-01-16Replace GetTimeOfDay() with gettimeofday() in example program.Derrell Lipman1-3/+2
GetTimeOfDay() seems to no longer be exported. For the smbsh example, just use the native gettimeofday() for now. (This used to be commit 296a6783fbc03460e87ac4136a0a9e6d2743b2ff)
2008-01-16Add a (very!) trivial cache to the example authentication callback.Derrell Lipman1-1/+21
(This used to be commit 01f6a4cca7a91ae41ff393263418216324502f84)
2008-01-13Fix smbc_listxattr() and friends (bug #5189)Derrell Lipman1-1/+26
When the capability of using full names for DOS attributes was added, a bug was introduced which caused the wrong number of bytes to be returned. This patch to smbc_listxattr_ctx() fixes the problem. Thanks to Jack Schmidt for this patch. Derrell (This used to be commit 913c335d21c503d32b35bf65da7b2bddf0473875)
2008-01-13Fix compile and linking errors since last this code was testedDerrell Lipman3-2/+3
(This used to be commit 2f432842442859f98ecd263464ce02821ab10fca)
2008-01-10Remove unused string.Günther Deschner1-2/+2
Guenther (This used to be commit 88d6683872f4bb9c3074280f385f73c7af9de784)
2008-01-09Fix build warning for libsmbclient example.Günther Deschner1-0/+2
Guenther (This used to be commit 8f411753b2130e9c1f260a15d031f57ba07b62a1)
2007-10-10r24388: - ACL retrieval provided incomplete information because the buffer ↵Derrell Lipman1-4/+6
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-10r23785: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell10-20/+10
(This used to be commit d0e89d246d8e5e64196d6c1d16d39a70579ca42f)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison10-10/+10
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22914: - Fixes bug 4599. A missing <code>if</code> statement forced ↵Derrell Lipman2-0/+83
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-10r22130: - Ensure that the libsmbclient example programs link with the ↵Derrell Lipman1-10/+11
libsmbclient library that's part of the current tree, not with whatever happens to have been previously installed. (This used to be commit c65621e0b7690b90beb420f829c769c7d28147f5)
2007-10-10r18012: Should fix bug 4018.Derrell Lipman1-0/+1
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-10/+12
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)
2007-10-10r18009: Fixes bug 4026.Derrell Lipman1-2/+13
This completes the work Jeremy began last week, disambiguating the meaning of c_time. (In POSIX terminology, c_time means "status Change time", not "create time".) All uses of c_time, a_time and m_time have now been replaced with change_time, access_time, and write_time, and when creation time is intended, create_time is used. Additionally, the capability of setting and retrieving the create time have been added to the smbc_setxattr() and smbc_getxattr() functions. An example of setting all four times can be seen with the program examples/libsmbclient/testacl with the following command line similar to: testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt' The -f option turns on the new mode which uses full time names in the attribute specification (e.g. ACCESS_TIME vs A_TIME). (This used to be commit 8e119b64f1d92026dda855d904be09912a40601c)
2007-10-10r16550: Fix bug 3866. Thanks for the report!Derrell Lipman1-2/+2
Although I've never met a computer or compiler that produced pointers to functions which are a different size than pointers to data, I suppose they probably exist. Assigning a pointer to a function is technically illegal in C anyway. Change casts of the option_value based on the option_name to use of variable argument lists. For binary compatibility, I've maintained but deprecated the old behavior of debug_stderr (which expected to be passed a NULL or non-NULL pointer) and added a new option debug_to_stderr which properly expects a boolean (int) parameter. Derrell (This used to be commit c1b4c510530ca3118d1eccb9615a8cad732c7373)
2007-10-10r14664: r13868@cabra: derrell | 2006-03-22 17:04:30 -0500Derrell Lipman2-3/+49
Implement enhancement request 3505. Two additional features are added here. There is now a method of saving an opaque user data handle in the smbc_ context, and there is now a way to request that the context be passed to the authentication function. See examples/libsmbclient/testbrowse.c for an example of using these features. (This used to be commit 203b4911c16bd7e10198a6f0e63960f2813025ef)
2007-10-10r12852: r12150@cabra: derrell | 2006-01-11 13:21:14 -0500Derrell Lipman1-30/+15
Although RTLD_NEXT was not working properly a number of years ago, it seems to be now. Replace dlopen(/lib/libc...) with direct use of RTLD_NEXT (This used to be commit 2b4866500640891fcb1ca7b24997df17f1b077cc)
2007-10-10r12759: r12128@cabra: derrell | 2006-01-07 15:34:01 -0500Derrell Lipman10-287/+479
Incorporate a number of changes suggested by David Collier-Brown Thanks, David! (This used to be commit 0ae65b9af566e02eece9bb7865047c037468d470)
2007-10-10r12757: r12126@cabra: derrell | 2006-01-03 15:21:36 -0500Derrell Lipman1-2/+11
added flag to not request authentication information (This used to be commit 8396c4b26c9911887ed1c1ce17c31af462ee6883)
2007-10-10r12579: r12122@cabra: derrell | 2005-12-29 12:03:00 -0500Derrell Lipman1-1/+1
allow for arbitrary option value types (This used to be commit 64c8e32b6382e48bce5c1f18179e66ca765a70af)
2007-10-10r12576: r12115@cabra: derrell | 2005-12-29 11:16:03 -0500Derrell Lipman1-12/+34
bug (enhancement) #2651: add option to log debug messages to stderr instead of stdout (This used to be commit 4182eb99af5b343291a661a87d08edd91fd09a7a)
2007-10-10r12468: r12033@cabra: derrell | 2005-12-24 21:03:45 -0500Derrell Lipman1-0/+72
actually add the new test program (This used to be commit e3bab0cc437f3c51c74e438d8d76ffd8afe8644c)
2007-10-10r12467: r12029@cabra: derrell | 2005-12-24 20:25:59 -0500Derrell Lipman2-1/+6
add another libsmbclient test program (This used to be commit 133cd3952b7f5fc9e9ca8d82a33ed1272067a6c8)
2007-10-10r12225: r11729@cabra: derrell | 2005-12-13 22:59:45 -0500Derrell Lipman1-1/+1
1. Fix a crash bug which should have reared its ugly head ages ago, but for some reason, remained dormant until recently. The bug pertained to libsmbclient doing a structure assignment of a cli after having opened a pipe. The pipe open code makes a copy of the cli pointer that was passed to it. If the cli is later copied (and that cli pointer that was saved is no longer valid), the pipe code will cause a crash during shutdown or when the copied cli is closed. 2. The 'type' field in enumerated shares was not being set correctly with the new RPC-based mechanism for enumerating shares. (This used to be commit 62a02b8f2a1fcb66881a9c9636e0b27e3049c5a1)