summaryrefslogtreecommitdiff
path: root/source4/client/client.c
AgeCommit message (Collapse)AuthorFilesLines
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_full_connection()Stefan Metzmacher1-2/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_socket_connect()Stefan Metzmacher1-1/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:client: remove unused ports from do_connect()Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from smbcli_full_connection()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:client: remove unused destports from do_message_op()Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from smbcli_socket_connect()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-02-27smbclient: report kilobytes per second as kB/s, not kb/sDouglas Bagnall1-2/+2
https://bugzilla.samba.org/show_bug.cgi?id=11023 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2024-10-24s4:client: Fix memory leaks in smblcient4Andreas Schneider1-15/+21
==375711==ERROR: LeakSanitizer: detected memory leaks Direct leak of 20 byte(s) in 1 object(s) allocated from: #0 0x7f83838f6880 in strdup ../../../../libsanitizer/asan/asan_interceptors.cpp:578 #1 0x55a06cc7c244 in main ../../source4/client/client.c:3470 #2 0x7f837fe2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2024-10-24s4:client: Remove trailing spaces in client.cAndreas Schneider1-229/+229
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2023-09-11s4:client: Fix code spellingJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-08s4:client: Add missing newlines to logging messagesJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-02-17source4/torture: Drop unused variable attributeMartin Schwenke1-4/+0
clang complains: ../../source4/client/client.c:1569:11: error: variable 'attribute' set but not used [-Werror,-Wunused-but-set-variable] uint16_t attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN; ^ That is, the variable is initialised and updated but the value is never used. Commit 2f377d5101783ed4d8c96a46aaec61895cc7b6ad from 2004 dropped the use of this variable. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 17 19:06:25 UTC 2022 on sn-devel-184
2021-09-10s4/smbclient: don't ignore unknown optionsRalph Boehme1-0/+5
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-06-16s4:client: Migrate smbclient4 to new cmdline option parserAndreas Schneider1-18/+42
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-16s4:client: Use a creds helper variableAndreas Schneider1-5/+10
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-03-16lib: Remove init_names()Volker Lendecke1-2/+0
is_myname() looks at lp_* directly, nmbd maintains its own list: We don't need the baroque loadparm handler anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-28lib/util: remove extra safe_string.h fileMatthew DeVore1-0/+2
lib/util/safe_string.h is similar to source3/include/safe_string.h, but the former has fewer checks. It is missing bcopy, strcasecmp, and strncasecmp. Add the missing elements to lib/util/safe_string.h remove the other safe_string.h which is in the source3-specific path. To accomodate existing uses of str(n?)casecmp, add #undef lines to source files where they are used. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 28 02:18:40 UTC 2020 on sn-devel-184
2020-07-16s4:client: Remove code inside #ifdef NEXT2Christof Schmitt1-5/+0
This is dead code, the define is never set. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2019-01-28s4:client: Use C99 initializer for poptOption in clientAndreas Schneider1-9/+71
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-03s4:client: Fix size types and loopAndreas Schneider1-5/+3
This fixes compilation with -Wstrict-overflow=2. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-03-20s4:client: Fix size typesAndreas Schneider1-4/+4
This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-05-13s4: client: Allocate event context off struct smbclient_context *, not ↵Jeremy Allison1-1/+1
talloc_autofree_context(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-11s4: popt: Global replace of cmdline_credentials -> ↵Jeremy Allison1-4/+10
popt_get_cmdline_credentials(). Add one use of popt_set_cmdline_credentials(). Fix 80 column limits when cmdline_credentials changes to popt_get_cmdline_credentials(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-02-15lib: Fix "is_case_sensitive" in "ms_fnmatch_protocol"' callersVolker Lendecke1-16/+6
In the optimization in f969be54417 I got the boolean flag "is_case_sensitive" wrong. The behaviour was case *insensitive*, so all the flags should have been "false", keeping the old behaviour. While there, simplify "mask_match" in source4 client.c Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Feb 15 11:40:32 CET 2017 on sn-devel-144
2017-01-22lib: Add "is_case_sensitive" to ms_fnmatch_protocolVolker Lendecke1-3/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2016-12-11smbclient4: xfile->stdioVolker Lendecke1-15/+15
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-12-01smbclient: fix string formatting in print commandDouglas Bagnall1-6/+17
At one time, the variables lname and rname were char arrays, but now they are pointers. When they were arrays, sizeof(rname) was the length of the array, but now it gives the size of the pointer which is not what we want. In the case where the filename is -, rname was alloced as size 1, which could never fit the name it wanted to have contain ("stdin-<pid>"). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-05-13s4:client: fix O3 error unused result of of chdir and systemMichael Adam1-5/+27
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2015-03-18s4/client: add FS_SECTOR_SIZE_INFORMATION query supportDavid Disseldorp1-0/+17
Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-13s4:client: fix some compiler warningsStefan Metzmacher1-7/+10
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2013-03-06Make sure to set umask() before calling mkstemp().Andreas Schneider1-0/+3
Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
2013-03-05s4-client: Make sure entry is a valid string.Andreas Schneider1-2/+8
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-02-22s4-client: Don't leak memory.Andreas Schneider1-0/+2
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-client: Don't leak file descriptor.Andreas Schneider1-0/+7
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-client: Don't leak resource handle.Andreas Schneider1-0/+2
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2012-12-21s4-client: Check return codes in do_connect().Andreas Schneider1-2/+18
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-12s4-client: Make sure we have a valid count if we goto cleanup.Andreas Schneider1-1/+2
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2011-11-30s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()Stefan Metzmacher1-8/+10
metze
2011-11-03s4: add some missing header dependencies.Günther Deschner1-0/+2
Guenther
2011-09-19s4-client: added close command in smbclientAndrew Tridgell1-4/+62
this matches the existing open command, and also gives you error codes on both open and close useful for testing share mode locking Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Sep 19 23:59:28 CEST 2011 on sn-devel-104
2011-06-06s4-modules Remove lp_ctx from init functions that no longer need itAndrew Bartlett1-1/+1
Now that we don't allow the smb.conf to change the modules dir, many functions that simply load modules or initialise a subsytem that may load modules no longer need an lp_ctx. Andrew Bartlett
2011-05-06lib/util Rename ms_fnmatch() to ms_fnmatch_protocol() to avoid dup symbolAndrew Bartlett1-2/+2
This verison of the function takes a protcol as argument to determine matching rules. Andrew Bartlett
2011-05-04Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1.Jeremy Allison1-2/+2
2011-05-03Remove strlower_m() and strupper_m() from source4 and common code.Andrew Bartlett1-6/+8
This function is problematic because a string may expand in size when changed into upper or lower case. This will then push characters off the end of the string in the s3 implementation, or panic in the former s4 implementation. Andrew Bartlett
2010-12-06s4:client/client.c - fix Solaris warning by a type castMatthias Dieter Wallnöfer1-1/+1
2010-10-01samba: share readline wrappers among all buildsystems.Günther Deschner1-1/+1
Guenther
2010-09-10s4:client/client.c - fix wrong return codes in "do_connect"Matthias Dieter Wallnöfer1-2/+2
Detected by the Solaris cc compiler.
2010-07-16s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell1-11/+11
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-05-28s4:client/client.c - we don't need "&ctx" for talloc callsMatthias Dieter Wallnöfer1-1/+1
Simply use "ctx".
2010-05-28s4:client/client.c - fix "asprintf"sMatthias Dieter Wallnöfer1-9/+15
Fix the result values or change them into "talloc_asprintf"s where possible see bug #6404