1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

1750 Commits

Author SHA1 Message Date
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
Günther Deschner
36578b22f1 Merge Tridge's fix for the winbind 32/64bit padding.
Guenther
2007-10-19 13:03:49 +02: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
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
Guenther Deschner
fbe5edec37 Merge commit 'origin/v3-2-test' into my_branch 2007-10-11 15:18:50 +02:00
Guenther Deschner
6ae4066bbb Rename krb5 locator plugin to "winbind_krb5_locator".
Guenther
2007-10-11 15:12:12 +02:00
Jeremy Allison
3f6bd0e1ec Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
2007-10-10 18:25:16 -07:00
Jim McDonough
281c619154 r25493: Fix typo in Jeremy's thread-safe winbind patch:
lock->unlock (would have tried to lock a mutex
at the end of a function).  Cut-n-paste error.
2007-10-10 12:31:09 -05:00
Michael Adam
b0f59f18bc r25441: Make wbinfo --sequence output the sequence number if --domain
is specified.

Michael
2007-10-10 12:31:05 -05:00
Michael Adam
4a053d5bf9 r25426: Fix another implicit cast warning.
Michael
2007-10-10 12:31:04 -05:00
Jeremy Allison
cc19c0ace4 r25406: Make the Linux nss client code thread-safe.
Fix originally inspired from code from boyang <yyyeer.bo@gmail.com>.
Jeremy.
2007-10-10 12:31:03 -05:00
Stefan Metzmacher
9caf54c868 r25241: remove sequence_number out of WINBINDD_DOMAIN_INFO call
as this is always answered by the winbindd parent and will
most times return old sequence number values.

metze
2007-10-10 12:30:53 -05:00
Stefan Metzmacher
93bdd2724c r25177: if configured using --enable-socket-wrapper
allow overwritting the location of the WINBINDD_SOCKET_DIR
via an environment variable

metze
2007-10-10 12:30:48 -05:00
Stefan Metzmacher
3ac7566ae1 r25154: move winbindd code into winbindd/
metze
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
2a794db3c5 r25152: fix headers used in wbinfo.c
metze
2007-10-10 12:30:46 -05:00
Günther Deschner
c3b423c52a r25148: Adapt to coding conventions.
Guenther
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
e9e03aac22 r25146: rename winbindd_nss.h => winbind_struct_protocol.h
as this header has nothing todo with winbindd nor nss
and it contains the definitions for the struct based
protocol

metze
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
8a95d7a7ed r25143: rename public functions from winbind_client.h
init_request	=> winbindd_init_request
free_response	=> winbindd_free_response
read_reply	=> winbindd_read_reply

write_sock	=> winbind_write_sock
read_sock	=> winbind_read_sock
close_sock	=> winbind_close_sock(void)

metze
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
2e13e05fa9 r25130: make use only of base types which are provided by libreplace
in winbind client and nss/pam stuff

metze
2007-10-10 12:30:43 -05:00
Stefan Metzmacher
b3ee9adf28 r25128: _XOPEN_SOURCE_EXTENDED and socklen_t are always provided by libreplace
metze
2007-10-10 12:30:42 -05:00
Simo Sorce
6ce01bf413 r25107: Fix const warning caused by the way I reformatted this 2007-10-10 12:30:40 -05:00
Gerald Carter
aa768a4a20 r25099: Commit fix for CVE-2007-4138 from 3.0.26 release. 2007-10-10 12:30:39 -05:00
Michael Adam
d8676f30d5 r25087: Reformatting: Get rid of an abundance of leading tabs... 2007-10-10 12:30:39 -05:00
Michael Adam
2322fe5cd7 r25086: Fix interdomain trusts (this povides the fix expected in r22709):
Fix winbindd on a Samba DC talking to a trusted domain DC by
making it use the trusted domain password...

Michael

I hope this does not brake any other setup.
2007-10-10 12:30:38 -05:00
Stefan Metzmacher
6e238fe5b4 r25074: as all requests in the winbindd child are sync, we can use talloc_tos()
metze
2007-10-10 12:30:38 -05:00
Günther Deschner
9b85f7ca43 r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
LSARPC_DS pipe, continue with no_lsarpc_ds mode here as well to get
domain->initialized set to True. This avoids permanent scanning of Samba3 DCs
in winbindd. Thanks Michael, for pointing this out.

Guenther
2007-10-10 12:30:38 -05:00
Simo Sorce
f624a269bf r25064: We use BOOL/True/False not bool/true/false 2007-10-10 12:30:38 -05:00
Simo Sorce
6316a9c14d r25063: Fix segfault in smbldp_set_creds when we want to use anonymous, the
code was not passing in the "anon" flag correctly and was passing
NULL pointers.
2007-10-10 12:30:38 -05:00
Simo Sorce
1850d1c10f r25062: Reformat, remove trailing spaces and fit lines into 80 columns 2007-10-10 12:30:37 -05:00
Simo Sorce
7a4d465890 r25060: Fix formatting, remove trailing spaces and cut lines longer than 80 chars 2007-10-10 12:30:37 -05:00
Simo Sorce
17a7d33b3b r25059: Apply to 3.2 as well 2007-10-10 12:30:37 -05:00
Lars Müller
50879e6de5 r25032: Contact an off site DC if non is available on site. 2007-10-10 12:30:36 -05:00
Jeremy Allison
6a237600b8 r25022: Fix coverity #395. Resource leak on error.
Jeremy.
2007-10-10 12:30:35 -05:00
Jeremy Allison
82b3656b4b r25020: Fix coverity #374, possible null deref.
Jeremy.
2007-10-10 12:30:34 -05:00
Stefan Metzmacher
18e830a935 r24978: move domain_init_recv() near the functions that uses it
metze
2007-10-10 12:30:31 -05:00
Rafal Szczesniak
3a9b5eabf9 r24977: Ensure negative caching for name2sid, sid2name and rids2names
mappings.

rafal
2007-10-10 12:30:31 -05:00
Günther Deschner
9df961914c r24954: Fix the build without krb5.
Guenther
2007-10-10 12:30:30 -05:00
Günther Deschner
800645d538 r24952: Set the kdc locator env vars. This makes the krb5 locator plugin fully
operational (from within winbindd and outside).

Guenther
2007-10-10 12:30:30 -05:00
Günther Deschner
62426a0555 r24920: Reformatting.
Guenther
2007-10-10 12:30:29 -05:00
Michael Adam
f379a5c47d r24879: Activate the winbindd cache-validation message handler.
Now the winbindd cache can be checked at runtime by
calling "smbcontrol winbindd validate-cache".

For the execution of the validation code, I fork a child
and in the child restore the default SIGCHLD handler in
order for the fork/waitpid mechanism of tdb_validate to work.

Michael
2007-10-10 12:30:28 -05:00
Michael Adam
dc0b08e659 r24848: Make tdb_validate() take an open tdb handle instead of a file name.
A new wrapper tdb_validate_open() takes a filename an opens and closes
the tdb before and after calling tdb_validate() respectively.

winbindd_validata_cache_nobackup() now dynamically calls one of
the above functions depending on whether the cache tdb has already
been opened or not.

Michael
2007-10-10 12:30:27 -05:00
Michael Adam
ef92d505c0 r24843: Add a "validate-cache" control message to winbindd.
So there is a new subcommand "smbcontrol winbindd validate-cache" now.

This change provides the infrastructure:
The function currently returns "true" unconditionally.
The call of a real cache validation function will be incorporated
in subsequent changes.

Michael
2007-10-10 12:30:27 -05:00
Günther Deschner
af90c6949c r24833: Move locator to nsswitch (does not belong to libads anymore).
Guenther
2007-10-10 12:30:26 -05:00
Michael Adam
b3dcadbed0 r24830: Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent
changes.)
2007-10-10 12:30:26 -05:00
Michael Adam
9062665208 r24829: Make use of a variable, that is available... :-) 2007-10-10 12:30:26 -05:00
Volker Lendecke
0a9171f9ef r24826: Fix two memleaks in idmap_cache.c, bug 4917
Thanks again to Patrick Rynhart for persisting :-)

Simo, please check!
2007-10-10 12:30:25 -05:00
Volker Lendecke
6585ea2cb7 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
2007-10-10 12:30:24 -05:00
Günther Deschner
46dbd6034e r24807: Add WINBINDD_LOCATOR_KDC_ADDRESS env which will be used for the case when the
locator gets called from within winbindd.

Guenther
2007-10-10 12:30:23 -05:00
Günther Deschner
c704760444 r24801: When told to ignore the winbind cache also do so while trying to store entries.
Thanks Michael for pointing this out.

Guenther
2007-10-10 12:30:22 -05:00
Günther Deschner
e5cc09c72f r24799: Prefer IP address to dns name when replying in winbindd dsgetdcname.
Guenther
2007-10-10 12:30:22 -05:00