1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

1664 Commits

Author SHA1 Message Date
Herb Lewis
51b96ba79c r21704: open sockets immediately in process_loop 2007-10-10 12:18:23 -05:00
Gerald Carter
518052be38 r21636: Was almost right before. We have to specify the short domain name to get the
Krb5 config stuff to work in the server affinity settings.
2007-10-10 12:18:19 -05:00
Gerald Carter
256f36dce3 r21633: First real fix from me found during the bug hunt.
ads_cached_connection() does not call get_dc_name()
before ads_connect() and therefore does not setup
the environment to look at krb5.conf.DOMAIN file
before sending the TGT request.  The failure I'm seeing
occurs ni a multi-DC domain where we get back preuath
failed after we just joined the domain.
2007-10-10 12:18:18 -05:00
Gerald Carter
82dc19f844 r21632: Remove ununsed variable 2007-10-10 12:18:18 -05:00
Gerald Carter
d68b2910c8 r21626: Fix memory leak on error path noticed by
SATOH Fumiyasu <fumiya@samba.gr.jp>
2007-10-10 12:18:18 -05:00
Simo Sorce
0de7472428 r21623: Fix copy/paste error 2007-10-10 12:18:18 -05:00
Gerald Carter
05886edb35 r21622: Fix bad merge caught by James. 2007-10-10 12:18:18 -05:00
Gerald Carter
15b13dfe81 r21616: Delay initialization of idmap and nss_info backends until necessary
so they can honor the offline logon state.
2007-10-10 12:18:18 -05:00
Gerald Carter
5575845952 r21615: don't wait until the last second to try to renew a Krb5 ticket as it is took late 2007-10-10 12:18:17 -05:00
Gerald Carter
3644bd9996 r21614: The memset() called on aligned memory was causing crashes
on x86_64 Linux boxes.  Since it is not needed, just use malloc()
on Linux.
2007-10-10 12:18:17 -05:00
Gerald Carter
a9028612a3 r21613: perform variable subsitution on home directories and shells provided by the nss_info backend 2007-10-10 12:18:17 -05:00
Gerald Carter
7f0ba72e05 r21612: Make pam_winbind do the same username fixup on AIX as the WINBINDD
LAM module does to work around a system that does not support
>8 character usernames.  Without the change, pam_winbind tries
to authenticate _#uid in the domain.
2007-10-10 12:18:17 -05:00
Gerald Carter
4c53d300fa r21611: I'm not entirely sure about this patch but it is working.
su - DOM\user was unable to set the process crendentials
without listing the "id" and other attributes in the attrlist[].
More fixes to come, but I didn't want this to get lost.
2007-10-10 12:18:17 -05:00
Jeremy Allison
df07a662e3 r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
2007-10-10 12:18:16 -05:00
Simo Sorce
5b4838f62a r21606: Implement escaping function for ldap RDN values
Fix escaping of DN components and filters around the code
Add some notes to commandline help messages about how to pass DNs

revert jra's "concistency" commit to nsswitch/winbindd_ads.c, as it was
incorrect.
The 2 functions use DNs in different ways.

- lookup_usergroups_member() uses the DN in a search filter,
and must use the filter escaping function to escape it
Escaping filters that include escaped DNs ("\," becomes "\5c,") is the
correct way to do it (tested against W2k3).

- lookup_usergroups_memberof() instead uses the DN ultimately as a base dn.
Both functions do NOT need any DN escaping function as DNs can't be reliably
escaped when in a string form, intead each single RDN value must be escaped
separately.

DNs coming from other ldap calls (like ads_get_dn()), do not need escaping as
they come already escaped on the wire and passed as is by the ldap libraries

DN filtering has been tested.
For example now it is possible to do something like:
'net ads add user joe#5' as now the '#' character is correctly escaped when
building the DN, previously such a call failed with Invalid DN Syntax.

Simo.
2007-10-10 12:18:16 -05:00
Jeremy Allison
b7d91ec1b2 r21566: If we're going to be broken, at least be *consistently*
broken :-). This will do until Simo fixes the escape
calls properly.
Jeremy.
2007-10-10 12:18:14 -05:00
Herb Lewis
b5fd72282d r21548: prevent segv (reference to -1 element of array) 2007-10-10 12:18:12 -05:00
Günther Deschner
a6c249b592 r21537: Avoid to trigger the confusing "cached entry differs." warning when
there is just no cache around for a user.

Guenther
2007-10-10 12:18:11 -05:00
Jeremy Allison
773001870d r21530: Don't code with jet-lag and Volker looking over your
shoulder.... Correct fix for warning :-)
Jeremy.
2007-10-10 12:18:10 -05:00
Jeremy Allison
34675624e2 r21529: Fix warning from bad cast.
Jeremy.
2007-10-10 12:18:10 -05:00
Gerald Carter
0d2b80c6c4 r21525: Go ahead and checkin the mlock() & memalign() fixes so
others don't get stuck with the winbindd hang.
Still waiting on additional confirmation from Guenther
that this fixes thes issues he was observing as well.
But it's been running in my local tree for a day without
problems.
2007-10-10 12:18:10 -05:00
Simo Sorce
a5354aa9a0 r21508: Fix memleak in new idmap_tdb, thanks Herb.
Jerry please check.

Simo.
2007-10-10 12:18:09 -05:00
Gerald Carter
52e6a2ceab r21505: make sure mlock()'d memory is aligned on a page boundary 2007-10-10 12:18:08 -05:00
Günther Deschner
c3005c48cd r21500: Fix inappropriate creation of a krb5 ticket refreshing event when a user
changed a password via pam_chauthtok. Only do this if

a) a user logs on using an expired password (or a password that needs to
be changed immediately) or

b) the user itself changes his password.

Also make sure to delete the in-memory krb5 credential cache (when a
user did not request a FILE based cred cache).

Finally honor the krb5 settings in the first pam authentication in the
chauthtok block (PAM_PRELIM_CHECK). This circumvents confusion when
NTLM samlogon authentication is still possible with the old password after
the password has been already changed (on w2k3 sp1 dcs).

Guenther
2007-10-10 12:18:08 -05:00
Jeremy Allison
08998b74a5 r21474: Ensure trustdom_cache_shutdown() gets called
on terminate. Pointed out by Herb.
Jeremy.
2007-10-10 12:18:07 -05:00
Günther Deschner
5c4a58ff3a r21454: Fix debug typo.
Guenther
2007-10-10 12:18:05 -05:00
Günther Deschner
ad063d9a94 r21450: No need to TALLOC_FREE twice here.
Guenther
2007-10-10 12:18:04 -05:00
Herb Lewis
aa8f306fa5 r21399: need to zero the request and response structures 2007-10-10 12:18:02 -05:00
Herb Lewis
9fe5f78857 r21397: revert accidential commit 2007-10-10 12:18:02 -05:00
Herb Lewis
7acc9421b0 r21396: fix wbinfo --lookup-rids command
allow detection of libbiconv if all others fail - need for FreeBSD
2007-10-10 12:18:02 -05:00
Günther Deschner
155b9e7c74 r21394: Prevent nscd crash due to potential NULL pointer dereference in
_nss_winbind_initgroups_dyn() on an empty group list.

Guenther
2007-10-10 12:18:01 -05:00
Günther Deschner
03f5f7d014 r21387: Another important fix for non-AD domains:
Avoid assigning 0 as primary group id for users in NSS calls.
Jerry, please check.

Guenther
2007-10-10 12:18:01 -05:00
Günther Deschner
c6f63a08f5 r21382: Important fix for winbind when using non-AD domains.
Jeremy, I'm afraid you removed the "domain->initialized" from the
set_dc_types_and_flags() call when the connect to PI_LSARPC_DS failed
(with rev. 19148).

This causes now that init_dc_connection_network is called again and
again which in turn rescans the DC each time (which of course fails each
time with NT_STATUS_BUFFER_TOO_SMALL). Just continue with the
non-PI_LSARPC_DS scan so that the domain is initialized properly.

Guenther
2007-10-10 12:17:59 -05:00
Günther Deschner
639b7989b3 r21358: Some more debugging for _nss_winbind_initgroups_dyn() on Linux.
Guenther
2007-10-10 12:17:58 -05:00
Günther Deschner
e3c3258379 r21357: Fix typo.
Guenther
2007-10-10 12:17:58 -05:00
Günther Deschner
53ecd63d94 r21353: In the turn of tracking down nss_winbind related bugs on Linux:
print NSS_STATUS code with DEBUG_NSS when leaving a function.

Guenther
2007-10-10 12:17:58 -05:00
Günther Deschner
dcbf7a1250 r21336: Fix indent (as pointed out by Volker).
Guenther
2007-10-10 12:17:56 -05:00
Günther Deschner
b2f9115482 r21318: Fix Bug #4225.
Cached logon with pam_winbind should work now also for NT4 and samba3
domains.

Guenther
2007-10-10 12:17:56 -05:00
Günther Deschner
5a7b2fccb3 r21310: Fix invalid printfs in pam_winbind.
Guenther
2007-10-10 12:17:55 -05:00
Günther Deschner
968dfcc821 r21309: Add PRINTF_ATTRIBUTE checks for log statements.
Guenther
2007-10-10 12:17:55 -05:00
Günther Deschner
16c90f30b9 r21308: Fix some typos and ensure to null terminate the correct strings.
Guenther
2007-10-10 12:17:54 -05:00
Gerald Carter
5c3edad860 r21284: Fix some unitilized variable warnings pointed out by Volker. 2007-10-10 12:17:54 -05:00
Günther Deschner
7e1a84b722 r21240: Fix longstanding Bug #4009.
For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
2007-10-10 12:17:50 -05:00
Herb Lewis
509ae5ffa1 r21231: get rid of unused defines that cause a redefined warning 2007-10-10 12:17:49 -05:00
Jeremy Allison
70b5db7d8c r21228: Fix for fd leak on error path. Thanks to
dleonard@vintela.com for this fix !
Jeremy.
2007-10-10 12:17:49 -05:00
Gerald Carter
615a104356 r21182: * Refactor the code to obtain the LDAP connection credentials
from both idmap_ldap_{alloc,db}_init()
* Fix the backwards compat support in idmap_ldap.c
* Fix a spelling error in the idmap_fetch_secret() function name
2007-10-10 12:17:46 -05:00
Gerald Carter
01af19cc9d r21180: fix backwards compatible idmap backends parameter parsing 2007-10-10 12:17:46 -05:00
Günther Deschner
f4a704745c r21161: Another fix for pam_winbind: Move the entire pwd expiry handling into
the PAM_SUCCESS block.

Guenther
2007-10-10 12:17:44 -05:00
Günther Deschner
02713f314b r21160: Some more pam_winbind fixes:
* Consolidate all pam_winbind password expiry warnings in the one
_pam_send_password_expiry_message() call.
* Also convert some more NTSTATUS codes to error messages.
* Add paranoia check to only do all the post-processing after PAM_SUCCESS.

Guenther
2007-10-10 12:17:44 -05:00
Günther Deschner
034d42ba72 r21159: Cleanup pam_sm_chauthtok() in pam_winbind:
Set info3 strings, krb5ccname and returned username after we changed a
password and sucessfully re-authenticated afterwards. In that case we
ended up without this information.

Guenther
2007-10-10 12:17:44 -05:00