1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

94 Commits

Author SHA1 Message Date
Andrew Bartlett
a329c72f07 vfs: Remove -D_LARGEFILE64_SOURCE from vfs examples Makefile 2012-04-05 02:39:08 +02:00
Matthias Dieter Wallnöfer
ed405df823 examples/testsmbc.c - substitute deprecated function "bzero" with "memset"
Here we do not make any use of libreplace and hence it would be overkill
to include the right headers for Solaris.

This fixes bug: https://bugzilla.samba.org/show_bug.cgi?id=8767

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-22 23:57:24 +01:00
Matthias Dieter Wallnöfer
b2ff4b06d6 examples/testsmbc.c - quiet implicit cast warnings on OpenSolaris
https://bugzilla.samba.org/show_bug.cgi?id=8767

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-22 23:57:24 +01:00
Matthias Dieter Wallnöfer
a19185249a examples/testsmbc.c - remove unused function "print_list_fn"
It does not get referenced from anywhere.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-22 23:57:24 +01:00
Matthias Dieter Wallnöfer
2522712994 examples/testsmbc.c - remove unused variables
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-22 23:57:24 +01:00
Andrew Bartlett
4328f3ccf3 smbwrapper: Remove smbwrapper
There are now many better ways to access a remote SMB filesystem,
which do not rely on LD_PRELOAD and the associated dangers.  FUSE,
gvfs and the CIFS VFS are all much better options which do not require
knowing every possible libc entry point that can deal with a file
descriptor.

As an example of the maintainence that would be required to keep this
going, recent changes to deal with thread races and close-on-exec have
resulted in dup3(), but this isn't currently mapped.  While this would
not be hard to add, it illistrates why it is better to move to an
interface designed for this task.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Feb  9 01:58:24 CET 2012 on sn-devel-104
2012-02-09 01:58:24 +01:00
Amitay Isaacs
5bdadd1501 build: Add missing dependencies on popt
This fixes compilation issues on freebsd where system popt is installed
under /usr/local.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Jan 27 08:33:52 CET 2012 on sn-devel-104
2012-01-27 08:33:52 +01:00
Volker Lendecke
64e84e7cb4 examples: malloc is declared in <stdlib.h> 2012-01-01 22:25:02 +01:00
Andrew Bartlett
3167b95cad examples: rework wscript to use a loop
I think this format is more compact and easier to understand.

Andrew Bartlett
2011-10-28 13:10:27 +02:00
Andrew Bartlett
7675cf91d3 examples: compile libsmbclient tests using just SAMBA_BINARY
This ensures that these compile without the extra includes that SAMBA3_BINARY adds.

Andrew Bartlett
2011-10-20 12:17:07 +02:00
Jeremy Allison
019f643c69 Fix a boatload of warnings in the examples.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Oct 20 02:29:52 CEST 2011 on sn-devel-104
2011-10-20 02:29:52 +02:00
Günther Deschner
ce45ae122e s3-waf: make sure we always compile (not install) our libsmbclient testcode.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 19 20:42:52 CEST 2011 on sn-devel-104
2011-10-19 20:42:51 +02:00
Andrew Bartlett
e16c9904c6 s3-libsmbclient-examples Add tests for debug behaviour. 2010-11-02 04:36:04 +00:00
Karolin Seeger
fce533e3be examples: Fix typo in comment.
Karolin
2010-04-13 20:07:11 +02:00
Andrew Kroeger
71515ba190 s4: Call va_end() after all va_start()/va_copy() calls.
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-06-18 13:49:25 +10:00
Derrell Lipman
21ad907aa0 Ensure parameter types match format string 2009-03-27 18:03:00 -04:00
Derrell Lipman
352c97561e [Bug 6069] Add a fstatvfs function for libsmbclient
- 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-14 09:44:36 -05:00
Tim Prouty
5e5d2b2cfa s3 libsmbclient: Fix fstatvfs to be more portable
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:
ae259575c4

Derrell, please check.
2009-02-13 12:59:30 -08:00
Derrell Lipman
ae259575c4 [Bug 6069] Add a fstatvfs function for libsmbclient
- port functionality from v3_3_test to master

Derrell
2009-02-12 10:39:48 -05:00
Michael Adam
747f4b358c examples/libsmbclient: fix Makefile after merged build patch changes.
New variable FLAGS in source3/Makefile.in introduced recursive
variable FLAGS in Makefile.internal.

Michael
2008-09-17 17:50:18 +02:00
Michael Adam
4d12acf326 examples/libsmbclient: adapt to new samba3 source dir "source3/
Michael
2008-09-17 17:50:18 +02:00
Michael Adam
fb0b833001 libsmbclient examples: source/bin to the library search path for smbwrapper build
Michael
(This used to be commit fe62098666)
2008-08-21 12:16:05 +02:00
Michael Adam
f14e833c53 libsmbclient examples: add Makefile.internal.in for building from a samba source
Without needing to install libsmbclient to /usr/local/samba first.

Michael
(This used to be commit f0e47bce2e)
2008-08-21 12:16:05 +02:00
Michael Adam
f1a45e3b6b libsmbclient examples: fix prototype for readlink
Michael
(This used to be commit 28688cfd57)
2008-08-21 12:16:04 +02:00
Jeremy Allison
03991ab073 Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.
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 8c630efd25)
2008-08-12 13:35:15 -07:00
Andreas Schneider
ef0a7b0b94 Add krb5 support for the testbrowse example.
Signed-off-by: Andreas Schneider <anschneider@suse.de>
Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
(This used to be commit 84b1ea39a4)
2008-06-23 15:36:37 -04:00
Karolin Seeger
f21058d61e man pages: Move 'smbsh' man page to the examples directory.
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 797ed744b1)
2008-06-17 13:23:09 +02:00
Derrell Lipman
3e20aeb18e Working on bug #5475
- Add code to test whether smbc_stat() munges future smbc_getxattr() results.

Derrell
(This used to be commit 5f6b301f92)
2008-05-30 10:38:35 -04:00
Derrell Lipman
cf4b2f4d24 Update libsmbclient examples to match new libraries
- talloc and tdb have been moved to separate libraries.  Link with those.

Derrell
(This used to be commit e4060ad864)
2008-05-30 10:24:55 -04:00
Derrell Lipman
ee45d0d663 Missed a few 'deprecated' markers
(This used to be commit 76ba37ac46)
2008-03-03 18:25:49 -05:00
Derrell Lipman
1363ee9d65 Continued revamping of libsmbclient.
- 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 a67f96fbe9)
2008-03-03 18:13:33 -05:00
Derrell Lipman
8a05c0a884 Remove use of deprecated function
(This used to be commit 93580bce83)
2008-03-02 16:21:48 -05:00
Derrell Lipman
223940d9a8 Additional revamped libsmbclient documentation
- 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 64b7150d92)
2008-03-01 20:47:22 -05:00
Derrell Lipman
257b7b0929 Initial revamp of the libsmbclient interface.
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 d4b4bae8de)
2008-03-01 20:47:22 -05:00
Derrell Lipman
ab9afdd311 add a test program for the new ftruncate functionality
(This used to be commit df995eddbd)
2008-02-26 21:46:08 -05:00
Derrell Lipman
76b5c674e7 Add a program to test repeated calls to smbc_getxattr().
(This used to be commit f5f46de404)
2008-01-17 11:46:41 -05:00
Derrell Lipman
dba2400192 Add some additional libsmbclient test programs.
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 5a4a7aec76)
2008-01-17 09:26:36 -05:00
Derrell Lipman
3e494442de Modify testread example to loop using same context.
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 9d75ea577b)
2008-01-16 14:41:11 +00:00
Derrell Lipman
735e98759c Replace GetTimeOfDay() with gettimeofday() in example program.
GetTimeOfDay() seems to no longer be exported.  For the smbsh example, just
use the native gettimeofday() for now.
(This used to be commit 296a6783fb)
2008-01-16 14:37:40 +00:00
Derrell Lipman
12d31ba2b8 Add a (very!) trivial cache to the example authentication callback.
(This used to be commit 01f6a4cca7)
2008-01-16 14:35:44 +00:00
Derrell Lipman
011e89c858 Fix smbc_listxattr() and friends (bug #5189)
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 913c335d21)
2008-01-13 17:10:06 -05:00
Derrell Lipman
d49ba81210 Fix compile and linking errors since last this code was tested
(This used to be commit 2f43284244)
2008-01-13 12:07:18 -05:00
Günther Deschner
83b1751615 Remove unused string.
Guenther
(This used to be commit 88d6683872)
2008-01-10 13:02:10 +01:00
Günther Deschner
af02de700d Fix build warning for libsmbclient example.
Guenther
(This used to be commit 8f411753b2)
2008-01-09 10:20:44 +01:00
Derrell Lipman
83fc92c82c r24388: - ACL retrieval provided incomplete information because the buffer 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 2ac502e29b)
2007-10-10 12:29:39 -05:00
Andrew Tridgell
58e9534300 r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit d0e89d246d)
2007-10-10 12:28:23 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Derrell Lipman
4a413b3043 r22914: - Fixes bug 4599. A missing <code>if</code> statement forced 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 7213b5ebec)
2007-10-10 12:22:07 -05:00
Derrell Lipman
a8202531d8 r22130: - Ensure that the libsmbclient example programs link with the libsmbclient
library that's part of the current tree, not with whatever happens to have
  been previously installed.
(This used to be commit c65621e0b7)
2007-10-10 12:19:15 -05:00
Derrell Lipman
44c1504c03 r18012: Should fix bug 4018.
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 fc5b6e4bd8)
2007-10-10 11:39:48 -05:00