1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

1723 Commits

Author SHA1 Message Date
Günther Deschner
ed360fe5e5 r21887: Fix annoying bug where in a pam_close_session (or a pam_setcred with the
PAM_DELETE_CREDS flag set) any user could delete krb5 credential caches.
Make sure that only root can do this.

Jerry, Jeremy, please check.

Guenther
(This used to be commit 947a59a849e9132631ec56b7ade09137e508d5d6)
2007-10-10 12:18:44 -05:00
Gerald Carter
52d5e2a935 r21884: * Blacklist BUILTIN and MACHINE domains from the
idmap domains as these should only be handled by the
  winbindd_passdb.c backend

* Allow the alloc init to fail for backwards compatible
  configurations like

     idmap backend = ad
     idmap uid = 1000-100000
	....

* Remove the deprecated flags from idmap backend, et. al.
  These are mutually exclusive with the new configuration
  options (idmap domains).  Logging annoying messages
  about deprecated parameters is confusing.  So we'll try
  this apprpach for now.
(This used to be commit 5e30807b4e9c0211c9e2c02deee94543e8f0d855)
2007-10-10 12:18:44 -05:00
James Peach
b4f19aea18 r21881: Make sure we are very specific when testing whether a backand can handle a
particular SID. Make sure that the passdb backend will accept the same set
range of local SIDs that the idmap system sends it.

Simo, Jerry - this is a 3_0_25 candidate. Can you please review?
(This used to be commit 86a70adb6a2d277f235857451bbee7d530d15310)
2007-10-10 12:18:43 -05:00
Volker Lendecke
3fdef9433a r21878: Fix a bug with smbd serving a windows terminal server: If winbind decides smbd
to be idle it might happen that smbd needs to do a winbind operation (for
example sid2name) as non-root. This then fails to get the privileged
pipe. When later on on the same connection another authentication request
comes in, we try to do the CRAP auth via the non-privileged pipe.

This adds a winbindd_priv_request_response() request that kills the existing
winbind pipe connection if it's not privileged.

Volker
(This used to be commit e5741e27c4c22702c9f8b07877641fecc7eef39c)
2007-10-10 12:18:42 -05:00
Volker Lendecke
00b73df552 r21873: This is winbindd_pam.c, not pam_winbind.c :-)
(This used to be commit e1fbfbe1c49d3ff1ca71a33e66fae1f2d48fb7a7)
2007-10-10 12:18:41 -05:00
Volker Lendecke
22cc1dce41 r21872: Fix a debug message
(This used to be commit fcec3d1c46affbf802fb411913c8cc59c02102fa)
2007-10-10 12:18:41 -05:00
Gerald Carter
815fdf23c7 r21860: Fixes for "winbind normalize names" functionality:
* Fix getgroups() call called using a normalized name
* Fix some more name mappings that could cause for example
  a user to be unable to unlock the screen as the username
  would not match in the PAM authenticate call.
(This used to be commit 505fc669a1b2c36e1639924b9639c97988056d8d)
2007-10-10 12:18:39 -05:00
Volker Lendecke
0d91334fe7 r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
(This used to be commit af3308ce5a21220ff4c510de356dbaa6cf9ff997)
2007-10-10 12:18:33 -05:00
Herb Lewis
b1fc114fdc r21775: make messages more understandable - don't leave part dangling after newline
(This used to be commit f57e4f8adaa3b8cfc300ee6625fdbca968bb81d3)
2007-10-10 12:18:31 -05:00
Herb Lewis
80a216970d r21704: open sockets immediately in process_loop
(This used to be commit 51b96ba79c9e7ca7a4cdf777fe160152ab35236e)
2007-10-10 12:18:23 -05:00
Gerald Carter
cfecca614f 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.
(This used to be commit 518052be38385ad089c0cb092d07ccd210a27ef3)
2007-10-10 12:18:19 -05:00
Gerald Carter
a4db672e26 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.
(This used to be commit 256f36dce3e3a39798b2ad38fa3123669d670597)
2007-10-10 12:18:18 -05:00
Gerald Carter
5f24668961 r21632: Remove ununsed variable
(This used to be commit 82dc19f844af65a8815c629e4ec1f354d208a53f)
2007-10-10 12:18:18 -05:00
Gerald Carter
377bb74101 r21626: Fix memory leak on error path noticed by
SATOH Fumiyasu <fumiya@samba.gr.jp>
(This used to be commit d68b2910c8ba97a42b8bccc0af1341fc301a76d0)
2007-10-10 12:18:18 -05:00
Simo Sorce
1983759266 r21623: Fix copy/paste error
(This used to be commit 0de74724289f2b78719f6675664d7376446650d0)
2007-10-10 12:18:18 -05:00
Gerald Carter
9b568ecdc4 r21622: Fix bad merge caught by James.
(This used to be commit 05886edb3559355e8cd3e3eb8999f24b64ddb3eb)
2007-10-10 12:18:18 -05:00
Gerald Carter
b1f4259cd5 r21616: Delay initialization of idmap and nss_info backends until necessary
so they can honor the offline logon state.
(This used to be commit 15b13dfe81e861b94077c94b80117a85a5ffb999)
2007-10-10 12:18:18 -05:00
Gerald Carter
6fb6adba27 r21615: don't wait until the last second to try to renew a Krb5 ticket as it is took late
(This used to be commit 5575845952171aaeae81cf65fe32be33cc1b45ba)
2007-10-10 12:18:17 -05:00
Gerald Carter
5e88cb83b1 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.
(This used to be commit 3644bd999621e04b3fae262f172e93ea8fdcd47e)
2007-10-10 12:18:17 -05:00
Gerald Carter
aaa3a9a329 r21613: perform variable subsitution on home directories and shells provided by the nss_info backend
(This used to be commit a9028612a3f614579b28f9560cc67aef90b31cf8)
2007-10-10 12:18:17 -05:00
Gerald Carter
2c51e492f9 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.
(This used to be commit 7f0ba72e05acbd958fbf768a04d16c29189dc8f7)
2007-10-10 12:18:17 -05:00
Gerald Carter
85f769dbb4 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.
(This used to be commit 4c53d300fa3516a4c5113bc94dfd07413c46b038)
2007-10-10 12:18:17 -05:00
Jeremy Allison
8e00e9d7a6 r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit df07a662e32367a52c1e8473475423db2ff5bc51)
2007-10-10 12:18:16 -05:00
Simo Sorce
e9e6af5951 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.
(This used to be commit 5b4838f62ab1a92bfe02626ef40d7f94c2598322)
2007-10-10 12:18:16 -05:00
Jeremy Allison
2546b63f73 r21566: If we're going to be broken, at least be *consistently*
broken :-). This will do until Simo fixes the escape
calls properly.
Jeremy.
(This used to be commit b7d91ec1b20f8d58903a3283f7789a30041461be)
2007-10-10 12:18:14 -05:00
Herb Lewis
bdc612a098 r21548: prevent segv (reference to -1 element of array)
(This used to be commit b5fd72282da85f50a040fd949752bc71023ff055)
2007-10-10 12:18:12 -05:00
Günther Deschner
6af7f33bbb r21537: Avoid to trigger the confusing "cached entry differs." warning when
there is just no cache around for a user.

Guenther
(This used to be commit a6c249b59228c6891cde624f72fff23879dbd19f)
2007-10-10 12:18:11 -05:00
Jeremy Allison
3f3a3a23ce r21530: Don't code with jet-lag and Volker looking over your
shoulder.... Correct fix for warning :-)
Jeremy.
(This used to be commit 773001870d22ef4ff7ec00f73661b59a63cade42)
2007-10-10 12:18:10 -05:00
Jeremy Allison
8e9ce06f35 r21529: Fix warning from bad cast.
Jeremy.
(This used to be commit 34675624e2be886188337a883a6c4a57ef7e3fe3)
2007-10-10 12:18:10 -05:00
Gerald Carter
56c1d7e507 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.
(This used to be commit 0d2b80c6c4a744b05a0efdec352cddccc430e0c4)
2007-10-10 12:18:10 -05:00
Simo Sorce
fa5e0a238c r21508: Fix memleak in new idmap_tdb, thanks Herb.
Jerry please check.

Simo.
(This used to be commit a5354aa9a0bd860500356f45d09fce3d01649c60)
2007-10-10 12:18:09 -05:00
Gerald Carter
43c290639b r21505: make sure mlock()'d memory is aligned on a page boundary
(This used to be commit 52e6a2ceab794875781575ed17ec86808f6e26da)
2007-10-10 12:18:08 -05:00
Günther Deschner
9684e353a1 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
(This used to be commit c3005c48cd86bc1dd17fab80da05c2d34071b872)
2007-10-10 12:18:08 -05:00
Jeremy Allison
7f981b457f r21474: Ensure trustdom_cache_shutdown() gets called
on terminate. Pointed out by Herb.
Jeremy.
(This used to be commit 08998b74a51acd55eb6cbe095e682e2a79334736)
2007-10-10 12:18:07 -05:00
Günther Deschner
83dce23550 r21454: Fix debug typo.
Guenther
(This used to be commit 5c4a58ff3ab261e32789f39f2cf478367b727318)
2007-10-10 12:18:05 -05:00
Günther Deschner
aa12597000 r21450: No need to TALLOC_FREE twice here.
Guenther
(This used to be commit ad063d9a944e923777e538c2cb050d47f9f8bea0)
2007-10-10 12:18:04 -05:00
Herb Lewis
9162cb7684 r21399: need to zero the request and response structures
(This used to be commit aa8f306fa545af653d8288919fa5a3b80f447bec)
2007-10-10 12:18:02 -05:00
Herb Lewis
6432e901c7 r21397: revert accidential commit
(This used to be commit 9fe5f7885771e68b11c7794653d0e4771eeac403)
2007-10-10 12:18:02 -05:00
Herb Lewis
2b30279169 r21396: fix wbinfo --lookup-rids command
allow detection of libbiconv if all others fail - need for FreeBSD
(This used to be commit 7acc9421b0643cb04bff1f1d98ecb899f9b09601)
2007-10-10 12:18:02 -05:00
Günther Deschner
4a18f37f22 r21394: Prevent nscd crash due to potential NULL pointer dereference in
_nss_winbind_initgroups_dyn() on an empty group list.

Guenther
(This used to be commit 155b9e7c74d1a623e018fc2f8ca2e32e4aa3f213)
2007-10-10 12:18:01 -05:00
Günther Deschner
637b01b63d r21387: Another important fix for non-AD domains:
Avoid assigning 0 as primary group id for users in NSS calls.
Jerry, please check.

Guenther
(This used to be commit 03f5f7d0140c99411c137e7e2eac7e2d0c08202e)
2007-10-10 12:18:01 -05:00
Günther Deschner
ca072a9998 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
(This used to be commit c6f63a08f55a4121cbe5aac537d2ef983dc25a97)
2007-10-10 12:17:59 -05:00
Günther Deschner
1b16e8cbf9 r21358: Some more debugging for _nss_winbind_initgroups_dyn() on Linux.
Guenther
(This used to be commit 639b7989b3ad1438a443a33dc41115bcc90f72d2)
2007-10-10 12:17:58 -05:00
Günther Deschner
8bbe400c56 r21357: Fix typo.
Guenther
(This used to be commit e3c32583795631212dc0d5cd01981b27cde2a489)
2007-10-10 12:17:58 -05:00
Günther Deschner
c13e862d0e 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
(This used to be commit 53ecd63d94fd0a502ef5cdeb512c8e38795698e1)
2007-10-10 12:17:58 -05:00
Günther Deschner
5876136754 r21336: Fix indent (as pointed out by Volker).
Guenther
(This used to be commit dcbf7a1250aa5c6293ffba6a930ee23537ec9484)
2007-10-10 12:17:56 -05:00
Günther Deschner
3a46604800 r21318: Fix Bug #4225.
Cached logon with pam_winbind should work now also for NT4 and samba3
domains.

Guenther
(This used to be commit b2f91154820219959b8008b15802c70e1d76d158)
2007-10-10 12:17:56 -05:00
Günther Deschner
6dd654c381 r21310: Fix invalid printfs in pam_winbind.
Guenther
(This used to be commit 5a7b2fccb3cdc6a849aedcd256eea86faec1d54c)
2007-10-10 12:17:55 -05:00
Günther Deschner
826aa64c45 r21309: Add PRINTF_ATTRIBUTE checks for log statements.
Guenther
(This used to be commit 968dfcc8218cacdd97c2c66929e95f5062ff464a)
2007-10-10 12:17:55 -05:00
Günther Deschner
8e589ea7f2 r21308: Fix some typos and ensure to null terminate the correct strings.
Guenther
(This used to be commit 16c90f30b93f32c4f8fed00a6cc154c596e4244d)
2007-10-10 12:17:54 -05:00