1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

1133 Commits

Author SHA1 Message Date
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