1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

1723 Commits

Author SHA1 Message Date
Simo Sorce
ac1642508f 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.
(This used to be commit 6316a9c14d)
2007-10-10 12:30:38 -05:00
Simo Sorce
bb9fbe6221 r25062: Reformat, remove trailing spaces and fit lines into 80 columns
(This used to be commit 1850d1c10f)
2007-10-10 12:30:37 -05:00
Simo Sorce
d19d3e7126 r25060: Fix formatting, remove trailing spaces and cut lines longer than 80 chars
(This used to be commit 7a4d465890)
2007-10-10 12:30:37 -05:00
Simo Sorce
3f8e1f9ad2 r25059: Apply to 3.2 as well
(This used to be commit 17a7d33b3b)
2007-10-10 12:30:37 -05:00
Lars Müller
a747e8bdcf r25032: Contact an off site DC if non is available on site.
(This used to be commit 50879e6de5)
2007-10-10 12:30:36 -05:00
Jeremy Allison
2400758fbe r25022: Fix coverity #395. Resource leak on error.
Jeremy.
(This used to be commit 6a237600b8)
2007-10-10 12:30:35 -05:00
Jeremy Allison
5d49b172e0 r25020: Fix coverity #374, possible null deref.
Jeremy.
(This used to be commit 82b3656b4b)
2007-10-10 12:30:34 -05:00
Stefan Metzmacher
abe7e04244 r24978: move domain_init_recv() near the functions that uses it
metze
(This used to be commit 18e830a935)
2007-10-10 12:30:31 -05:00
Rafal Szczesniak
663b922852 r24977: Ensure negative caching for name2sid, sid2name and rids2names
mappings.

rafal
(This used to be commit 3a9b5eabf9)
2007-10-10 12:30:31 -05:00
Günther Deschner
99cc296968 r24954: Fix the build without krb5.
Guenther
(This used to be commit 9df961914c)
2007-10-10 12:30:30 -05:00
Günther Deschner
be3fdd8b62 r24952: Set the kdc locator env vars. This makes the krb5 locator plugin fully
operational (from within winbindd and outside).

Guenther
(This used to be commit 800645d538)
2007-10-10 12:30:30 -05:00
Günther Deschner
46928878f6 r24920: Reformatting.
Guenther
(This used to be commit 62426a0555)
2007-10-10 12:30:29 -05:00
Michael Adam
f9a177772d 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
(This used to be commit f379a5c47d)
2007-10-10 12:30:28 -05:00
Michael Adam
57ac659fb6 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
(This used to be commit dc0b08e659)
2007-10-10 12:30:27 -05:00
Michael Adam
ac3f2e784f 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
(This used to be commit ef92d505c0)
2007-10-10 12:30:27 -05:00
Günther Deschner
55b59eb80b r24833: Move locator to nsswitch (does not belong to libads anymore).
Guenther
(This used to be commit af90c6949c)
2007-10-10 12:30:26 -05:00
Michael Adam
a4c92698c6 r24830: Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent
changes.)
(This used to be commit b3dcadbed0)
2007-10-10 12:30:26 -05:00
Michael Adam
e5533200ce r24829: Make use of a variable, that is available... :-)
(This used to be commit 9062665208)
2007-10-10 12:30:26 -05:00
Volker Lendecke
8843550c28 r24826: Fix two memleaks in idmap_cache.c, bug 4917
Thanks again to Patrick Rynhart for persisting :-)

Simo, please check!
(This used to be commit 0a9171f9ef)
2007-10-10 12:30:25 -05:00
Volker Lendecke
929e1d9920 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
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Günther Deschner
020e0aba0a r24807: Add WINBINDD_LOCATOR_KDC_ADDRESS env which will be used for the case when the
locator gets called from within winbindd.

Guenther
(This used to be commit 46dbd6034e)
2007-10-10 12:30:23 -05:00
Günther Deschner
410cc0e9c7 r24801: When told to ignore the winbind cache also do so while trying to store entries.
Thanks Michael for pointing this out.

Guenther
(This used to be commit c704760444)
2007-10-10 12:30:22 -05:00
Günther Deschner
7650d3bb18 r24799: Prefer IP address to dns name when replying in winbindd dsgetdcname.
Guenther
(This used to be commit e5cc09c72f)
2007-10-10 12:30:22 -05:00
Günther Deschner
8499943338 r24786: Fix another build warning.
Guenther
(This used to be commit 29a56dcc78)
2007-10-10 12:30:21 -05:00
Günther Deschner
46fad0ca27 r24785: Put checks in parentheses.
Guenther
(This used to be commit d8197aca5a)
2007-10-10 12:30:21 -05:00
Günther Deschner
53d41f3b1b r24778: Make sure krb5 locator requests go to a separate locator winbind child.
Guenther
(This used to be commit fb9228b8d1)
2007-10-10 12:30:20 -05:00
Günther Deschner
21dd4aa82d r24747: Add WINBINDD_DSGETDCNAME call.
Guenther
(This used to be commit 429496a4cc)
2007-10-10 12:30:17 -05:00
Günther Deschner
a090092cd2 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
(This used to be commit 18b29763d1)
2007-10-10 12:30:17 -05:00
Günther Deschner
c087807ee4 r24740: Fix the build.
Guenther
(This used to be commit a30549bbf4)
2007-10-10 12:30:16 -05:00
Günther Deschner
1c72c4c360 r24737: Remove older TODO: Convert internal_resolve_name() and friends to NTSTATUS.
Guenther
(This used to be commit 8300aac494)
2007-10-10 12:30:16 -05:00
Günther Deschner
c790f6437f r24734: Move nss_err_str() to a more public place.
Guenther
(This used to be commit f62292c5a1)
2007-10-10 12:30:16 -05:00
Gerald Carter
40102ad546 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
(This used to be commit 98fb5bcd57)
2007-10-10 12:30:15 -05:00
Günther Deschner
a375d368df r24714: Fix confusing indent.
Guenther
(This used to be commit 6a9af88a2d)
2007-10-10 12:30:15 -05:00
Günther Deschner
7d7b3a9040 r24713: Fix obvious error in enum_dom_groups. We were returning NT_STATUS_OK when the realloc failed.
Guenther
(This used to be commit 750b52cb47)
2007-10-10 12:30:15 -05:00
Günther Deschner
a380f2ce6a r24711: Remove unused talloc context from query_user_list rpc.
Guenther
(This used to be commit 5187157607)
2007-10-10 12:30:15 -05:00
Volker Lendecke
361938d5b2 r24649: Attempt to fix bug 4917. Simo, please check!
Thanks Patrick Rynhart for reporting this.
(This used to be commit b7c0404893)
2007-10-10 12:30:13 -05:00
Michael Adam
a718a93d70 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
(This used to be commit 0193a49223)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
e24b67fdd5 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
(This used to be commit 102bb0fc17)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
8dd00920ef r24621: - deferr calling build_options();exit(0);
- use poptPrintUsage() to give the user more info

metze
(This used to be commit a95d9d1ef9)
2007-10-10 12:30:11 -05:00
Günther Deschner
d94d58a46f r24615: Say for which domain the getdcname request failed.
Guenther
(This used to be commit 1ce1958f7a)
2007-10-10 12:30:10 -05:00
Stefan Metzmacher
2e498b48bb 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
(This used to be commit 8532e3182a)
2007-10-10 12:30:09 -05:00
Günther Deschner
b0b080799c r24584: Merge all pam post-processing code (in particular all extra_data code) into
append_data().

Guenther
(This used to be commit 8c56ee2c58)
2007-10-10 12:30:07 -05:00
Günther Deschner
cf131be215 r24583: Make sure we don't accept invalid request options.
Thanks to Michael for his bit-magic.

Guenther
(This used to be commit 8a493cce98)
2007-10-10 12:30:07 -05:00
Günther Deschner
b2ff8a2663 r24579: Merge error reporting to the end of winbindd_pam_auth().
Guenther
(This used to be commit d5bd8b1d61)
2007-10-10 12:30:07 -05:00
Günther Deschner
42bb05074a r24578: Fix build warning.
Guenther
(This used to be commit 27ecb0df79)
2007-10-10 12:30:07 -05:00
Günther Deschner
d8248816c3 r24438: Use dump_data_pw() instead of dump_data() on sensitive data in winbindd.
Guenther
(This used to be commit adaa5e423d)
2007-10-10 12:29:47 -05:00
Günther Deschner
a9f02f46b1 r24437: Remove "done" in winbindd_raw_kerberos_login() as well.
Guenther
(This used to be commit 44c10bbe94)
2007-10-10 12:29:47 -05:00
Günther Deschner
954adf812e r24434: Simplify winbindd_raw_kerberos_login().
Guenther
(This used to be commit 98ffae031a)
2007-10-10 12:29:46 -05:00
Günther Deschner
6c3d3bc0fa r24420: Pure pedantism: the talloc_init could have failed...
Guenther
(This used to be commit e6415c5232)
2007-10-10 12:29:44 -05:00
Kai Blin
0bb638a798 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?
(This used to be commit f8560ea66c)
2007-10-10 12:29:32 -05:00