Jeremy Allison
1fdc96ecaf
Fix bug #8139 - smbclient fails if server does not support Echo request.
...
Based on work by Matthias Scheler <tron@NetBSD.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 00:47:19 CET 2012 on sn-devel-104
2012-01-31 00:47:19 +01:00
Volker Lendecke
e9d66999c6
Introduce dump_data_file
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 25 11:57:18 CET 2012 on sn-devel-104
2012-01-25 11:57:18 +01:00
Masafumi Nakayama
909056a2da
s3-cli: fix bug 563, >8GB tar on BE machines
...
Borrows on existing patches proposed by Craig Barratt and Brad Ellis.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Tue Jan 3 18:31:28 CET 2012 on sn-devel-104
2012-01-03 18:31:28 +01:00
Jeremy Allison
c8a1082f2b
Move the callers that need to use the new cli_open() back to calling
...
it from cli_openx().
2011-12-03 21:36:47 -08:00
Jeremy Allison
4e709dc42f
Rename cli_open -> cli_openx. Prelude to replacing generic cli_open()
...
with a call that uses NTCreateX in preference to OpenAndX.
2011-12-03 21:13:08 -08:00
Jeremy Allison
3e0d923096
Ensure we map our own Samba return of ERRSRV, ERRunknownsmb
...
on an unknown SMB request to NT_STATUS_NOT_IMPLEMENTED.
2011-12-02 20:41:02 +01:00
Jeremy Allison
010566215b
Convert smbclient to using NtCreateX by preference, fall back to openX on
...
'not implemented' or similar error.
2011-12-02 20:41:02 +01:00
Jeremy Allison
30d4484bf9
Add the "backup" toggle command to smbclient. In order for this to be
...
really useful we need to change to using NTCreateX opens by default in
cli_open() and fall back to old OpenX calls instead of doing it the
other way around.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 2 00:23:13 CET 2011 on sn-devel-104
2011-12-02 00:23:13 +01:00
Stefan Metzmacher
694b7d6f77
s3:client: make use of cli_tree_connect()
...
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
ff66e521e0
s3:client: s/Undefined/SMB_SIGNING_DEFAULT/
...
metze
2011-11-03 16:55:12 +01:00
Bram
d883cc664c
Bug 7551: Return error of cli_push when 'put - /some/file' is used
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 29 23:47:02 CEST 2011 on sn-devel-104
2011-09-29 23:47:02 +02:00
Stefan Metzmacher
58482494fd
s3:clitar: remove unused/not existing extern variables
...
metze
2011-09-13 13:16:07 +02:00
Stefan Metzmacher
3e227d8544
s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 8 10:21:50 CEST 2011 on sn-devel-104
2011-09-08 10:21:50 +02:00
Stefan Metzmacher
5e59a36beb
s3:client: make use of cli_state_protocol()
...
metze
2011-08-02 04:54:29 +02:00
Michael Adam
bff217cf4a
s3:smbspool: use lp_load_client()
2011-07-28 11:17:27 +02:00
Michael Adam
0c55a7606f
s3:smbclient: use lp_load_client()
2011-07-28 11:17:27 +02:00
Björn Baumbach
78f267df69
s3-client/client.c: replace cli_query_secdesc_old()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:30:38 +02:00
Björn Baumbach
768646c9a2
s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()
...
Will introduce new cli_query_secdesc() function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Björn Baumbach
bffc521a8a
s3-client/clitar.c: replace cli_read_old() with cli_read()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:26 +02:00
Stefan Metzmacher
9a3e15df7e
s3:client: make use of cli_state_remote_name()
...
metze
2011-07-22 17:06:09 +02:00
Michael Adam
2b4bb9b7a1
s3:smbclient: print nt status code when smb echo fails
2011-07-22 15:42:17 +02:00
Michael Adam
d67a91b955
s3:smbclient: add a "tdis" command to view and change the tree id (tid).
...
This low level command can be used to switch between tree connects in one
session.
2011-07-22 15:42:17 +02:00
Michael Adam
7327bde81a
s3:smbclient: add a "tdis" command to do a tree disconnect (close a connection to a share)
2011-07-22 15:42:17 +02:00
Michael Adam
88d0e44df3
s3:smbclient: add a "tcon" command to do a tree connect (connect to a share)
2011-07-22 15:42:16 +02:00
Michael Adam
281c6d02bd
s3:smbclient: add "logoff" command to close the session
2011-07-22 15:42:16 +02:00
Stefan Metzmacher
25447a528a
s3:libsmb: move cli->vuid to cli->smb1.uid and hide it behind cli_state_[g|s]et_uid()
...
metze
2011-07-21 22:08:52 +02:00
Björn Baumbach
9b168e128a
s3-libsmb: replace cli_read() with cli_read_old()
...
Will introduce new cli_read() function.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Jeremy Allison
ee34c25c8a
First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems
...
Remove
int toupper_ascii(int c);
int tolower_ascii(int c);
int isupper_ascii(int c);
int islower_ascii(int c);
and replace with their _m equivalents, as they are identical.
2011-07-19 13:19:29 -07:00
Stefan Metzmacher
6ec26f0c1a
s3:client: simplify readline_callback() to only use cli_echo()
...
cli_echo() already swallows NBT keepalive messages,
so there's no need to filter them in the 'smbclient' layer.
metze
2011-07-11 18:18:27 +02:00
Stefan Metzmacher
fccc607a5d
s3:client: use an inbuf on the stack in readline_callback()
...
metze
2011-07-08 14:09:11 +02:00
Stefan Metzmacher
f0e6e5c37d
s3:libsmb: remove unused enum smb_read_errors infrastructure
...
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
2b8e148084
s3:client: close the socket if receive_smb_raw() fails
...
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
0ecd15abe6
s3:client: use cli_nt_error() in order to avoid cli_errstr()
...
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
f5b0bbf108
s3:client: avoid cli_errstr() where we already have an NTSTATUS
...
metze
2011-07-08 14:09:07 +02:00
Stefan Metzmacher
5cc279eb34
s3:clitar: avoid usage of cli_errstr()
...
metze
2011-07-08 14:09:07 +02:00
Björn Baumbach
80c65416c1
s3-client: Remove use of cli_errstr()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
2b0cc3c412
s3:libsmb: use clistr_pull_talloc() in cli_get_fs_volume_info()
...
metze
2011-07-06 17:18:13 +02:00
Volker Lendecke
7d96a4594b
s3: Remove cli_errstr from cmd_posix_open
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul 6 09:45:11 CEST 2011 on sn-devel-104
2011-07-06 09:45:11 +02:00
Volker Lendecke
c33a5a659c
s3: Fix error logic in posix_open
2011-07-06 08:35:27 +02:00
Volker Lendecke
c1fdec7efc
s3: Remove a few uses of cli_errstr
2011-07-06 08:35:27 +02:00
Volker Lendecke
26782fbbf3
s3: make cli_resolve_path return NTSTATUS
...
This looks larger than it is. No parameters needed changing.
2011-07-06 08:35:27 +02:00
Volker Lendecke
80838491e6
s3: Make cli_cm_open return NTSTATUS
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul 3 23:57:53 CEST 2011 on sn-devel-104
2011-07-03 23:57:53 +02:00
Volker Lendecke
e2498b1110
s3: Read symlink information in smbclient "allinfo"
2011-07-03 11:31:29 +02:00
Volker Lendecke
c8d374a0f2
s3: Fix an error message in smbclient symlink
2011-06-24 21:24:17 +02:00
Volker Lendecke
daec41c846
s3: Use reparse point style symlinks
2011-06-24 21:24:17 +02:00
Volker Lendecke
d637cd2380
s3: Remove a call to cli_errstr
2011-06-24 21:24:17 +02:00
Andrew Bartlett
74eed8f3ed
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
...
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
3ccc760947
s3-param Remove special case for lp_workgroup()
...
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
5e26e94092
s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653
s3-talloc Change TALLOC_ARRAY() to talloc_array()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Jeremy Allison
1cee71713f
Change sys_getcd() to take no arguments and always return malloc'ed memory (or NULL).
...
Part of the efforts to remove PATH_MAX on modern systems.
2011-06-01 02:54:51 +02:00
Volker Lendecke
edfa62f2a0
s3: Use cli_connect_nb in do_message_op
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun May 29 10:11:54 CEST 2011 on sn-devel-104
2011-05-29 10:11:54 +02:00
Björn Baumbach
26f7c0771b
s3-client/clitar.c: Fix cli_errstr() usage (part of bug #7864 )
...
Convert cli_errstr() to nt_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-05-18 10:55:15 +02:00
Günther Deschner
675573d54b
s3-includes: finally only include client.h when libsmb is used.
...
Guenther
2011-05-06 16:37:22 +02:00
Günther Deschner
27022587e3
s3-libsmb: move protos to libsmb/proto.h
...
Guenther
2011-05-06 16:37:18 +02:00
Jeremy Allison
9eee6e2fd2
More const fixes... getting near the end now.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 6 00:57:00 CEST 2011 on sn-devel-104
2011-05-06 00:57:00 +02:00
Jeremy Allison
f85e095dd2
More simple const fixups.
2011-05-05 23:56:08 +02:00
Jeremy Allison
8380835fc6
Fix warning messages caused by addition of null check in fstrcpy macro.
2011-05-04 12:12:15 -07:00
Jeremy Allison
df023b8657
Tidy up some missing checks for NULL in strlcpy.
2011-05-04 12:12:15 -07:00
Jeremy Allison
6f7c4a0539
Convert safe_strXX to strlXXX. Clean up off-by-ones.
2011-05-04 12:12:15 -07:00
Jeremy Allison
0c464df22b
Change safe_strcpy_base to strlcpy_base. Note the size doesn't change here as the original macro auto-added the -1.
2011-05-04 12:12:14 -07:00
Andrew Bartlett
724915f721
s3-client Add TALLOC_CTX argument to attrib_string().
...
This ensures the caller knows where the memory was allocated.
Andrew Bartlett
2011-04-29 16:38:14 +10:00
Andrew Bartlett
0520da2bbe
s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0eca33bbf6
s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554
s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
317e19aeb3
s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:12 +10:00
Andrew Bartlett
7f66ebde2e
s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:12 +10:00
Volker Lendecke
0226428eb9
s3: Use cli_writeall instead of cli_write
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-26 12:22:55 -07:00
Volker Lendecke
25b43d317f
s3: Use cli_ntcreate to when listing snapshots
...
This works for directories as well
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Mar 30 14:37:02 CEST 2011 on sn-devel-104
2011-03-30 14:37:02 +02:00
Günther Deschner
2473c2fb1b
s3-libsmb: put namequery headers to nmblib.h
...
We might find a better name for it and merge other namequery related things as
well here...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
0e771263ee
s3-includes: only include system/filesys.h when needed.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
49fcf653b1
s3-includes: only include system/passwd.h when needed.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
99f4a64543
s3-trans2: only include trans2.h where needed.
...
Guenther
2011-03-30 01:13:06 +02:00
Volker Lendecke
7c868e6174
s3: Fix Coverity ID 83: RESOURCE_LEAK
2011-03-27 22:22:10 +02:00
Volker Lendecke
b47b4c9e3d
s3: Remove two calls to cli_errstr
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 13:17:47 CEST 2011 on sn-devel-104
2011-03-27 13:17:47 +02:00
Günther Deschner
7a91282c9f
s3-libsmb: only include rap client when needed.
...
Guenther
2011-03-15 21:16:35 +01:00
Volker Lendecke
dee53e04ba
s3: Print all flags in "smbclient allinfo"
2011-03-02 18:39:21 +01:00
Andreas Schneider
bf18403c81
s3-rpc_client: Move client pipe functions to own header.
2011-02-28 18:15:04 +01:00
Volker Lendecke
5b26cfe143
s3: Eliminate sys_select from do_smb_resolve() -- untested
2011-02-28 16:40:20 +01:00
Volker Lendecke
b28a2e519a
s3: Eliminate sys_select from do_smb_browse() -- untested
2011-02-28 16:40:19 +01:00
Volker Lendecke
e6f8208358
s3: Eliminiate sys_select_intr from client.c
2011-02-28 16:40:19 +01:00
Björn Baumbach
07ccc2905d
s3-smbclient: Fix cli_errstr() usage (part of bug #7864 )
...
Convert cli_errstr() to nt_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 25 11:41:53 CET 2011 on sn-devel-104
2011-01-25 11:41:53 +01:00
Björn Baumbach
09c612f377
s3-smbclient: Fix cli_errstr() usage (part of bug #7864 )
...
Convert cli_errstr() to nt_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-01-25 10:45:22 +01:00
Volker Lendecke
d3abc90401
s3: Avoid a few calls to cli_errstr
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jan 17 08:47:25 CET 2011 on sn-devel-104
2011-01-17 08:47:25 +01:00
Günther Deschner
fccfd29283
s3-smbclient: prefer dcerpc_srvsvc_X functions.
...
Guenther
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-13 14:11:29 +01:00
Volker Lendecke
28d997a890
s3: AllowDebugChange is gone
2010-12-28 17:18:14 +01:00
Volker Lendecke
bfc4fe4012
s3: Remove unused "retry" from cli_start_connection
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Dec 20 17:58:33 CET 2010 on sn-devel-104
2010-12-20 17:58:33 +01:00
Volker Lendecke
e0e4dc1c22
s3: Add shadow copy info to smbclient allinfo
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov 30 12:23:50 CET 2010 on sn-devel-104
2010-11-30 12:23:50 +01:00
Volker Lendecke
ddd33f0351
s3: Make cli_set_ea_path return NTSTATUS
2010-11-11 16:16:24 +00:00
Andrew Bartlett
ed111d11eb
s3-debug Move 'load_case_tables()' before lp_set_cmdline() and popt calls
...
The problem here is that we cannot run lp_set_cmdline() (directly or
indirectly via the popt helpers) until load_case_tables() has been run.
However, load_case_tables does not have auto-initialisation, so we
must init it once, and once only.
Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
cf4de8ec2c
s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() instead
...
By removing this global variable, the API between the two different
debug systems is made more similar. Both s3 and s4 now have
lp_set_cmdline() which ensures that the smb.conf cannot overwrite
these the user-specified log level.
Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9
s3-debug Impove setup_logging() to specify logging to stderr
...
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.
Andrew Bartlett
2010-11-02 04:36:04 +00:00
Jeremy Allison
14ff2e8de9
Fix bug #7700 - Improvement of return code of smbclient
...
Based on an initial patch from H Hasegawa <hasegawa.hiroyuki@fujixerox.co.jp>.
Convert cli_list and associated functions to take calls that return NTSTATUS.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 29 19:40:16 UTC 2010 on sn-devel-104
2010-10-29 19:40:16 +00:00
Volker Lendecke
40cc1a3d2e
s3: Add "setea" to smbclient
2010-10-24 20:46:28 +00:00
Volker Lendecke
86cb0ad242
s3: Add "geteas" to smbclient
2010-10-24 20:46:28 +00:00
Volker Lendecke
c095809c04
s3: Convert cli_qfileinfo_basic to cli_qfileinfo
2010-10-24 11:39:30 +02:00
Volker Lendecke
03333fc68c
s3: Rename cli_fileinfo() to cli_fileinfo_basic()
2010-10-24 11:39:29 +02:00
Andrew Bartlett
f768b32e37
libcli/security Provide a common, top level libcli/security/security.h
...
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.
This includes (along with other security headers) dom_sid.h and
security_token.h
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
0ff7e0c998
samba: share readline wrappers among all buildsystems.
...
Guenther
2010-10-01 22:30:22 +02:00
Günther Deschner
405b7d843f
s3-readline: move cmd_history to smbclient, the only user.
...
Guenther
2010-10-01 22:30:22 +02:00
Günther Deschner
b38d0542e1
samba: share select wrappers.
...
Guenther
2010-10-01 22:30:22 +02:00
Björn Jacke
10eefd85c9
s3: fix order of arguments in nsec_time_diff call
2010-09-17 13:49:11 +02:00
Björn Jacke
aada719694
s3: use nsec_time_diff instead of TspecDiff
2010-09-16 21:38:20 +02:00
Björn Jacke
5728b0fb5f
s3: use monotonic clock for time deltas in smbtar
2010-08-31 10:26:09 +02:00
Björn Jacke
fc67675028
s3: use monotonic clock for time deltas in smbclient
2010-08-31 10:26:04 +02:00
Jeremy Allison
af081ec4a1
Fix bug 7627 - smbclient ignores "-I" when used with "-L", fails name resolution.
...
Still needs some more work to fix missing netbios name issues, but fixes
underlying issue of IP address being ignored.
Jeremy.
2010-08-20 15:57:08 -07:00
Jeremy Allison
34230608df
Fix bug 7563 - Creation of symlink using smbclient is buggy.
...
Fix semantics of symlink. "oldpath" should be an untouched blob,
"newpath" should fit the share path semantics.
Jeremy.
2010-08-18 15:51:43 -07:00
Volker Lendecke
734f581906
s3: Replace some cli_errstr calls by nt_errstr
2010-08-13 16:03:04 +02:00
Andreas Schneider
ce2a086119
s3-popt: Only include popt-common.h when needed.
2010-08-05 12:08:31 +02:00
Volker Lendecke
867626abca
s3: Convert cli_list() to return NTSTATUS
...
If needed, the callback functions can count themselves
2010-08-04 20:32:50 +02:00
Volker Lendecke
fcdda8f443
s3: Remove "cli" from "struct finfo"
2010-07-30 17:01:33 +02:00
Volker Lendecke
dace013898
s3: Remove a typedef (struct file_info)
2010-07-27 21:05:35 +02:00
Volker Lendecke
2ad4b4f63e
s3: Convert cli_qpathinfo_streams to cli_qpathinfo_send
2010-07-26 23:01:38 +02:00
Volker Lendecke
f62bde93ce
s3: Convert cli_qpathinfo2 to cli_qpathinfo_send
2010-07-26 23:01:37 +02:00
Volker Lendecke
9a2d08bd3c
s3: Use error status instead of cli_errstr
2010-07-26 23:01:37 +02:00
Jeremy Allison
8ce15b3a71
Fix bug - 7551 smbclient does not return proper exit code.
...
Catch error in cli_push.
Jeremy.
2010-07-15 16:06:11 -07:00
Andreas Schneider
ee01fe8c5b
s3-client: Make sure we only write to an opened file.
...
Found by clang-analyzer.
2010-06-29 11:12:12 +02:00
Günther Deschner
7f6bb48bdf
s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
...
Guenther
2010-05-18 12:30:12 +02:00
Jeremy Allison
f3b8e31f83
Split out the client unix capabilities to those the server offered, and those the client asked for.
...
This fixes a bug when using encrypted transport and DFS links. Found
by my basic DFS torture test, which I'll check in next. Testing *rocks* :-).
Jeremy.
2010-04-13 18:41:14 -07:00
Jeremy Allison
f1fe808978
Add an "attributes" string to allinfo.
...
Jeremy.
2010-02-22 14:36:40 -08:00
Volker Lendecke
2beaa19029
s3: Slightly simplify the logic of completion_remote_filter
2010-02-20 18:59:30 +01:00
Volker Lendecke
1f451d122e
s3: Remove a "typedef struct"
2010-02-20 18:59:30 +01:00
Volker Lendecke
f27857e655
s3: Fix a typo
2010-02-20 18:59:30 +01:00
Volker Lendecke
8930a9c520
s3: Convert cli_qpathinfo_basic to use cli_trans()
2010-02-20 18:59:30 +01:00
Volker Lendecke
6e510b49c0
s3: Make cli_get_fs_volume_info() use cli_trans()
2010-02-07 12:29:25 +01:00
Volker Lendecke
24d4433bd7
s3: Move "yesno" to the only place where it is used: client.c
2010-01-21 12:58:11 +01:00
Volker Lendecke
33601b8632
s3: Pass fake_dir_create_times down to file_exist_stat, none of the callers look at the mtime
2009-11-29 11:22:04 +01:00
Volker Lendecke
5ba42b0a5b
s3: "tar_parseargs" only looks at the mtime
2009-11-29 11:22:02 +01:00
Volker Lendecke
e1f53e5d49
s3: "dotareof" only looks at the file type
2009-11-29 11:22:02 +01:00
Volker Lendecke
932ab0c299
s3: client "newer" does not look at the create timestamp
2009-11-29 11:22:02 +01:00
Volker Lendecke
44ce5603dd
s3: Pass the "fake dir create times" parameter to sys_*stat
...
Step 0 to restore it as a per-share paramter
2009-11-29 11:22:01 +01:00
Günther Deschner
3d679a3b5f
s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
...
Guenther
2009-11-26 20:03:17 +01:00
Volker Lendecke
a1a81ef785
Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"
...
This reverts commit e23d8a3d1f
.
2009-11-23 16:35:00 +01:00
Volker Lendecke
d6e55d8ec0
Revert "s3: Make the implicit reference to Protocol in mask_match_list() explicit"
...
This reverts commit 1e22899d26
.
2009-11-23 16:35:00 +01:00
Volker Lendecke
0f8e2a6ebb
Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
...
This reverts commit c85a4c9ba4
.
2009-11-23 16:34:59 +01:00
Volker Lendecke
c85a4c9ba4
s3: Move the global variable Protocol to struct smbd_server_connection
2009-11-21 20:49:17 +01:00
Volker Lendecke
1e22899d26
s3: Make the implicit reference to Protocol in mask_match_list() explicit
2009-11-21 20:49:17 +01:00
Volker Lendecke
e23d8a3d1f
s3: Make the implicit reference to Protocol in mask_match() explicit
2009-11-21 20:49:16 +01:00
Volker Lendecke
f668e4104f
s3: Convert cli_set_unix_extensions_capabilities_send to async
2009-11-14 11:03:28 +01:00
Volker Lendecke
f9ad5cd133
s3: Convert cli_unix_extensions_version to async
2009-11-13 09:30:30 +01:00
Jeremy Allison
5363d6e62c
Ensure all callers to the rpc_client/cli_pipe functions correctly
...
initialize return variables.
Jeremy.
2009-11-12 13:56:33 -08:00
Volker Lendecke
2b75933960
s3: Convert libsmb/cli_message to the async API
2009-11-10 23:48:22 +01:00
Jeremy Allison
e67de63ba6
Make cli_posix_lock/unlock asynchronous.
...
Jeremy.
2009-07-13 18:43:10 -07:00
Jeremy Allison
661f0ba73b
Fix coverity #729 . Resource leak in error path.
...
Jeremy.
2009-06-19 17:26:53 -07:00
Jeremy Allison
ba4d51c521
Fix bug #2356 - smbclient -t <term code> no longer works.
...
Removed code and docs.
Jeremy.
2009-06-03 09:44:49 -07:00
Jelmer Vernooij
8d033ec0d1
Move mount.cifs/umount.cifs to the top level and remove the outdated copy
...
in Samba 4.
2009-06-02 23:24:33 +02:00
Jeremy Allison
9df85a9374
Make cli_posix_chown()/cli_posix_chmod() async.
...
Jeremy.
2009-05-28 16:15:09 -07:00
Jeremy Allison
656e86d5fa
Make cli_posix_stat() async.
...
Jeremy.
2009-05-28 13:32:00 -07:00
Jeremy Allison
d74e42e0ec
Make getfacl async.
...
Jeremy.
2009-05-28 13:05:50 -07:00
Jeremy Allison
bd11948107
Add a smbclient "readlink" command and add docs for it.
...
Jeremy.
2009-05-27 22:02:20 -07:00
Jeremy Allison
f55c7614bd
Add aync POSIX hardlink and symlink and torture test for them.
...
Missing call cli_readlink() is next.
Jeremy.
2009-05-27 17:28:23 -07:00
Volker Lendecke
49ca690b4b
Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
...
This patch introduces
struct stat_ex {
dev_t st_ex_dev;
ino_t st_ex_ino;
mode_t st_ex_mode;
nlink_t st_ex_nlink;
uid_t st_ex_uid;
gid_t st_ex_gid;
dev_t st_ex_rdev;
off_t st_ex_size;
struct timespec st_ex_atime;
struct timespec st_ex_mtime;
struct timespec st_ex_ctime;
struct timespec st_ex_btime; /* birthtime */
blksize_t st_ex_blksize;
blkcnt_t st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;
It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.
Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.
At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.
It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Jeremy Allison
000da55dd9
Make cli_posix_open() and cli_posix_mkdir() async.
...
Jeremy.
2009-05-20 18:31:36 -07:00
Jeremy Allison
0a8bb37fa2
Oops. Forgot to delete now unused local from the previous patch.
...
Jeremy.
2009-05-15 16:16:47 -07:00
Ole Hansen
ad7dca471a
Fix bug #6359 - smbclient -L does not list workgroup for hosts with both IPv4 and IPv6 addresses
2009-05-15 16:13:59 -07:00
Jeff Layton
b0c399ce60
mount.cifs: directly include sys/stat.h in mtab.c
...
This file is mysteriously getting included when built via the makefile,
but when you try to build mtab.o by hand it fails to build. Directly
include it to remove any ambiguity.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2009-05-15 14:31:28 -04:00
Steve French
d35a3952f0
Maximum password length check too short in mount.cifs
...
Windows allows up to 127 byte passwords, and we using a 64 byte limit
in most places and a 16 byte limit when using the "pass=" mount option
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2009-05-14 15:04:27 -05:00
Jeremy Allison
606edf0f35
Make cli_setatr async.
...
Jeremy.
2009-05-06 16:13:42 -07:00
Jeremy Allison
4cbd0c77e4
Make cli_getatr() async.
...
Jeremy.
2009-05-05 20:59:22 -07:00
Jeremy Allison
e091fdc565
Make cli_getattrE async.
...
Jeremy.
2009-05-05 16:28:44 -07:00
Volker Lendecke
4949a2cfaa
Fix some warnings due to uint16_t!=-1 always being true
2009-05-03 22:48:31 +02:00
Jeremy Allison
f3af298e5b
Cause cli_close to return an NTSTATUS.
...
Jeremy.
2009-04-30 16:57:42 -07:00
Jeremy Allison
8cf78ff553
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
...
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
2009-04-30 15:26:43 -07:00
Jeremy Allison
370e7209db
Make cli_unlink async.
...
Jeremy.
2009-04-29 18:26:02 -07:00
Jeremy Allison
edd25980b0
More async calls in libsmb/clifile.c
...
Jeremy.
2009-04-29 10:48:16 -07:00
Jeremy Allison
bd6447dcf2
Convert cli_rename to async.
...
Jeremy.
2009-04-28 16:43:16 -07:00
Jeremy Allison
06e404f574
Convert cli_posix_unlink() and cli_posix_rmdir()
...
to async. First trans calls I've done.
Jeremy.
2009-04-28 13:18:51 -07:00
Jeremy Allison
455f2a4c65
Make dskattr async.
...
Jeremy.
2009-04-22 08:04:53 -07:00
Jeremy Allison
502f47c7c0
Make cli_chkpath async.
...
Jeremy
2009-04-22 06:46:42 -07:00
Jeremy Allison
5ccf58ff59
Make rmdir async.
...
Jeremy.
2009-04-21 06:52:54 -07:00
Jeremy Allison
dfc79de607
Make cli_mkdir async. Change it to return NTSTATUS.
...
Jeremy.
2009-04-21 05:52:34 -07:00
Jelmer Vernooij
4c32978d97
Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
...
the system one is broken.
2009-04-20 23:58:26 +02:00
Jeremy Allison
8dd1faaa29
Remove the global "struct cm_cred_struct" and associated calls, make
...
callers pass in a struct user_auth_info * instead. This commit causes
smbc_set_credentials() to print out a message telling callers to use
smbc_set_credentials_with_fallback() instead, as smbc_set_credentials()
has a broken API (no SMBCCTX * pointer). No more global variables used
in the connection manager API for client dfs calls.
Jeremy.
2009-03-17 14:53:06 -07:00
Volker Lendecke
8174a90e43
Fix #3954
2009-03-14 12:40:58 +01:00
Jeremy Allison
e5136e9849
Remove the static "struct client_connection" mess which is part of
...
the problem that stops libsmbclient being thread safe. Subsidiary
DFS connections are now hung off a list inside the cli_state struct.
Much more to do in order to get libsmbclient to thread safety, but
this is a good start.
Jeremy.
2009-03-12 17:59:24 -07:00
Stefan Metzmacher
2fdbafbf54
Revert "s3:libsmb: add an option to cli_push to let the caller provide the buffers"
...
This reverts commit 9579a6f193
.
It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.
We can readd a extra function later.
metze
2009-03-12 11:03:50 +01:00
Stefan Metzmacher
9579a6f193
s3:libsmb: add an option to cli_push to let the caller provide the buffers
...
metze
2009-03-10 14:07:56 +01:00
Jeremy Allison
66c0f3690a
Fix bug #6161 - smbclient corrupts source path in tar mode
...
This was my fault. I broke the smbclient tar argument processing
in creating the string for chdir when removing pstrings.
Jeremy.
2009-03-05 17:19:18 -08:00
Steve French
d75df71733
Fix guest mounts
...
guest session setup, login (user id) as anonymous.
This patch is for samba bugzilla bug 4640.
Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@samba.org>
2009-02-24 20:53:46 -06:00
Michael Adam
d7ca499701
s3:mount.cifs: make "mount.cifs -V" print the version, not usage.
...
Also make "mount.cifs -h" not exit with error exit code but with return code 0.
Michael
2009-02-24 16:59:55 +01:00
Michael Adam
6e16c5eed5
s3:mount.cifs: don't error exit on explicitly requested help...
...
Michael
2009-02-24 16:59:54 +01:00
Jeremy Allison
faa1100d22
More warning fixes for Solaris.
...
Jeremy.
2009-02-23 16:22:43 -08:00
Volker Lendecke
0844cca1d5
Replace get_myname() with the talloc version from v3-3-test
2009-02-13 12:15:03 +01:00
Volker Lendecke
1b6543c5f9
Fix Coverity IDs 879 and 880 (RESOURCE_LEAK, REVERSE_INULL)
2009-02-12 23:02:53 +01:00
Jeff Layton
d895ca505f
mount.cifs: initialize rc to 0 in main
...
The value of rc in main() isn't initialized in the declaration. This
wasn't a problem before, but Shirish's fakemount patch can make it so
that we return the uninitialized variable if the -n flag is used.
Fix this by initializing rc to 0.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2009-02-06 08:29:58 -05:00
Shirish Pargaonkar
ea8bd81b6e
mount.cifs: add fakemount (-f) and nomtab (-n) flags to mount.cifs
...
...so that these options work correctly when passed in by mount(8).
2009-02-06 08:13:38 -05:00
Shirish Pargaonkar
16d2fdf575
umount.cifs: clean-up entries in /etc/mtab after unmount
...
This patch removes the remaining entry in /etc/mtab after a filesystem
is unmounted by canonicalizing the mountpoint supplied on the command
line.
Please refer to bug 4370 in samba bugzilla.
2009-02-05 14:12:42 -05:00
Volker Lendecke
0bd92281e4
Make cli_tcon_andx async
2009-01-30 12:47:59 +01:00
Michael Adam
39ec8791f8
s3: make better use of ccache by not including version.h in every C-file.
...
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:
* When building a new package with a new Samba version
* building in a git branch after calling mkversion.sh
after a new commit (i.e. virtually always)
This patch improves the situation in the following way:
* remove inlude "version.h" from includes.h
* Use samba_version_string() instead of SAMBA_VERSION_STRING
in files that use no other macro from version.h instead of
SAMBA_VERSION_STRING.
* explicitly include "version.h" in those files that use more
macros from "version.h" than just SAMBA_VERSION_STRING.
Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
907f085296
Remove smbclient globals that bled into clidfs.c. Now we only have
...
the connections list and authentication structures to worry about.
Jeremy
2009-01-14 16:08:19 -08:00
Jeremy Allison
2c0a802cf8
Remove another global from clidfs that is only used in client.c.
...
Jeremy.
2009-01-14 14:26:56 -08:00
Jeremy Allison
590c9b7b6d
Fix bug #6021 - smbclient du command does not recuse properly
...
Jeremy.
2009-01-08 15:41:49 -08:00
Volker Lendecke
01891782fd
Fix bug 6014 -- mget shouldn't segfault without arguments
...
Thanks to kevin.paulus@mtm.kuleuven.be for the bug report
Volker
2009-01-05 15:53:26 +01:00
Jeremy Allison
3d2d0203e5
Remove cli_cm_set_dest_ss() - removes the global dest_ss
...
from libsmb/clidfs.c. Keep the '-I<address>' option in
smbclient working. The intent is to remove all globals
from libsmb/clidfs.c.
Jeremy.
2009-01-02 12:49:49 -08:00
Jeremy Allison
07e0094365
Fix all warnings in source3 with gcc4.3.
...
Jeremy.
2008-12-31 18:06:57 -08:00
Jeremy Allison
bb23f5725f
Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
...
Jeremy.
2008-12-31 16:30:11 -08:00
Volker Lendecke
32a7ecf5ce
Make smbclient "put" use cli_push
...
This should fill the TCP socket even beyond the smbclient io_bufsize, very much
like smbclient "get" should do it since 3.2
2008-12-19 23:33:55 +01:00
Volker Lendecke
daeb3a190d
Remove the global "cmdline_auth_info" from source3/lib/util.c
...
This involves changing all our clients, that's why it's so large.
2008-12-14 14:00:43 +01:00
Jeff Layton
9069c84907
mount.cifs: allow mounts to ipv6 capable servers
...
The current name resolution scheme in mount.cifs is IPv4 only. Expand
it to be protocol-independent. Also take advantage of the fact that
getaddrinfo() returns a list of addresses and have mount.cifs try each
in turn until it hits one that's reachable and allows the socket to
connect.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2008-12-12 07:00:38 -05:00
Steve French
420a9071e1
mount.cifs: if mount user not specified use USER environment variable
...
smbfs also would use the USER environment variable if the user was not
specified on the mount command and no credential file specified, and
mount.cifs man page says that we will use this environment variable
(in most cases this will not cause a behavior change, because
we were doing getuid of the current process which will usually be
the same name).
Fixes Samba bug #5934
Acked-by: Jeff Layton
2008-12-05 08:09:08 -06:00