summaryrefslogtreecommitdiff
path: root/examples/libsmbclient
AgeCommit message (Collapse)AuthorFilesLines
2025-08-19examples/libsmbclient: Fix CID #1273089 Resource leakGünther Deschner1-1/+3
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-07-08examples: Initialize char arraysAndreas Schneider1-2/+2
"Error: UNINIT (CWE-457): samba-4.20.0rc2/examples/libsmbclient/testacl.c:35: var_decl: Declaring variable ""value"" without initializer. samba-4.20.0rc2/examples/libsmbclient/testacl.c:254: uninit_use_in_call: Using uninitialized value ""*value"" as argument to ""%s"" when calling ""printf"". [Note: The source code implementation of the function has been overridden by a builtin model.] 252| } 253| 254|-> printf(""Attributes for [%s] are:\n%s\n"", path, value); 255| 256| if (stat_and_retry)" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-06-30examples: Make sure the array is probably initializedAndreas Schneider1-1/+1
"Error: UNINIT (CWE-457): samba-4.20.0rc2/examples/libsmbclient/testacl2.c:27: var_decl: Declaring variable ""value"" without initializer. samba-4.20.0rc2/examples/libsmbclient/testacl2.c:48: uninit_use_in_call: Using uninitialized value ""*value"" as argument to ""%s"" when calling ""printf"". [Note: The source code implementation of the function has been overridden by a builtin model.] 46| } 47| 48|-> printf(""Attributes for [%s] are:\n%s\n"", argv[1], value); 49| 50| flags = 0;" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2024-06-28examples: Initialize char arraysAndreas Schneider1-2/+2
"Error: UNINIT (CWE-457): samba-4.20.0rc2/examples/libsmbclient/testacl3.c:15: var_decl: Declaring variable ""value"" without initializer. samba-4.20.0rc2/examples/libsmbclient/testacl3.c:55: uninit_use_in_call: Using uninitialized value ""*value"" as argument to ""%s"" when calling ""printf"". [Note: The source code implementation of the function has been overridden by a builtin model.] 53| } 54| 55|-> printf(""Attributes for [%s] are:\n%s\n"", path, value); 56| } 57|" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <npower@samba.org>
2023-10-12examples: Enable posix for teststatVolker Lendecke1-0/+2
Show that we can properly detect non-regular files created by the Windows NFS server. Tested manually against Windows 2022. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-10-12examples: Print file type as part of teststatVolker Lendecke1-4/+31
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-09-25examples: Slightly modernize printfs in teststatVolker Lendecke1-8/+14
long long works, but it's a bit too specific now that we have intmax_t Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-09-25examples: Use explicit SMBCCTXVolker Lendecke1-2/+12
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-28examples: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Rowland Penny <rpenny@samba.org>
2022-08-26examples: A tiny bit of README.Coding for teststat.cVolker Lendecke1-17/+12
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-08-26examples: Make libsmbclient samples look a *bit* less uglyVolker Lendecke19-1921/+1916
Remove trailing whitespace, indent to tabs. Yes, this introduces long lines, but makes review with "git show -w" trivial. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-05-08Fix clang 9 missing-field-initializer warningsGary Lockyer1-3/+1
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-09-01Spelling fixes s/wont /won't /Mathieu Parent1-1/+1
Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-01-28examples: Use C99 initializer for poptOption in testaclAndreas Schneider1-26/+74
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28examples: Reformat testacl libsmbclient exampleAndreas Schneider1-270/+270
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-02-22fix spelling of 'unchangeable'Edward Betts1-1/+1
Signed-off-by: Edward Betts <edward@4angle.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Wed Feb 22 12:21:51 CET 2017 on sn-devel-144
2016-05-13examples:smbclient:write: fix O3 error unused result of fgetsMichael Adam1-2/+10
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13examples:smbclient:read: fix O3 error unused result of fgetsMichael Adam1-1/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13examples:smbclient:fstatvfs: fix O3 error unused result of fgetsMichael Adam1-1/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13examples:smbclient:statvfs: fix O3 error unused result of fgetsMichael Adam1-1/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13examples:smbclient:notify: fix O3 error unused result from fgetsMichael Adam1-1/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13examples:smbclient:testacl3: fix O3 error unused result from fgetsMichael Adam1-1/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-03-22examples: Remove all uses of strcpy in examples (except for validchr.c).Jeremy Allison5-8/+13
I can't figure out how to make git handle the CR/LF differences in this file. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-28examples: Fix unchecked result warningsVolker Lendecke1-3/+13
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-09-07libsmbclient: Fix 32-bit problemsVolker Lendecke3-24/+24
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Sep 7 15:13:08 CEST 2015 on sn-devel-104
2015-07-10libsmb: Implement smbc_notifyVolker Lendecke2-0/+79
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jul 10 09:35:13 CEST 2015 on sn-devel-104
2015-02-25Fix the developer O3 buildVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104
2014-04-02examples/libsmbclient: avoid some compiler warningsStefan Metzmacher3-15/+18
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-15examples/libsmbclient: Cast mode_t to unsigned int for GNU/Solaris buildAndrew Bartlett1-2/+2
Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Mar 15 20:22:08 CET 2013 on sn-devel-104
2012-11-20examples: fix build on AIX6Christian Ambach2-0/+4
Signed-off-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Nov 20 16:06:59 CET 2012 on sn-devel-104
2012-04-05vfs: Remove -D_LARGEFILE64_SOURCE from vfs examples MakefileAndrew Bartlett1-1/+1
2012-02-22examples/testsmbc.c - substitute deprecated function "bzero" with "memset"Matthias Dieter Wallnöfer1-1/+1
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-22examples/testsmbc.c - quiet implicit cast warnings on OpenSolarisMatthias Dieter Wallnöfer1-2/+2
https://bugzilla.samba.org/show_bug.cgi?id=8767 Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-22examples/testsmbc.c - remove unused function "print_list_fn"Matthias Dieter Wallnöfer1-16/+0
It does not get referenced from anywhere. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-22examples/testsmbc.c - remove unused variablesMatthias Dieter Wallnöfer1-2/+2
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-02-09smbwrapper: Remove smbwrapperAndrew Bartlett17-4522/+0
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-01-27build: Add missing dependencies on poptAmitay Isaacs1-1/+1
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-01examples: malloc is declared in <stdlib.h>Volker Lendecke1-1/+0
2011-10-28examples: rework wscript to use a loopAndrew Bartlett1-84/+23
I think this format is more compact and easier to understand. Andrew Bartlett
2011-10-20examples: compile libsmbclient tests using just SAMBA_BINARYAndrew Bartlett1-17/+17
This ensures that these compile without the extra includes that SAMBA3_BINARY adds. Andrew Bartlett
2011-10-20Fix a boatload of warnings in the examples.Jeremy Allison15-163/+48
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Oct 20 02:29:52 CEST 2011 on sn-devel-104
2011-10-19s3-waf: make sure we always compile (not install) our libsmbclient testcode.Günther Deschner2-0/+87
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 19 20:42:52 CEST 2011 on sn-devel-104
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