1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

1713 Commits

Author SHA1 Message Date
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
Günther Deschner
29a56dcc78 r24786: Fix another build warning.
Guenther
2007-10-10 12:30:21 -05:00
Günther Deschner
d8197aca5a r24785: Put checks in parentheses.
Guenther
2007-10-10 12:30:21 -05:00
Günther Deschner
fb9228b8d1 r24778: Make sure krb5 locator requests go to a separate locator winbind child.
Guenther
2007-10-10 12:30:20 -05:00
Günther Deschner
429496a4cc r24747: Add WINBINDD_DSGETDCNAME call.
Guenther
2007-10-10 12:30:17 -05:00
Günther Deschner
18b29763d1 r24746: As the winbindd pipe is officially broken since a while: split out request
specfic and generic flags in a winbindd_request.

It turns out that the WBFLAG_RECURSE flag is the only non-PAM specific flag we
put into the "flags" field of a winbind request anyway. Now each request
command can use the entire space of the "flags" field.

Guenther
2007-10-10 12:30:17 -05:00
Günther Deschner
a30549bbf4 r24740: Fix the build.
Guenther
2007-10-10 12:30:16 -05:00
Günther Deschner
8300aac494 r24737: Remove older TODO: Convert internal_resolve_name() and friends to NTSTATUS.
Guenther
2007-10-10 12:30:16 -05:00
Günther Deschner
f62292c5a1 r24734: Move nss_err_str() to a more public place.
Guenther
2007-10-10 12:30:16 -05:00
Gerald Carter
98fb5bcd57 r24722: Squashed commit of the following:
commit fb52f971986dd298abbcd9745ddf702820ce0184
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Mon Aug 27 13:50:26 2007 -0500

    Check correct return type for pam_winbind_request_log() wnibind_upn_to_username

    which is an int and not NSS_STATUS.

commit 7382edf6fc0fe555df89d5b2a94d12b35049b279
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Mon Aug 27 13:30:26 2007 -0500

    Allow wbinfo -n to convert a UPN to a SID

commit 8266c0fe1ccf2141e5a983f3213356419e626dda
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Fri Aug 3 09:53:16 2007 -0500

    Merge some of Guenther UPN work for pam_winbind.c (check the winbind separator

    and better pam logging when converting a upn to a username).

commit 15156c17bc81dbcadf32757015c4e5158823bf3f
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Fri Aug 3 08:52:50 2007 -0500

    Include Universal groups from the cached PAC/SamLogon info when

    generating the list of domain group SIDs for a user's token.

commit 979053c0307b051954261d539445102c55f309c7
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Thu Aug 2 17:35:41 2007 -0500

    merge upnlogon patch from my tree
2007-10-10 12:30:15 -05:00
Günther Deschner
6a9af88a2d r24714: Fix confusing indent.
Guenther
2007-10-10 12:30:15 -05:00
Günther Deschner
750b52cb47 r24713: Fix obvious error in enum_dom_groups. We were returning NT_STATUS_OK when the realloc failed.
Guenther
2007-10-10 12:30:15 -05:00
Günther Deschner
5187157607 r24711: Remove unused talloc context from query_user_list rpc.
Guenther
2007-10-10 12:30:15 -05:00
Volker Lendecke
b7c0404893 r24649: Attempt to fix bug 4917. Simo, please check!
Thanks Patrick Rynhart for reporting this.
2007-10-10 12:30:13 -05:00
Michael Adam
0193a49223 r24629: Make read_sock return the total number of bytes read instead
of the number of bytes read in the last of possibly several
read calls.

This was noted by Metze.

Michael
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
102bb0fc17 r24625: add '-D' option to winbindd
TODO: don't allow '-i -D' and '-D -i' on all
      server binaries in the SAMBA_3_2 branch!
      The &server_mode patch makes this difficult to check...

metze
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
a95d9d1ef9 r24621: - deferr calling build_options();exit(0);
- use poptPrintUsage() to give the user more info

metze
2007-10-10 12:30:11 -05:00
Günther Deschner
1ce1958f7a r24615: Say for which domain the getdcname request failed.
Guenther
2007-10-10 12:30:10 -05:00
Stefan Metzmacher
8532e3182a r24599: patch from Karolin Seeger <ks@sernet.de>:
smbd, nmbd and winbindd can be started with invalid options currently.
The first patch attached would be a possible solution.
It contains an exit if an invalid option has been used. The main problem
is, that existing setups with wrong options or missing arguments in start
scripts will break (which is the right behaviour from my point of view).

metze
2007-10-10 12:30:09 -05:00
Günther Deschner
8c56ee2c58 r24584: Merge all pam post-processing code (in particular all extra_data code) into
append_data().

Guenther
2007-10-10 12:30:07 -05:00
Günther Deschner
8a493cce98 r24583: Make sure we don't accept invalid request options.
Thanks to Michael for his bit-magic.

Guenther
2007-10-10 12:30:07 -05:00
Günther Deschner
d5bd8b1d61 r24579: Merge error reporting to the end of winbindd_pam_auth().
Guenther
2007-10-10 12:30:07 -05:00
Günther Deschner
27ecb0df79 r24578: Fix build warning.
Guenther
2007-10-10 12:30:07 -05:00
Günther Deschner
adaa5e423d r24438: Use dump_data_pw() instead of dump_data() on sensitive data in winbindd.
Guenther
2007-10-10 12:29:47 -05:00
Günther Deschner
44c10bbe94 r24437: Remove "done" in winbindd_raw_kerberos_login() as well.
Guenther
2007-10-10 12:29:47 -05:00
Günther Deschner
98ffae031a r24434: Simplify winbindd_raw_kerberos_login().
Guenther
2007-10-10 12:29:46 -05:00
Günther Deschner
e6415c5232 r24420: Pure pedantism: the talloc_init could have failed...
Guenther
2007-10-10 12:29:44 -05:00
Kai Blin
f8560ea66c r24353: Add a getpwuid lookup to wbinfo.
Merged from my Samba4 GSoC branch.
Volker, can you check if that's done the way you thought?
2007-10-10 12:29:32 -05:00
Volker Lendecke
748fdfbd7b r24331: Fix an error where gid_t != 32 bit 2007-10-10 12:29:30 -05:00
Volker Lendecke
30fd903465 r24330: Fix a 64-bit error 2007-10-10 12:29:30 -05:00
Volker Lendecke
67ec6863dd r24329: Fix a 64-bit bug
enums are not necessarily represented as 32-bit uints. On assignment
(see line 1029) implicit conversion happens, but not when pointers are
taken.
2007-10-10 12:29:30 -05:00
Volker Lendecke
6c3813cf65 r24087: Fix bug 4836, patch by Matthijs Kooijman <matthijs@stdin.nl>. Thanks!
Volker
2007-10-10 12:29:04 -05:00
Stefan Metzmacher
12440efe0b r24017: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
add add_trusted_domain() can return NULL

metze
2007-10-10 12:28:56 -05:00
Volker Lendecke
839d64add4 r23974: Fix Coverity ID 361. num_rids == 0 is caught on function entry 2007-10-10 12:28:51 -05:00
Michael Adam
2c2a1ff2c2 r23931: Use the new tdb_validate_and_backup function instead of pure tdb_validate
in winbindd cache validation.

Michael
2007-10-10 12:28:46 -05:00
Günther Deschner
1e1e480115 r23928: Merge all "copy-info3-groups-to-sid-array" blocks to a sid_array_from_info3()
function.

Guenther
2007-10-10 12:28:45 -05:00
Volker Lendecke
86476efc7a r23884: Fix Coverity ID 379 2007-10-10 12:28:38 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00