IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This fullfills the promise to Andreas and Metze
of all new code using struct samba_sockaddr.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
As requested by Andreas and Metze, ensure new code uses
struct samba_sockaddr. This is part of changing dns_lookup_list_async()
and callers to use struct samba_sockaddr.
Currently putting this into namequery.c even though it's
used inside dsgetdcname.c as I have future patches that
heavily make use of this to convert sockaddr_storage -> samba_sockaddr.
I'm not committed to putting it here, it may fit better
in lib/util/util_net.[ch]. It just needs to be somewhere
other functions inside source/libsmb/*.c can get to it,
and currently namequery.h exports the most stuff.
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This allows the async DNS lookups to be re-used inside the dsgetdcname() internals
code as previously described.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Take a list of hostnames and does async A and AAAA (if
supported) lookups on them. Interface compatible with
dns_lookup_list() (with the addition of one extra
parameter returning the query name list, for use inside
dsgetdcname() internals later) and we'll replace it in the next
commit. Waits for lp_get_async_dns_timeout() seconds to complete.
Commented out as not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This is very likely a false positive, because Coverity does not see
that we only assign "dns_addrs" when NT_STATUS_IS_OK(status), so we
might not want this. But it is a fresh finding and looks cleaner this
way.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 6 20:23:53 UTC 2020 on sn-devel-184
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Isaac Boukris <iboukris@samba.org>
Autobuild-Date(master): Tue Aug 4 10:13:53 UTC 2020 on sn-devel-184
Now we can move all the convert_ss2service() calls to one place.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Clean up internals - a LOT.
This one needs careful review. Ditch the (unused) port returns from
the SRV replies.
Internally uses talloc'ed arrays of struct sockaddr_storage
which it then convert to MALLOC'ed struct ip_service.
Still returns struct ip_service but this will be
fixed in the next commit.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
This function takes a list of names returned from a DNS SRV
query which didn't have returned IP addresses and returns an
array of struct sockaddr_storage.
Currently synchronous, but this is the function that will
be changed to be asynchronous later.
Compiles but commented out for now so we don't get "unused
function" warnings.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Pass in talloc_tos() to make it match the other resolve_XXX() functions.
No memory leaks as this is used for transient data and is cleaned up
when the calling frame in internal_resolve_name() is destroyed.
Preparing to have it return a talloc'ed struct sockaddr_storage array
rather than a malloc'ed struct ip_service array.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Logic change, but correct error cleanup - jump to new 'fail:' label.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Wait for additional replies until timeout when '*' is given to nmblookup
as name.
Introduced by 8da8c36b53.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8927
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Fixes:
source3/libsmb/namequery.c:2938:2: warning: Value stored to 'status' is never read <--[clang]
status = NT_STATUS_OK;
^ ~~~~~~~~~~~~
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/libsmb/namequery.c:2719:11: warning: 2nd function call argument is an uninitialized value <--[clang]
if (!convert_ss2service(return_iplist,
^
source3/libsmb/namequery.c:2733:10: warning: 2nd function call argument is an uninitialized value <--[clang]
if (!convert_ss2service(return_iplist,
^
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Fixes:
source3/libsmb/namequery.c:2584:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Fixes:
source3/libsmb/namequery.c:977:12: warning: The right operand of '<' is a garbage value <--[clang]
for (i=0;i<count;i++) {
^~~~~~
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Eventually we need to convert internal_resolve_name to "size_t" for
"return_count". But that's a patch for another day :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>