Mathieu Parent
c315fce17e
Fix various spelling errors
...
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Nov 6 13:43:45 CET 2015 on sn-devel-104
2015-11-06 13:43:45 +01:00
Jeremy Allison
a47012d542
s3: smbclient: Move cmd_setmode out of clitar.c and back into client.c
...
setmode <file> attribute is a valid smbclient command even if libarchive
isn't on the system and tarmode isn't compiled in.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-09-18 07:58:15 +02:00
Anubhav Rakshit
cebcf0e4da
s3:client: Add "scopy" cmd to perform Server Side copy using smbclient.
...
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-07-14 13:04:17 +02:00
Richard Sharpe
589c7bc6d6
Convert all uint32/16/8 to _t in source3/client.
...
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-13 19:11:23 +02:00
Volker Lendecke
c51300ad89
lib: load_case_tables() -> smb_init_locale()
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Jeremy Allison
080ec0f7d9
s3: smbclient: Allinfo leaves the file handle open.
...
https://bugzilla.samba.org/show_bug.cgi?id=11094
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb 10 23:28:46 CET 2015 on sn-devel-104
2015-02-10 23:28:46 +01:00
Andreas Schneider
eb1bf816b6
s3-smbspool: Use strtol() instead of atoi().
...
This fixes a coverity warning.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-01-22 20:29:06 +01:00
Andreas Schneider
6557a0218a
s3-smbclient: Return success if we listed the shares.
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10960
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-24 18:52:05 +01:00
Volker Lendecke
dcd6373613
lib: Align unix_timespec_to_nt_time with nt_time_to_unix_timespec
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-30 22:28:14 +02:00
Jeremy Allison
66a04ba7c1
s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-06-07 03:15:14 +02:00
Jeremy Allison
69e24b4e8b
s3: client : Add extra return parameter to all client open calls.
...
Add a return parameter of struct smb_create_returns *cr to
cli_ntcreate()
cli_ntcreate_recv()
cli_nttrans_create()
cli_nttrans_create_recv()
Always pass in NULL for now. This fixes the create
API to always fully return the data the server has
given back to us on the open file to the caller.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-05-09 23:10:07 +02:00
Stefan Metzmacher
f0f245f4c8
s3:client: only limit the buffer by the given length 'n'
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05 10:06:24 -08:00
David Disseldorp
913b2a172d
clitar: don't panic, propagate talloc errors upwards
...
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Feb 21 02:49:36 CET 2014 on sn-devel-104
2014-02-21 02:49:35 +01:00
David Disseldorp
83a653fadb
clitar: propagate make_remote_path() talloc errors
...
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-21 12:03:02 +13:00
David Disseldorp
55de6d60ef
clitar: return allocation errors from is_subpath()
...
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-21 12:02:57 +13:00
David Disseldorp
852259773b
clitar: add error return to tar_path_in_list()
...
In preparation for propagation of memory allocation errors from
is_subpath().
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-21 12:02:52 +13:00
David Disseldorp
6d5b56dc7a
clitar: add error return to tar_extract_skip_path()
...
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-21 12:02:48 +13:00
David Disseldorp
4d9e1b68b7
clitar: add error return to tar_create_skip_path()
...
In preparation for propagation of memory allocation errors from
tar_path_in_list() and friends.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-21 12:02:43 +13:00
David Disseldorp
385f0c9ea0
clitar: check for path_base_name() allocation errors
...
Add a separate NTSTATUS return code, as base string may be NULL on
successful return.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-21 12:02:43 +13:00
David Disseldorp
43227c3d9f
cli: do not dump libarchive absence warning on startup
...
tar_parse_args() already prints the warning if a tarmode argument is
provided.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:31 +01:00
Andreas Schneider
6759008666
s3-clitar: Fix identation.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
995118484f
s3-clitar: Simplify is_subpath().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
3b207dc0f3
s3-clitar: Improve readabilty of fix_unix_path().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
ef150e7dfa
s3-clitar: Improve readabilty of max_token().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
4f6552c63b
s3-clitar: Improve readabilty of make_remote_path().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
98ede411e3
s3-clitar: Improve readabilty of tar_path_in_list().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
2ccba45d30
s3-clitar: Improve readabilty of tar_read_inclusion_file().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
f955bc4b5d
s3-clitar: Improve readabilty of tar_set_newer_than().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
75dbb27115
s3-clitar: Improve readabilty of tar_send_file().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
f58ef3878e
s3-clitar: Improve readabilty of tar_extract().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
f8ac29d1ac
s3-clitar: Improve readabilty of get_file_callback().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
4dd84bb830
s3-clitar: Improve readabilty of tar_create_from_list().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
87c5258fa3
s3-clitar: Improve readabilty of tar_parse_args().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
034da62e6b
s3-clitar: Improve readabilty of cmd_setmode().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:30 +01:00
Andreas Schneider
7bb9836c94
s3-clitar: Improve readabilty of cmd_tar().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:29 +01:00
Andreas Schneider
a65f557c6b
s3-clitar: Improve readabilty of cmd_block().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:29 +01:00
Andreas Schneider
3707fba088
s3-clitar: Use ARRAY_SIZE macro.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-19 18:22:29 +01:00
David Disseldorp
8dc6f0fb39
clitar: get tar context handle via helper function
...
Add and use tar_get_ctx() to get the tarmode context handle in client.c,
rather than declaring an extern.
Also, add checks for NULL context pointer arguments.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:29 +01:00
Aurélien Aptel
a66942df05
clitar.c: fix segfault in cmd_block()
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:29 +01:00
Aurélien Aptel
95f9e60ef7
s3: add --with-libarchive to build configuration
...
* skip tar tests if disabled
* print error message when using disabled command
* autodetection of libarchive
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: rebased against makefile cleanup]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:29 +01:00
Aurélien Aptel
b8844fcdae
clitar.c: check all allocations return value
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:29 +01:00
Aurélien Aptel
68305d90b3
clitar.c: create and free talloc context properly
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:29 +01:00
David Disseldorp
08f3c4e942
clitar: remove unnecessary public function prototypes
...
Public functions declared in clitar_proto.h needn't be listed as
prototypes in clitar.c.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:29 +01:00
Aurélien Aptel
44265721bc
clitar.c: add prototype, rearrange definition for easier reading.
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
5cd72b39b3
clitar.c: documentation
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
82dce8f7a8
clitar.c: honor regex flag, emulate old behaviour (and quirks), add tests
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: split from test changes already upstream]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
fc05ff32fd
clitar.c: blocksize in block unit, fix error handling in tar_create().
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
David Disseldorp
cae67383dd
client: fix tar_parse_args() compiler warning
...
tar_parse_args() requires a const argument array pointer.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
3a7efaa009
clitar.c: when returning int, always use 0 for success
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
9cb9077233
clitar.c: default block size was a multiple of TBLOCK
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
7c973de802
clitar.c: only list <include list> instead of whole share, handle wildcards
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
679cd16270
clitar.c: implement interactive command + respective test
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: split from test changes already upstream]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
3348b139d2
clitar.c: cosmetic changes
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
5f99b0915d
clitar.c: operation INCLUDE_LIST same as INCLUDE
...
use local variable during argument parsing to separate
the 2 cases.
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
6d0ff6d2f0
clitar.c: fix creation exclusion, don't reverse in exclusion mode
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Aurélien Aptel
b825854005
clitar.c: fix include mode bug
...
- if we include path/a/, path/ was skipped because
it's not in path/a/.
- solution: add a flag to tar_path_in_list() to also
check the opposite ie. if the list is in the path
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
cbad767ded
clitar.c: implement reset mode
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
e2b0092e1d
clitar: implement exclusion filter for extraction
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
d96e2b2052
clitar.c: implement dry mode, add total_size and fix write bug
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
d23074cece
clitar.c: add line in DBG macro
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
39a21cdce3
clitar.c: implement nosystem, nohidden and include filter.
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
9032fc7eec
clitar.c: implement basic tar creation
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
ec1583ebd4
clitar.c: don't create file when processing dir
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
b7f6fd26b6
clitar.c: implement basic full extraction
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
c9e23fd1a6
clitar.c: fix_unix_path() now replace / with \
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
dfd627b902
clitar.c: factor path_list handling in a function, remove tar_fd
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
5af65f87b5
clitar.c: update TAR_DEFAULT_BLOCK_SIZE comment
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
29542d1cb5
clitar.c: start processing tar files in extraction mode
...
- move default block size to a define
- add doc comments
- basic processing in tar_extract
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
ed9d22097d
client.c: fix negation in tar_to_process test
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: rebase against lp_cli_maxprotocol() changes]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:27 +01:00
Aurélien Aptel
50d069637d
client.c, clitar.c: rename process_tar to tar_process, prepare code
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
60eec86ceb
clitar.c, client.c: add flag to know if there's a tar operation to do.
...
- remove tar_type global.
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: rebase against lp_cli_maxprotocol() changes]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
b753900b09
clitar.c: fix path name when adding them
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
3a8e3264d0
clitar: use lowercase for bool value
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
113aa6f3d4
clitar.c: add tar_dump() debug function, fix bugs
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
431483e6b9
client.c: remove unused extern declaration
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
45a45c8eda
implement argument parsing, split client_proto.h
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
eebd378b6c
client.c: remove trailing whitespace
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
342d38eb4b
clitar.c: start of argument parsing
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
b9b5bc433d
clitar.c: add doc, remove _t suffix in enum name
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
a896f046fe
clitar.c: add cmd_setmode(), remove typedef
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
1d142c6237
clitar.c: expand context structure and implement cmd_block()
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:26 +01:00
Aurélien Aptel
2945596011
clitar.c: fresh new compilable file.
...
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:25 +01:00
Garming Sam
f548585051
param: rename lp function and variable from "cli_maxprotocol" to "client_max_protocol"
...
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Gregor Beck
f959dd44a0
client: use cli_qpathinfo3 for allinfo
...
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-30 15:23:51 -07:00
Gregor Beck
7e35a4dc73
client: remove a write only variable
...
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-30 15:23:51 -07:00
Jeremy Allison
75f353b857
s3: libsmb - 10150 - Not all OEM servers support the ALTNAME info level.
...
Sigh. Some OEM servers return NT_STATUS_NOT_IMPLEMENTED not
NT_STATUS_NOT_SUPPORTED.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-18 08:58:30 -07:00
Jeremy Allison
17a9a0f37b
s3: libsmb : Bug 10150 - Not all OEM servers support the ALTNAME info level.
...
Just ignore and print error message and an altname of "" if the
server returns NT_STATUS_NOT_SUPPORTED.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 17 23:40:08 CEST 2013 on sn-devel-104
2013-09-17 23:40:08 +02:00
Michael Adam
db1d0349c4
client: add missing newlines to error messages for invalid iosize parameter.
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 21 21:49:45 CEST 2013 on sn-devel-104
2013-08-21 21:49:44 +02:00
Jeremy Allison
d9c88a56dc
Add new "timeout" command and -t option to smbclient to set the per-operation timeout.
...
This is needed as once SMB3 encryption is selected the server
response time can be very slow when requesting large numbers
(256) of large encrypted packets (1MB) from a Windows 2012
virtual machine. This allows clients to tune their allowable
wait time.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:55 +02:00
Jeremy Allison
25521c9085
Remove restrictions on setting iosize inside smbclient for SMB2 connections.
...
Also remove the SMB1 restriction to minimum iosize of 16384 (0x4000):
Now values >= 0 and <= 0xFFFF00 can be set for SMB1, 0 meaning server
defined behaviour. 0 is the new default for iosize, both for SMB1 and SMB2.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:54 +02:00
Stefan Metzmacher
2394f8788d
s3:client: fix compiler warning
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:06 +02:00
Stefan Metzmacher
9b4692f2d0
s3:client: use the default io size
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:06 +02:00
Stefan Metzmacher
861ee9319f
s3:client: avoid interpret_protocol()
...
lp_set_cmdline("client max protocol",...) and
lp_cli_maxprotocol() are the more generic solution.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:05 +02:00
Günther Deschner
9813fe2b04
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
David Disseldorp
398ee49bda
s3/smbclient: fix incorrect command tab completions
...
smbclient commands can offer tab-completion for local and remote paths.
This behaviour is specified for the first two arguments using the
compl_args entry in the commands struct.
This change fixes a number of incorrectly specified compl_args values.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Jun 24 19:32:54 CEST 2013 on sn-devel-104
2013-06-24 19:32:53 +02:00
Andreas Schneider
90cbfc96d1
Make sure to set umask() before calling mkstemp().
...
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-06 01:16:34 +01:00
David Disseldorp
64eba0a842
BUG 9633: Recursive mget should continue on EPERM.
...
Regression introduced by 14ff2e8de9
.
When downloading files recursively, smbclient halts if it encounters
a folder to which it does not have permission to traverse.
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 7 15:50:36 CET 2013 on sn-devel-104
2013-02-07 15:50:36 +01:00
Scott Lovenberg
bd18d996e2
Clean up client timeout definitions [rev. 2]
...
The definitions for default client timeout values have been moved to client.h. When initializing a client struct we use this value instead of the old hardcoded value. The timeout value remains 20 seconds.
Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
Reviewed by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec 6 03:25:58 CET 2012 on sn-devel-104
2012-12-06 03:25:58 +01:00
Andreas Schneider
85b1b840cb
smbclient: Use new samba_getpass() function.
...
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:08 +01:00
Andreas Schneider
50d47fc081
s3fs-client: Burn commandline password of client utils.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 8 21:24:21 CET 2012 on sn-devel-104
2012-11-08 21:24:21 +01:00
Andrew Bartlett
c4f143f9d7
client: Fix talloc_stackframe() free order assertion in developer mode
...
Reported-by: Ricky Nance <ricky.nance@weaubleau.k12.mo.us>
2012-09-25 14:43:01 +10:00
Christian Ambach
cf7f68503d
s3:client use more access bits for snapshot display
...
otherwise Windows server will reject the request for shadow copy enumeration
with access denied
2012-09-10 17:58:19 +02:00
Salvador I. Gonzalez
4e4c3062bc
Fix smbclient/tarmode panic on connecting to Windows 2000 clients.
...
'Freed frame ../source3/libsmb/clilist.c:934, expected ../source3/client/clitar.c:821'
Cause: (strequal(finfo->name,"..") || strequal(finfo->name,"."))
evaluates to true, do_tar returns without freeing ctx
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 13 23:12:50 CEST 2012 on sn-devel-104
2012-08-13 23:12:50 +02:00
Jeremy Allison
b70f23c2b5
Correctly check for errors in strlower_m() returns.
2012-08-09 12:08:18 -07:00
Andrew Bartlett
cf9bd1d9ed
s3-param: Make lp_name_resolve_order() return a list
...
This allows this parameter, one of the few with differing declarations
between the loadparm systems, to be brought into common.
Andrew Bartlett
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-19 08:02:32 +02:00
Rusty Russell
fe72740e82
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
...
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().
A simple patch, but hits a lot of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Rusty Russell
dcec7c1f71
source3/client/client.c: fix stackframe leak.
...
do_message_op() doesn't free its stackframe in various paths.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 04:59:31 +09:30
Luk Claes
d8c0646a5d
s3:libsmb: get rid of cli_state_protocol
...
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Luk Claes
4f6f4ea93c
s3:libsmb: get rid of cli_state_remote_name
...
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Jeremy Allison
0fefe24d6f
Fix bug #8922 .
...
Looking at the do_list status returns was historically
ignored, allowing tar to continue after NT_STATUS_ACCESS_DENIED.
Return to this state.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 11 14:55:53 CEST 2012 on sn-devel-104
2012-05-11 14:55:53 +02:00
Volker Lendecke
a8e9242a10
s3: Fix smbclient notify against Windows
...
We need READ_DATA
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr 16 21:27:54 CEST 2012 on sn-devel-104
2012-04-16 21:27:54 +02:00
Andrew Bartlett
6aa12fcb30
build: Remove SMB_OFF_T, replace with off_t
...
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Andrew Bartlett
f6e0532024
build: Remove SMB_STRUCT_DIR define
2012-04-05 02:39:09 +02:00
Andrew Bartlett
3e8a6e5760
build: Remove sys_closedir wrapper
2012-04-05 02:39:09 +02:00
Andrew Bartlett
fe526bb32b
build: Remove sys_opendir wrapper
2012-04-05 02:39:09 +02:00
Andrew Bartlett
d166b79852
build: Remove sys_open wrapper
2012-04-05 02:39:08 +02:00
Andrew Bartlett
9cc056e567
build: Remove sys_creat wrapper
2012-04-05 02:39:08 +02:00
Andrew Bartlett
43e9be8894
build: Remove sys_lseek wrapper
2012-04-05 02:39:08 +02:00
Jelmer Vernooij
c0288e0612
lib/util: Remove obsolete sys_getpid() and sys_fork().
...
The performance of these is minimal (these days) and they can return
invalid results when used as part of applications that do not use
sys_fork().
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-24 21:55:40 +01:00
Christian Ambach
80cb6e84de
s3:client correct a wording
2012-03-22 18:41:22 +01:00
Volker Lendecke
42cb8ff71c
s3: Add "notify" cmd to smbclient
...
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 22 13:51:50 CET 2012 on sn-devel-104
2012-03-22 13:51:48 +01:00
Christopher R. Hertel (crh)
b5b204184a
Rename obscure defined constants.
...
Replaced the undescriptive SMB_PORT1 and SMB_PORT2 defined constants
with the slightly more descriptive names NBT_SMB_PORT and TCP_SMB_PORT.
Also replaced several hard-coded references to the well-known port
numbers (139 and 445, respectively) as appropriate.
Small changes to clarify some comments regarding the two transport
types.
Signed-off-by: Simo Sorce <idra@samba.org>
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Feb 16 08:29:41 CET 2012 on sn-devel-104
2012-02-16 08:29:41 +01:00
Stefan Metzmacher
6b8a4c96e8
s3:client: ignore SMBecho errors (the server may not support it) (bug #8139 )
...
metze
2012-01-31 21:53:25 +01:00
Stefan Metzmacher
27c686dd70
Revert "Fix bug #8139 - smbclient fails if server does not support Echo request."
...
This reverts commit 1fdc96ecaf
.
This is wrong in master as the error codes are different compared to
3.5.x. The correct way to handle this is to call cli_state_is_connected().
metze
2012-01-31 21:53:25 +01:00
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