1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

543 Commits

Author SHA1 Message Date
Volker Lendecke
c049d098d1 Convert the main winbind client communication to wb_reqtrans.c 2009-06-14 11:25:46 +02:00
Volker Lendecke
baa6084378 Make winbindd_cli_state->request a pointer instead of a struct member
In itself, this is pretty pointless. But in the next steps I'll convert the
winbind internal communication to wb_reqtrans which allocates the request
properly. This minimizes the later diff.

Volker
2009-06-14 11:25:44 +02:00
Volker Lendecke
a51e6ce43c Pass a talloc_ctx to pdb_enum_aliasmem 2009-06-08 21:14:10 +02:00
Günther Deschner
bc091e7847 s3-winbindd: workaround alias enumeration in expand_groups().
alias enumeration in NSS is not done properly done atm and needs to be fixed.

Guenther
2009-06-08 13:06:25 +02:00
Günther Deschner
f19c9147a5 s3-winbindd: add some debug statements while tracking down a bug.
Guenther
2009-06-06 02:00:36 +02:00
Günther Deschner
b3f2a3a488 s3-winbindd: fix remaining callers of sid_binstring().
Guenther
2009-05-28 15:38:35 +02:00
Volker Lendecke
0dbecbbee5 Make sid_binstring & friends take a talloc context 2009-05-28 11:33:21 +02:00
Michael Adam
e381c13b02 s3:idmap_ldap: filter out of range mappings in default idmap config
This fixes bug #6417

Michael
2009-05-28 00:41:33 +02:00
Marc VanHeyningen
a4887e250b s3: Allow child processes to exit gracefully if we are out of fds
When we run out of file descriptors for some reason, every new
connection forks a child that immediately panics causing smbd to
coredump.  This seems unnecessarily harsh; with this code change we
now catch that error and merely log a message about it and exit
without the core dump.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 13:16:17 -07:00
Michael Adam
3fe9859342 s3:idmap: fix a comment typo
Michael
2009-05-27 19:32:46 +02:00
Michael Adam
e12670a105 s3:idmap_tdb2: filter out of range mappings in default idmap config
This fixes bug #6416

Michael
2009-05-27 19:31:33 +02:00
Michael Adam
ca697a9e31 s3:idmap_tdb: add an entry debug statment to idmap_tdb_db_init()
Michael
2009-05-27 19:31:32 +02:00
Michael Adam
3d3f398382 s3:idmap_tdb: filter out of range mappings in default idmap config
This fixes bug #6415

Michael
2009-05-27 19:31:32 +02:00
Michael Adam
3a853448ce s3:winbind_util: remove trailing spaces
Michael
2009-05-25 22:16:47 +02:00
Michael Adam
3111d78001 s3:winbind:idmap_ldap: warn about duplicate SID->XID mappings (bug #6387)
With the current infrastructure, we should not return error on
duplicate mappings but just warn instead (because an error would
trigger the attempt to create yet another mapping).

Michael
2009-05-25 14:57:06 +02:00
Michael Adam
35c3f4162d s3:winbind:idmap_ldap: warn about duplicate XID->SID mappings (bug #6387)
With the current infrastructure, we should not return error on
duplicate mappings but just warn instead (because an error would
trigger the attempt to create yet another mapping).

Michael
2009-05-25 14:57:06 +02:00
Volker Lendecke
68c5c6df0e Fix a race condition in winbind leading to a panic
In winbind, we do multiple events in one select round. This needs fixing, but
as long as we're still using it, for efficiency reasons we need to do that.

What can happen is the following: We have outgoing data pending for a client,
thus

	state->fd_event.flags == EVENT_FD_WRITE

Now a new client comes in, we go through the list of clients to find an idle
one. The detection for idle clients in remove_idle_client does not take the
pending data into account. We close the socket that has pending outgoing data,
the accept(2) one syscall later gives us the same socket.

In new_connection(), we do a setup_async_read, setting up a read fde. The
select from before however had found the socket (that we had already closed!!)
to be writable. In rw_callback we only want to see a readable flag, and we
panic in the SMB_ASSERT(flags == EVENT_FD_READ).

Found using

bin/smbtorture //127.0.0.1/tmp -U% -N 500 -o 2 local-wbclient

Volker
2009-05-24 18:57:13 +02:00
Michael Adam
e9010fa366 s3:winbind:idmap_ldap: fix a crash bug in idmap_ldap_unixids_to_sids (#6387)
This fixes a crash bug hit when multiple mappings were found by
the ldap search. This crash was caused by an ldap asssertion
in ldap_next_entry because was set to NULL in each iteration.

The corresponding fix was applied to the idmap_ldap_sids_to_unixids()
by Jerry in 2007 (b066668b74).

This fixes the crash part of bug #6387.

There is a logic part, too:
The problem currently only occurs when multiple mappings are found
for one given unixid. Now winbindd does not crash any more but
it does not correctly handle this situation. It just returns the
last mapping from the ldap search results.
This needs fixing.

Michael
2009-05-22 12:06:59 +02:00
Bo Yang
d7480a91b4 s3: ignore EPIPE error when winbind finally writes to wb client because client might have already closed the socket
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-22 03:22:52 +08:00
Bo Yang
cbe3dabb9d s3: Fix onlinestatus msg to return status of all domain instead of omitting trusted domains
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-22 02:12:59 +08:00
Volker Lendecke
91aea36bbf Fix a typo 2009-05-16 19:22:03 +02:00
Volker Lendecke
3fa69438b9 Convert response.extra_data.data from malloc to talloc 2009-05-12 18:02:00 +02:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Volker Lendecke
de6ddda45e Fix some nonempty blank lines 2009-05-11 23:08:30 +02:00
Volker Lendecke
646668bc51 Fix some type-punned warnings 2009-05-07 23:38:48 +02:00
Volker Lendecke
26a9643e45 Remove a misleading comment 2009-05-07 23:38:48 +02:00
Volker Lendecke
2c1372b0d2 Fix some nonempty blank lines 2009-05-07 23:38:48 +02:00
Günther Deschner
67588ca80d s3-idmap: Fix bug #6286: Call init function for builtin idmap modules before probing for them as shared modules.
idmap-gurus of the world, please check.

Guenther
2009-04-24 10:02:06 +02:00
Günther Deschner
b5bec1a6d7 s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHTS_MAXIMUM_ALLOWED.
Guenther
2009-04-21 12:40:47 +02:00
Andrew Bartlett
c185e7a29c Fix to use modified cli_rpc_pipe_open_schannel_with_key API 2009-04-20 17:04:33 +02:00
Andrew Bartlett
53765c81f7 Remove use of talloc_reference in cli_rpc_pipe_open_schannel_with_key() 2009-04-20 16:50:49 +02:00
Andrew Bartlett
32062013c3 s3: Fix ntlm_auth and winbindd to use new common libcli/auth APIs 2009-04-14 19:33:04 +10:00
Andrew Bartlett
f28f113d8e Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).

We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server

Andrew Bartlett
2009-04-14 16:23:35 +10:00
Günther Deschner
d71dec9259 s3-libads: avoid NULL talloc context with ads_get_dn().
Guenther
2009-04-07 01:17:30 +02:00
Andrew Bartlett
2050187673 s3:libads Make ads_get_dn() take a talloc context
Also remove ads_memfree(), which was only ever a wrapper around
SAFE_FREE, used only to free the DN from ads_get_ds().

This actually makes libgpo more consistant, as it mixed a talloc and a
malloc based string on the same element.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 15:54:41 +02:00
Björn Jacke
f4aec7b590 ѕ3/winbind_pam: fix gcc 4.4 compile warning 2009-03-23 13:10:54 +01:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Stefan Metzmacher
93c2057c8b s3:winbindd: accept new connections via fd events
metze
2009-03-18 07:00:42 +01:00
Stefan Metzmacher
3b8dd79f2b s3:winbindd: move non event related code out of process_loop() in the the caller
metze
2009-03-18 07:00:42 +01:00
Stefan Metzmacher
0685031ccf s3:winbindd: remove unused close_winbindd_socket() function
metze
2009-03-18 07:00:41 +01:00
Volker Lendecke
b29c69f459 Fix #6130: Don't crash in winbindd_rpc lookup_groupmem() on unmapped members
Thanks to François Legal <devel@thom.fr.eu.org> for reporting this bug
2009-03-17 21:19:32 +01:00
Volker Lendecke
7735650f2e Fix a valgrind error
Found in "make test" -- if we can't connect at all, "cli" is uninitialized
2009-03-17 11:32:23 +01:00
Jeremy Allison
f48a345e4a Remove pwd_cache.c, it was doing nothing. Make user_name, domain, and
password talloc'ed strings within the cli_struct.
Jeremy.
2009-03-13 17:49:24 -07:00
Volker Lendecke
a0a9c5d170 Fix #6167: winbindd -n should disable the winbind idmap cache 2009-03-12 10:20:08 +01:00
Volker Lendecke
b17f9e15ef Make opt_nocache static to winbindd.c 2009-03-12 10:20:08 +01:00
Volker Lendecke
46bcb10b5a Shape up pdb_search a bit by making it a talloc ctx with a destructor 2009-03-07 17:51:21 +01:00
Stefan Metzmacher
589eb81e3f s3:winbindd_cm: remove useless cli_setup_signing_state(*cli, Undefined) call
cli_setup_signing_state() with Undefined is a noop.

metze
2009-03-06 16:37:20 +01:00
Bo Yang
d526d340d8 Fix careless mistake in winbindd_setup_sig_usr2_handler 2009-03-04 17:26:57 -08:00
Bo Yang
deb73e87b2 More fix to initialize idmap statuses 2009-03-02 15:51:55 -08:00
Bo Yang
a54520fd4d Initialize the id_map status in idmap_ldap to avoid surprise 2009-02-27 09:28:46 -08:00