1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

94 Commits

Author SHA1 Message Date
Günther Deschner
826aa64c45 r21309: Add PRINTF_ATTRIBUTE checks for log statements.
Guenther
(This used to be commit 968dfcc821)
2007-10-10 12:17:55 -05:00
Günther Deschner
317d005142 r21161: Another fix for pam_winbind: Move the entire pwd expiry handling into
the PAM_SUCCESS block.

Guenther
(This used to be commit f4a704745c)
2007-10-10 12:17:44 -05:00
Günther Deschner
7440e4255c 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
(This used to be commit 02713f314b)
2007-10-10 12:17:44 -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 034d42ba72)
2007-10-10 12:17:44 -05:00
Günther Deschner
dbb9450312 r21158: Add _pam_setup_krb5_env() and _pam_warn_logon_type() functions for
pam_winbind.

Guenther
(This used to be commit 1feb961577)
2007-10-10 12:17:44 -05:00
Günther Deschner
462893a7be r21155: Forgot one _PAM_LOG_STATE_DATA_STRING call (only in 3_0).
Guenther
(This used to be commit 86b34cd5d6)
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 97a0b1b794)
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 ebfae9a671)
2007-10-10 12:17:43 -05:00
Günther Deschner
c622130a7d r21145: Convert some int to BOOL in pam_winbind (only in 3_0).
Guenther
(This used to be commit 1b82c5fa0e)
2007-10-10 12:17:42 -05:00
Günther Deschner
0b2bbb2704 r21144: Create more accurate warning message when the pam_winbind chauthtok has
received NT_STATUS_PASSWORD_RESTRICTION.

Guenther
(This used to be commit 2ac9cb3bbd)
2007-10-10 12:17:42 -05:00
Günther Deschner
4aa7205c3d r21143: Fix wrong check for pam error codes for getpwnam and lookup winbind
requests in pam_winbind (Bug #4094).

Inspired by fix from Lars Heete.

Guenther
(This used to be commit 88e2185d29)
2007-10-10 12:17:42 -05:00
Günther Deschner
48191ddec6 r21122: Simplify code in pam_winbind a bit.
Guenther
(This used to be commit 08ca5ea6f1)
2007-10-10 12:17:40 -05:00
Günther Deschner
b979bf5686 r21020: Some pam_winbind fixes:
* make debug_state also configurable from the config file
* minor code cleanup

Guenther
(This used to be commit c562095953)
2007-10-10 12:17:28 -05:00
Günther Deschner
74f38589b3 r21019: Fix typo.
Guenther
(This used to be commit adb40884e0)
2007-10-10 12:17:28 -05:00
Günther Deschner
3f9585018d r21016: Fix pam_sm_setcred again.
Jerry, the switch statement must ignore the PAM_SILENT flag.

Guenther
(This used to be commit 46d23c72bf)
2007-10-10 12:17:27 -05:00
Gerald Carter
05ec639127 r21015: fix typo that breaks the build
(This used to be commit f82a517530)
2007-10-10 12:17:27 -05:00
Gerald Carter
45aa381a77 r21013: * Remove "inline" keyword
* Remove anpther check for PAM_SILENT that prevents logging to syslog
* Add missing check for TRY_FIRST_PASS when using authtok (missed
  from previous merge)
(This used to be commit ed794f0872)
2007-10-10 12:17:27 -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 cc1a13a9f0)
2007-10-10 12:17:27 -05:00
Gerald Carter
76fd8f8e1d r21011: Another patch from Danilo Almeida @ Centeris (via me):
Details: Reset the "new password prompt required" state whenever
we do a new auth.  In more detail, in pam_sm_authenticate, if not
settting PAM_WINBIND_NEW_AUTHTOK_REQD, then clean any potentially
present PAM_WINBIND_NEW_AUTHTOK_REQD.
(This used to be commit 402e859475)
2007-10-10 12:17:26 -05:00
Gerald Carter
df1e2693dc r21009: Patch from Danilo Almeida @ Centeris (via me).
Patch details:

Support most options in pam_winbind.conf; support comma-separated names in
require-membership-of.  Details below:

1) Provides support for almost all config options in pam_winbind.conf
   (all except for use_first_pass, use_authtok, and unknown_ok).

 - That allows us to work well when invoked via call_modules from
   pam_unix2.conf as well as allowing use of spaces in names used
   w/require_membership_of.

2) Support for comma-separated list of names or SID strings in
   require_membership_of/require-membership-of.

 - Increased require_membership_of field in winbind request from fstring
   (256) to pstring (1024).

 - In PAM side, parse out multiple names or SID strings and convert
   all of them to SID strings.

 - In Winbind side, support membership check against multiple SID strings.
(This used to be commit 4aca986489)
2007-10-10 12:17:26 -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 668b278653)
2007-10-10 12:17:02 -05:00
Günther Deschner
062a1a4904 r20651: Fix "password expires soon" warning message for pam_winbind.
We were incorrectly calculating the days until the password expires and
we also need to look at the info3 pass_must_change_time for expiry
calculation.

Guenther
(This used to be commit 22d7923712)
2007-10-10 12:17:01 -05:00
Günther Deschner
c1a05657b9 r20304: Smaller fixes for pam_winbind:
* fail on invalid credential flags in pam_sm_setcred
* parse config file for pam_sm_acct_mgmt and pam_sm_open_session

Guenther
(This used to be commit 2a428ac814)
2007-10-10 12:16:40 -05:00
Günther Deschner
fb6d54dbab r20249: Fail when parsing invalid options in _pam_parse.
Guenther
(This used to be commit f6c9421abd)
2007-10-10 12:16:36 -05:00
Günther Deschner
9291e634c0 r20241: Slightly improve readability of the pam_vsyslog replacement function.
Guenther
(This used to be commit 222320373f)
2007-10-10 12:16:35 -05:00
Günther Deschner
619671a718 r20240: Be a little more verbose about the credential flags when the debug flag
is set.

Guenther
(This used to be commit ecbab58826)
2007-10-10 12:16:35 -05:00
Günther Deschner
6fdbdfc86f r20239: Parse the configfile for pam_sm_setcred as well
(e.g. to get the debug flag)

Guenther
(This used to be commit 2c549f71f1)
2007-10-10 12:16:35 -05:00
Jeremy Allison
63d8197453 r20180: Ensure that pam returns the correct error messages
when offline and or doing password changes.
Jeremy.
(This used to be commit 4a74c55384)
2007-10-10 12:16:30 -05:00
Jim McDonough
86a11183f7 r20136: Fix #4290. Properly compute time to password expiration in message from
pam_winbind.  Thanks to Andrew Benham <andrew.benham@thus.net>
(This used to be commit 0d03f51379)
2007-10-10 12:16:27 -05:00
Jeremy Allison
8f723972ae r19710: Fix memory leak in get_conf_item_string(). As
we're just doing strchr on a const string there's
no need to strdup it before, we're never modifying
it. Just remove the variable "parm".
Jeremy.
(This used to be commit 1af18f613b)
2007-10-10 12:15:48 -05:00
Simo Sorce
b903eb231a r19703: Don't free a string if you want to return it!
(This used to be commit 3fed72ac3e)
2007-10-10 12:15:48 -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 66b92f27fa)
2007-10-10 12:15:30 -05:00
Günther Deschner
da6e42b47f r19349: Fix invalid free on the PAM_WINBIND_PWD_LAST_SET data.
Guenther
(This used to be commit a4d17ee9c9)
2007-10-10 12:15:30 -05:00
Günther Deschner
e42f449fcc r19348: Fix uninitialized dictionary handle, found by valgrind.
Guenther
(This used to be commit 9621bb420a)
2007-10-10 12:15:30 -05:00
Gerald Carter
b0e29c79e7 r18927: Fix build. *please* compile the code at least once before checking it in.
(This used to be commit 4e464a2c35)
2007-10-10 12:14:47 -05:00
Günther Deschner
f1c2398723 r18924: Minor cleanup.
Guenther
(This used to be commit 143a48927b)
2007-10-10 12:14:47 -05:00
Volker Lendecke
d52612a7d9 r18667: Two C++ warnings
(This used to be commit 8c60e71229)
2007-10-10 12:00:45 -05:00
Jeremy Allison
4b57919051 r18507: Added debug log for returned username.
Jeremy.
(This used to be commit 7644fa70ba)
2007-10-10 11:51:44 -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 0f7e37ffc4)
2007-10-10 11:51:44 -05:00
Günther Deschner
030cf71d61 r18158: Stop winbindd from accumulating memory creds infinitely when doing
pam offline logons.

Guenther
(This used to be commit 95788cb291)
2007-10-10 11:43:29 -05:00
Jeremy Allison
d2465b1730 r18062: Fix to ensure the name used by pam matches the
name that will be returned by winbindd. This
(should) fix the bug where the user logs in
with DOMAIN\user but winbindd returns only
"user" for the username due to 'winbind use
default domain' being set.
Jeremy.
(This used to be commit 1b2aa17354)
2007-10-10 11:43:24 -05:00
Gerald Carter
975b159490 r17723: * BUG 3969: Fix unsigned time comparison with expiration policy from AD DC
* Merge patches from SLES10 to make sure we talk to the correct
  winbindd process when performing pam_auth (and pull the password policy info).
(This used to be commit 43bd8c00ab)
2007-10-10 11:38:46 -05:00
Volker Lendecke
0691ed55ca r17584: Some C++ Warnings
(This used to be commit f6194cf4b2)
2007-10-10 11:38:41 -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 b3ac5a586b)
2007-10-10 11:38:28 -05:00
Günther Deschner
41449a85e6 r17365: Fix memleak.
Guenther
(This used to be commit 62a8e0b089)
2007-10-10 11:38:28 -05:00
Gerald Carter
803748b15d r17017: BUG 3916: fix pam config file parsing in pam_winbind.
Patch from Dietrich Streifert <dietrich.streifert@visionet.de>
(This used to be commit 8d62188258)
2007-10-10 11:19:20 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Günther Deschner
6139f49d60 r16941: Fix crash bug when the pam conversation receives an empty token.
Thanks to Bjoern Jacke for the report and test-case.

Guenther
(This used to be commit f2ebc0e3de)
2007-10-10 11:19:13 -05:00
Günther Deschner
a6f5c79980 r15984: Correctly handle the case when there is no configuration file for
pam_winbind.

Guenther
(This used to be commit 29758ea1c4)
2007-10-10 11:17:16 -05:00
Günther Deschner
f01b0cca2e r15546: When debugging is enabled be just a little more verbose in logging in
pam_winbind.

Guenther
(This used to be commit bf077fb226)
2007-10-10 11:16:57 -05:00