libsmb: Remove a call to SMBC_errno() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmb: Convert SMBC_getatr() to NTSTATUS This avoids a few calls to SMBC_errno() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmb: Avoid a call to SMBC_errno() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmb: Avoid two calls to SMBC_errno() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmb: Avoid a call to SMBC_errno() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmbclient: Avoid a call to SMBC_errno() in SMBC_notify_ctx() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmbclient: Avoid a call to SMBC_errno() in SMBC_chmod_ctx() Directly use the return value from cli_setatr(), don't go via the cli_state struct member Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
libsmbclient: Avoid a call to SMBC_errno() in SMBC_mkdir_ctx() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
s3:libsmb: Use cli_credentials to store traversal creds Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:libsmb: fix a typo in a comment Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:libsmb: Use cli_credentials directly Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Jan 13 21:32:52 UTC 2021 on sn-devel-184
s3:libsmb: Pass cli_credentials to get_ipc_connect_master_ip() Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
s3:libsmb: Return early if dir is NULL This makes sure we do not dereference a NULL poineter. Found by covscan. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 26 11:07:09 UTC 2020 on sn-devel-184
libsmb: Remove "mntpoint" argument from cli_list() callback do_list()/do_list_helper() in source3/client/client.c was the only user of this argument. And that use was wrong. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
s3:libsmb: Pass cli_credentials to cli_resolve_path(), using helper variables. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
s3: libsmb: Convert the WINS and broadcast name functions to return size_t * num addresses. Have to do both at once as they are intimately related. The uglyness inside internal_resolve_name() will go away once all the resove_XXX() functions return size_t values. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
s3: safe_string: do not include string_wrappers.h Rather than have safe_string.h #include string_wrappers.h, make users of string_wrappers.h include it explicitly. includes.h now no longer includes string_wrappers.h transitively. Still allow includes.h to #include safe_string.h for now so that as many modules as possible get the safety checks in it. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast(). No logic changes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org>
s3: libsmb: Change cli_setatr() and async version to use 32-bit attributes. Fix the callers. Only sets 16 bits on the wire for this level. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
s3: libsmb: SMBC_chmod_ctx(), rename mode -> attr when setting attributes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>