1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

3045 Commits

Author SHA1 Message Date
Jeremy Allison
a3f7db3d30 Move the horrible hack for link local addresses out of namequery.c
and into util_sock.c. is_ipaddress() now copes with link:local:v6%ifname
addresses, as does interpret_string_addr().
Jeremy
2007-10-26 16:03:20 -07:00
Jeremy Allison
f109f82622 Fix bug in writing names into gencache
as well as 2 typos where AF_INET6 was mistypes as AF_INET.
JERRY YOU NEED THESE FIXES.
Fixes smbclient -L localhost -U%
Bugs reported by Kukks (thanks kukks).
Jeremy.
2007-10-25 19:07:25 -07:00
Jeremy Allison
e6609cab73 Fix resolve name to resolve IPv6 addresses of link-local%ifaddr
Jeremy.
2007-10-25 18:28:36 -07:00
Jeremy Allison
a13e8bd39d Fix reversed bool check for access. Found by kukks.
Thanks !
Jeremy.
2007-10-25 17:17:46 -07:00
Jeremy Allison
ec891be53c Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test 2007-10-25 16:22:40 -07:00
Jeremy Allison
9aa9ecd8cc When doing reverse lookups actually look up the name, not
just the numeric address (doh!) :-).
Jeremy.
2007-10-25 16:14:52 -07:00
Jeremy Allison
a68bbea0d4 Try and fix the Solaris build by adding a missing define
(from Jerry).
Jeremy
2007-10-25 15:43:44 -07:00
metze
11a977aa07 [libreplace] define AI_NUMERICSERV as it's used in getaddrinfo.c
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25728 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:55:47 +02:00
metze
de01c503f4 [libreplace] move and fix getaddrinfo configure checks
- move getaddrinfo check into getaddrinfo.m4
- add getaddrinfo.o to LIBREPLACEOBJ so that we really build the replacements

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25726 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:55:19 +02:00
metze
e56977ea45 - include getaddrinfo.h after we have defined struct addrinfo
- use rep_ instead of pg_ as prefix in getaddrinfo.[ch]
- define HAVE_<name> macros when we replace functions

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25724 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:53:44 +02:00
metze
b81d8bc43c [libreplace] if we replace types define the HAVE_<type> macro
this is needed as heimdal's roken.h also tries to replace the types

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25718 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:53:09 +02:00
metze
4515007567 [libreplace] move definition of struct addrinfo so that it can use socklen_t
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25715 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:52:59 +02:00
metze
fa120f7c50 [libreplace] move define of a constant to near to the others
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25714 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:52:47 +02:00
metze
f1d434a132 [libreplace] include socket_wrapper.h after we have typedef'ed socklen_t
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25713 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-25 15:51:51 +02:00
Jeremy Allison
bc9008aa1d We do support name lookups for host and service in our replacement
code - remove the restrictions from the original Postgres code.
Jeremy.
2007-10-24 14:40:24 -07:00
Jeremy Allison
98e154c312 This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
2007-10-24 14:16:54 -07:00
Jeremy Allison
4d4ab9aeb9 Fix for AIX interface code from Kyle Stemen <kstemen@centeris.com>
Jeremy.
2007-10-24 12:44:38 -07:00
Gerald (Jerry) Carter
dfef16ac43 Fix compile error caused by unknown variable. 2007-10-21 13:44:29 -05:00
Gerald (Jerry) Carter
a62c7f9350 Correct VERSION and version.c to use SAMBA_VERSION_VENDOR_PATCH
which is used by mkversion.sh.
2007-10-21 12:32:06 -05:00
Gerald (Jerry) Carter
620785df4e Add test for "struct in6_addr" to the HAVE_IPV6 configure test.
Also make use of "if defined(HAVE_IPV6)" rather than testing for
AF_INET6 since this is not sufficient on HP-UX 11.11 to ensure
a working IPv6 implementation.
2007-10-19 13:09:26 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Stefan Metzmacher
1eefa0264b [libreplace] fix the standalone build of libreplace
all configure results which are used in replace.h
or any system/*.h should be in the in the libreplace
*.m4 files!

metze
2007-10-18 10:54:37 +02:00
Jeremy Allison
315215e20e Reformatting fix for new coding guidelines. BOOL ->bool.
Jeremy.
2007-10-17 12:10:12 -07:00
Stefan Metzmacher
354bdd38e8 delete empty file lib/replace/system/getaddrinfo.h
metze
2007-10-17 15:21:48 +02:00
Jeremy Allison
2ef50e325c Improve IPv4 detection.
Jeremy.
2007-10-16 16:01:13 -07:00
Jeremy Allison
0ffdf4fdee Move #defined for getaddrinfo into network.h (as other
defines). Allows RHEL4 compile to work.
Jeremy.
2007-10-16 15:15:23 -07:00
Jeremy Allison
3ef3c3afc3 Added in missing def for AI_ADDRCONFIG.
Jeremy.
2007-10-16 12:22:58 -07:00
Jeremy Allison
f6a01b82c5 Fix access control code to be IPv6/v4 protocol independent.
Make unix_wild_match() talloc, not pstring based.
Next will be name resolution code, and client code.
Jeremy.
2007-10-16 11:33:37 -07:00
Jeremy Allison
4a56b697b6 Move to protocol independent code in most of lib/util_sock.c
We don't use gethostbyname any more except in one case where
we're looking for host aliases (I don't know how to do that
with getaddrinfo yet). New function should be getaddrinfo().
Next step will be fixing lib/access.c, and then changing
libsmb/namequery.c to cope with IPv6 address returns.
Jeremy.
2007-10-15 16:11:48 -07:00
Jeremy Allison
406737cd9a Fix warning messages for unused variables.
Jeremy.
2007-10-15 15:52:30 -07:00
Stefan Metzmacher
96820f8d8f rename getsmbpass -> rep_getpass and provide the function prototype
metze
2007-10-15 15:42:13 +02:00
Stefan Metzmacher
d20c2fa274 use "system/*.h" to get the system includes
metze
2007-10-15 15:41:06 +02:00
Stefan Metzmacher
f4c0961a16 fix the compilation of getpass.c and it's configure test
metze
2007-10-15 13:20:41 +02:00
Jeremy Allison
33ee0cfb19 r16320: Ensure variable is not null before calling fclose. Klocwork #412. Jeremy. 2007-10-15 13:20:41 +02:00
Jeremy Allison
46c12de07f r16245: Cope with string being zero len. Klocwork bug #410. Jeremy. 2007-10-15 13:20:40 +02:00
jmcd
0cd1ed0424 Volker's fix for bug #668. Change the \n after the password prompt to go to tty instead of stdout. 2007-10-15 13:20:40 +02:00
Stefan Metzmacher
d4ae42b1b2 reapply: Allow ^C to interrupt smbpasswd if using our getpass. from Jeremy
metze
2007-10-15 13:20:40 +02:00
Stefan Metzmacher
3e8f43e3cf reformat getpass() replacement code
metze
2007-10-15 13:20:39 +02:00
Stefan Metzmacher
0177158d85 missing stuff from samba4's libreplace
metze
2007-10-15 13:19:28 +02:00
metze
ec8e3f7f92 don't imply "system/network.h" within replace.h,
as this brings in the socket_wrapper.h in unexpected
code and we endup with a missing 'swrap_close' while linking

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25602 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-15 13:19:28 +02:00
Volker Lendecke
add1294562 Fix one more place for IFF_LOOPBACK 2007-10-14 19:00:49 +02:00
Volker Lendecke
5e95c54886 Use strlcpy instead of strncpy 2007-10-13 21:44:58 +02:00
Volker Lendecke
d0f25bb89a Fix an uninitialized variable warning 2007-10-13 21:44:58 +02:00
Volker Lendecke
556c33702c Fix a segfault with an unknown interface
"interfaces = foo" with "foo" not being a known interface segfaulted for me.
2007-10-13 21:44:58 +02:00
Volker Lendecke
76d8dedc36 Also find loopback interfaces
Not sure if a loopback interface is actually a broadcast one.
2007-10-13 21:44:58 +02:00
Jeremy Allison
a1166e9e65 Dummy formatting commit to check I've set up my home git
correctly.
2007-10-12 21:50:41 -07:00
Jeremy Allison
3403c6c330 Convert get_peer_addr() to IPv6. Only is_myname_or_ipaddr()
lefto to do then I can fix the lib/access.c functions.
Jeremy.
2007-10-12 13:38:04 -07:00
Stefan Metzmacher
4f084efd6a offsetof() is always present as shown in some
libreplace testing.

metze
2007-10-12 10:06:27 +02:00
Jeremy Allison
12c0b1d828 Try and fix segfault found by Guenther on Fedora. Fedora
seems to return bogus values for the interface entries on
vmnet and tun interfaces.
Jeremy.
2007-10-11 18:03:12 -07:00
Jeremy Allison
baf1f52e34 Add const to the get_peer_addr() and get_socket_addr()
calls. Use the IPv6 varient for get_peer_addr().
Jeremy.
2007-10-11 15:36:13 -07:00