1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

44 Commits

Author SHA1 Message Date
Günther Deschner
9448520828 pam_winbind: remove some unused macros.
Guenther
2008-10-10 15:42:16 +02:00
Günther Deschner
9a0860f93f pam_winbind: remove NETLOGON_CACHED_ACCOUNT and NETLOGON_GRACE_LOGON.
Guenther
2008-10-10 15:42:09 +02:00
Günther Deschner
4ff415dd15 pam_winbind: remove ACB_PWNOEXP.
Guenther
2008-10-10 15:42:01 +02:00
Günther Deschner
3eae89dd77 pam_winbind: use libwbclient for WINBINDD_PAM_CHAUTHTOK.
Guenther
2008-10-10 15:40:23 +02:00
Günther Deschner
7817ad4ae0 pam_winbind: prepare to use libwbclient inside pam_winbind.
Guenther
2008-10-10 15:38:04 +02:00
Günther Deschner
3bbffb9664 pam_winbind: convert to use talloc.
Guenther
2008-10-10 15:37:35 +02:00
Günther Deschner
93384b627c pam_winbind: fix the build wrt libreplace.
Guenther
2008-09-17 15:00:50 +02:00
Günther Deschner
5692bbf64b pam_winbind: use integer constants.
Guenther
(This used to be commit 8d19b2ceb131ca2a0fd983cdb4fd17acdad9c26e)
2008-08-19 15:20:44 +02:00
Günther Deschner
e7553ab79c Fix pam_winbind macros.
Guenther
(This used to be commit 37091859126167e84e55afe8a32025ac0f65065e)
2008-04-03 17:23:22 +02:00
Günther Deschner
b365cd3fc5 Add pwb_context to pam_winbind.h.
Guenther
(This used to be commit fe8acb064433b286938e0b572ca1faa8a54414b7)
2008-04-03 16:27:18 +02:00
Volker Lendecke
a8d59ebe81 NetBSD needs PAM_SM_SESSION
Otherwise no prototype for pam_sm_close_session is defined
(This used to be commit e26ba6a3c6bf54b426b55c4ca0b9db98cd0d7b75)
2008-02-01 13:06:23 +01:00
Günther Deschner
a92eb76688 Finally enable pidl generated SAMR & NETLOGON headers and clients.
Guenther
(This used to be commit f7100156a7df7ac3ae84e45a47153b38d9375215)
2008-01-17 16:54:46 +01:00
Lars Müller
b824a665bb r23708: - Add define for WINBIND_WARN_PWD_EXPIRE.
- Add parameter config_flag to get_config_item_int() and do the same
  check as in get_conf_item_string.
(This used to be commit d1d1baa264587911e1c97b3b35d5ed2bc56bf12b)
2007-10-10 12:23:47 -05:00
Lars Müller
a3de7e9b9d r23704: Add pam_pwd_expire feature as discussed on samba-technical.
This is a slightly modified version to set warn_pwd_expire to the
default value if 0, no, or a broken value is set.

This version also has one if statement less in get_config_item_int().

Thanks a lot to Andreas 'GlaDiaC' Schneider for this feature!
(This used to be commit d26914c978457ae0ec097cc40c8e33a7cee9ebcf)
2007-10-10 12:23:46 -05:00
James Peach
f4ae285763 r23095: Support systems that have their PAM headers in /usr/include/pam.
(This used to be commit f1e8de4b576b3954d456cb64c02417908bab8da4)
2007-10-10 12:22:45 -05:00
Gerald Carter
fd5ff711b6 r22712: Inform the user when logging in via pam_winbind
and the krb5 tkt cache could not be created due to clock skew.
(This used to be commit 24616f7d6be40b090dc74851b1ea7d09d6976811)
2007-10-10 12:21:49 -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
Günther Deschner
902a6e1da1 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
(This used to be commit 034d42ba7236e67303a8221b7a613799d1a61b83)
2007-10-10 12:17:44 -05:00
Günther Deschner
0cf5662363 r21154: Add PAM_WINBIND_LOGONSERVER, also merge the various pam_set_data calls.
Guenther
(This used to be commit 97a0b1b79499af10930500ce857c93ffbacfdb6e)
2007-10-10 12:17:43 -05:00
Günther Deschner
44512030b1 r21152: Correctly omit pam conversations when PAM_SILENT has been set by the
calling application.

Guenther
(This used to be commit ebfae9a671d2c960178228ba7fdcd07cb2f49a05)
2007-10-10 12:17:43 -05:00
Gerald Carter
7e8a068a5e r21012: Patch from Danilo Almeida @ Centeris (via me):
Details: Improve PAM logging
- The improved logging is far tracking down PAM-related bugs
- PAM_SILENT was being mis-used to suppress syslog output instead of
  suppressing user output.  This lets PAM_SILENT still log to syslog.
- Allow logging of item & data state via debug_state config file option.
- Logging tracks the pam handle used.
(This used to be commit cc1a13a9f06e5c15c8df19d0fbb31dbdeb81a9cc)
2007-10-10 12:17:27 -05:00
Günther Deschner
0d538f7370 r20687: Implement grace logons for offline authentications in pam_winbind.
In case a user authenticated sucessfully and his password just expired
while beeing disconnected, we should allow a user to logon (given a
clear warning). We currently forced the user into a password change
dialogue in that scenario; this did not make much sense while offline.

Guenther
(This used to be commit 668b278653acfc4de7807834988f7af557e608a5)
2007-10-10 12:17:02 -05:00
Günther Deschner
b26b8f95e9 r19351: Also export the info3 profilepath via the PAM_WINBIND_PROFILEPATH data
field.

Guenther
(This used to be commit 66b92f27fa4edec180b8c8eee929ec8f31ef6a08)
2007-10-10 12:15:30 -05:00
Jeremy Allison
05109131b0 r19103: From "Björn JACKE <bjoern@j3e.DE>":
The attached patch cleans up pam_winbind a tiny bit. Instead of making
exceptions for all pam implementations except for Linux' it's better
to make an exception for the only pam implementation which is
different from all the others. This is equivalent to what pam_smb_auth
does already.
-----------------
Jeremy
(This used to be commit 8e5596470822d20740f86585a6cf67240f2face4)
2007-10-10 12:15:13 -05:00
Stefan Metzmacher
a734e98b51 r18798: use libreplace headers in pam and nss modules
this hopefully fixes the build on AIX

metze
(This used to be commit ef1001f5a269f3d6a66f40e3fb01eccc807dcd7e)
2007-10-10 12:00:59 -05:00
Günther Deschner
1f0b2e84d7 r18484: Start some cleanup on pam_winbind's syslogging:
* as openlog() is non-reentrant and pam_winbind thereby overrides the
  syslog settings of the calling application, directly call syslog (or
  pam_vsyslog if available)

* support the PAM_SILENT flag to avoid any log messages beeing created

Guenther
(This used to be commit 0f7e37ffc4759a4e29f63ab83f39ddb31c8240f6)
2007-10-10 11:51:44 -05:00
Günther Deschner
ec17ea6b06 r17366: Save the logon script path from the info3 in the PAM session allowing
other PAM modules to pick it up from there.

Guenther
(This used to be commit b3ac5a586ba37b1122b0dc941dfee648fc4fa6d5)
2007-10-10 11:38:28 -05:00
Volker Lendecke
64d729c84d r15479: Check in patch from bug # 3746 -- Thanks Timur
(This used to be commit ac79bba1a118635ed18d23cf84bdf15923b354c0)
2007-10-10 11:16:53 -05:00
Günther Deschner
af3490061b r15398: Attempt to send the correct warning when a password change was attempted
too early.

Guenther
(This used to be commit 7f64a66d25f2a4aa48c2639da8e783c1759c5dd4)
2007-10-10 11:16:40 -05:00
Günther Deschner
adc0a34ceb r15040: Stripping the parametric options in pam_winbind and use
/etc/security/pam_winbind.conf as config file for the PAM module by
default.

Guenther
(This used to be commit 41b79ee80c7b0f4836ded51d42c7dc91cba75ccd)
2007-10-10 11:15:59 -05:00
Günther Deschner
9608b4328d r15038: Replace all code in pam_winbind that relied on access to samba
internals, mostly with the code that was in pam_winbind before.

Also switch from using loadparm to use iniParser to read the new
pam_winbind options from a configuration file. That still uses the old
(parametric) option names which will be replaced next (as iniParser does
not support parametric options).

Guenther
(This used to be commit 6f668ce67318f17bba79cd98b5d169cd19eafcd4)
2007-10-10 11:15:58 -05:00
Günther Deschner
ca09263d00 r14940: Remove pam_winbind's ability to create home directories on it's own.
Guenther
(This used to be commit 87293802f3e0666c9a50eb3ca63bb1a7dccc50dc)
2007-10-10 11:15:54 -05:00
Günther Deschner
69f3c630fa r14841: Fix IRIX build --with-pam.
Guenther
(This used to be commit 99158406b47dc07961c4f6536181da868cf276ca)
2007-10-10 11:15:50 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10 11:06:23 -05:00
Günther Deschner
29ba5c17cd r12900: Merge from trunk:
Correctly handle the case where users logon with an expired password.

In that case pam_sm_authenticate has to return PAM_SUCESS instead of
PAM_NEW_AUTHTOK_REQD or PAM_AUTHTOK_EXPIRED and pam_sm_acct_mgmt has to
take care of requesting an immediate password change. (see the Linux PAM
documentation).

Fixes Bugzilla #1524, #3205. Tested with login, sshd, kdm and gdm on
Linux.

Thanks to Scott Barker <Scott_Barker@mtechIT.com>.

Guenther
(This used to be commit 4cb662ffd76dbe30003c618c94ccf6ebd4afb48c)
2007-10-10 11:06:06 -05:00
Günther Deschner
33b2bc4930 r1888: Bring the same level of "required_membership"-functionality that
ntlm_auth uses, to pam_winbindd as well.

This allows to make successfull authentication via PAM dependent on
SID-membership. At the moment, both ntlm_auth and pam_winbindd.so accept
user/group-names or sid-strings - as discussed, recursive membership
(e.g. local aliases) will be added later.

Guenther
(This used to be commit 7494569655f8d112a0c883a2748a1012bb64ad3a)
2007-10-10 10:52:23 -05:00
Tim Potter
d5bd98dd9a More FreeBSD PAM compile fixes. Don't redefine PAM_AUTHTOK_RECOVER_ERR
if it already exists.  FreeBSD 4.8 doesn't need the redefinition, 5.0 does.
(This used to be commit 4a3727b03b0488fa82687014cb476b1971a78be8)
2003-09-04 03:28:40 +00:00
Tim Potter
ea7b4b6c32 Fix for bug 261. Create a configure #define for FreeBSD and a check in
nsswitch/pam_winbind.h so we can compile properly on this platform.
(This used to be commit 75411005fcab7ecf31940c5f7b87fd407166f98a)
2003-09-02 00:09:31 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-09-25 15:19:00 +00:00
Andrew Bartlett
657a24f476 Various winbind updates:
- pam_winbind updates from vance, fixing a typo and making some the options
  work properly.

- Extra parinoia in the winbind connection loop

- Allow pam_winbind to compile on HP-UX (Don Mcall, more work to do).

- Fix up configure.in to use the same method for building the test .so
  as the Makefile uses.

Andrew Bartlett
(This used to be commit 8e705dd9215b1cb3f44d6348094679d7dc6a7fbd)
2002-03-23 08:28:19 +00:00
Andrew Bartlett
ed389ee8dc Drastic impromvents to pam_winbind.
This adds code to do generic PAM -> NTSTATUS and NTSTATUS -> PAM error
conversions, and uses them to make the error handling in pam_winbind sane.

In particular, pam_winbind now uses PAM error codes, not silly '-1, -2 ...'
stuff, and logs the NTSTATUS error that winbind now sends over the pipe.

Added code to wbinfo to display these - makes a big difference in debugging
winbindd.

The main change here is the code to allow pam_winbind password changing to
correctly stack - This code ripped from pam_unix, and the copyright attached.
(Same as for all pam modules, including pam_winbind)

Andrew Bartlett
(This used to be commit dc1a72f896b83bc1ad3c7bf6c12c36ace3967280)
2002-02-05 09:40:36 +00:00
Simo Sorce
b50d10c2a3 move to SAFE_FREE()
(This used to be commit 03dc67788f68c9e01b5a82fdf43f837cb19f4608)
2001-09-17 04:52:45 +00:00
Jeremy Allison
d222a3f28d Try to fix build by adding autoconf tests for pam headers.
Jeremy.
(This used to be commit d52bc4d219bd07e656986e7754ea6e238c626d77)
2001-05-22 21:47:11 +00:00
Tim Potter
ebb900cf3e iAdditional files for winbind merge.
(This used to be commit 38ab3b31b5dc39fb59f224b399bb9c2269f1c933)
2001-05-07 05:03:40 +00:00