summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient
Commit message (Collapse)AuthorAgeFilesLines
* [Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2009-02-163-3/+104
| | | | | | | | | | - DFS is not a POSIX feature, so the state of that bit should be zero if DFS is *not* supported. Bit feature reversed. - Added smbc_statvfs function Derrell (cherry picked from commit 0697cffe211a922c816b6c75230c4186328498ed)
* [Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2009-02-161-1/+14
| | | | | | | | - Fill in the remainder of the data (or at least as much as we can get) for the fstatvfs return value. Derrell (cherry picked from commit eeeceea8b92b8b814209f496a7ab953dcd0a8367)
* [Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2009-02-161-11/+19
| | | | | | | | | | - Reverse the sense of the flags. Since the fstatvfs() function on POSIX-like systems would almost certainly indicate case sensitivity (for example), leave the bit turned off if the result is the POSIX-like result just as if issued on a typical local file system on a POSIX system. Derrell (cherry picked from commit 0acc962e3968253a3f64b5a92def177ced44994d)
* [Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2009-02-161-0/+101
| | | | | | | | - Complete the implementation of the f_flag field. We now return a flag indicatin UNIX CIFS, CASE SENSITIVE, and/or DFS support. Derrell (cherry picked from commit df15e8f84d108f8e9df1408155b0f9ccc44da3fe)
* [Bug 6069] Add a fstatvfs function for libsmbclientDerrell Lipman2009-02-161-0/+5
| | | | | | | | | | - Add initial test implementation. This works on a Linux client to determine whether a connection's server supports UNIX CIFS. I'm eager to see what the build farm has to say about this, specifically how many, if any, hosts don't provide a statvfs.h file with the requisite struct statvfs. Derrell (cherry picked from commit ff6a1bebd589637a4aecb9c76b4e33f579d7b0df)
* libsmbclient examples: source/bin to the library search path for smbwrapper ↵Michael Adam2008-08-221-1/+1
| | | | | | | | build Michael (cherry picked from commit fe62098666a16b31b025867f273d407e77152c4c) (cherry picked from commit 9a4d8c2942a6c790e751f94e8b3fcee53ce2f3e9)
* libsmbclient examples: add Makefile.internal.in for building from a samba sourceMichael Adam2008-08-221-0/+138
| | | | | | | | Without needing to install libsmbclient to /usr/local/samba first. Michael (cherry picked from commit f0e47bce2e98131812e96fb88cc3d1fe939e8d6c) (cherry picked from commit b51cf452174fa02b79f0572226885496da19f36f)
* libsmbclient examples: fix prototype for readlinkMichael Adam2008-08-221-1/+1
| | | | | | Michael (cherry picked from commit 28688cfd57c322937f2c63087380c377bd961018) (cherry picked from commit 0c32f449915dd98cefa9171f2a7f917d15afe7c2)
* Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.Jeremy Allison2008-08-122-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.
* Add krb5 support for the testbrowse example.Andreas Schneider2008-06-232-1/+15
| | | | | Signed-off-by: Andreas Schneider <anschneider@suse.de> Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
* man pages: Move 'smbsh' man page to the examples directory.Karolin Seeger2008-06-173-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
* Working on bug #5475Derrell Lipman2008-05-301-14/+34
| | | | | | - Add code to test whether smbc_stat() munges future smbc_getxattr() results. Derrell
* Update libsmbclient examples to match new librariesDerrell Lipman2008-05-302-2/+2
| | | | | | - talloc and tdb have been moved to separate libraries. Link with those. Derrell
* Missed a few 'deprecated' markersDerrell Lipman2008-03-031-1/+1
|
* Continued revamping of libsmbclient.Derrell Lipman2008-03-032-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
* Remove use of deprecated functionDerrell Lipman2008-03-025-8/+8
|
* Additional revamped libsmbclient documentationDerrell Lipman2008-03-011-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
* Initial revamp of the libsmbclient interface.Derrell Lipman2008-03-013-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
* add a test program for the new ftruncate functionalityDerrell Lipman2008-02-262-0/+87
|
* Add a program to test repeated calls to smbc_getxattr().Derrell Lipman2008-01-172-0/+67
|
* Add some additional libsmbclient test programs.Derrell Lipman2008-01-173-1/+158
| | | | | | | testwrite: create or truncate a file and write to it. teststat3: compare the results from smbc_stat() and smbc_fstat() Derrell
* Modify testread example to loop using same context.Derrell Lipman2008-01-161-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
* Replace GetTimeOfDay() with gettimeofday() in example program.Derrell Lipman2008-01-161-3/+2
| | | | | GetTimeOfDay() seems to no longer be exported. For the smbsh example, just use the native gettimeofday() for now.
* Add a (very!) trivial cache to the example authentication callback.Derrell Lipman2008-01-161-1/+21
|
* Fix smbc_listxattr() and friends (bug #5189)Derrell Lipman2008-01-131-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
* Fix compile and linking errors since last this code was testedDerrell Lipman2008-01-133-2/+3
|
* Remove unused string.Günther Deschner2008-01-101-2/+2
| | | | Guenther
* Fix build warning for libsmbclient example.Günther Deschner2008-01-091-0/+2
| | | | Guenther
* r24388: - ACL retrieval provided incomplete information because the buffer ↵Derrell Lipman2007-10-101-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
* r23785: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-1010-20/+10
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-1010-10/+10
| | | | Jeremy.
* r22914: - Fixes bug 4599. A missing <code>if</code> statement forced ↵Derrell Lipman2007-10-102-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.
* r22130: - Ensure that the libsmbclient example programs link with the ↵Derrell Lipman2007-10-101-10/+11
| | | | | | | libsmbclient library that's part of the current tree, not with whatever happens to have been previously installed.
* r18012: Should fix bug 4018.Derrell Lipman2007-10-101-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.
* r18011: Should fix bug 3835.Derrell Lipman2007-10-101-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
* r18009: Fixes bug 4026.Derrell Lipman2007-10-101-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).
* r16550: Fix bug 3866. Thanks for the report!Derrell Lipman2007-10-101-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
* r14664: r13868@cabra: derrell | 2006-03-22 17:04:30 -0500Derrell Lipman2007-10-102-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.
* r12852: r12150@cabra: derrell | 2006-01-11 13:21:14 -0500Derrell Lipman2007-10-101-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
* r12759: r12128@cabra: derrell | 2006-01-07 15:34:01 -0500Derrell Lipman2007-10-1010-287/+479
| | | | Incorporate a number of changes suggested by David Collier-Brown Thanks, David!
* r12757: r12126@cabra: derrell | 2006-01-03 15:21:36 -0500Derrell Lipman2007-10-101-2/+11
| | | | added flag to not request authentication information
* r12579: r12122@cabra: derrell | 2005-12-29 12:03:00 -0500Derrell Lipman2007-10-101-1/+1
| | | | allow for arbitrary option value types
* r12576: r12115@cabra: derrell | 2005-12-29 11:16:03 -0500Derrell Lipman2007-10-101-12/+34
| | | | bug (enhancement) #2651: add option to log debug messages to stderr instead of stdout
* r12468: r12033@cabra: derrell | 2005-12-24 21:03:45 -0500Derrell Lipman2007-10-101-0/+72
| | | | actually add the new test program
* r12467: r12029@cabra: derrell | 2005-12-24 20:25:59 -0500Derrell Lipman2007-10-102-1/+6
| | | | add another libsmbclient test program
* r12225: r11729@cabra: derrell | 2005-12-13 22:59:45 -0500Derrell Lipman2007-10-101-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.
* r12098: r10797@cabra: derrell | 2005-12-06 12:09:00 -0500Derrell Lipman2007-10-102-0/+219
| | | | fixed another memory leak and reverted an (incorrect) fix from yesterday
* r12080: r10673@cabra: derrell | 2005-12-05 13:22:34 -0500Derrell Lipman2007-10-101-75/+163
| | | | | | Correct some memory and file descriptor leaks. This should fix bugs 3257, 3267 and 3273.
* r11130: r10092@cabra: derrell | 2005-10-17 15:29:03 -0400Derrell Lipman2007-10-101-0/+74
| | | | let's now actually add the new test file
* r11129: r10090@cabra: derrell | 2005-10-17 15:26:27 -0400Derrell Lipman2007-10-101-1/+6
| | | | added example to read a file and test download time