1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

107 Commits

Author SHA1 Message Date
Günther Deschner
5b4a4df26f r22794: Add "debug_state" and "silent" to pam_winbind.conf template. Honor the silent
argument when parsing pam configuration file options.

Guenther
2007-10-10 12:21:57 -05:00
Gerald Carter
24616f7d6b r22712: Inform the user when logging in via pam_winbind
and the krb5 tkt cache could not be created due to clock skew.
2007-10-10 12:21:49 -05:00
Günther Deschner
bf9131fed3 r22402: Fix build warning.
Guenther
2007-10-10 12:19:32 -05:00
Simo Sorce
70878d6985 r22393: fix cut&paste error 2007-10-10 12:19:31 -05:00
Simo Sorce
7961476784 r22388: clearer message, thanks David 2007-10-10 12:19:29 -05:00
Simo Sorce
ad57434faf r22348: 3_0 as well 2007-10-10 12:19:28 -05:00
Gerald Carter
80790f935a r21933: Change the write_sock() call in pam_winbind_request()
to not request a privileged pipe operation for everything
as this cannot be done from a process running under the
context of a user (e.g. screensaver).

Thanks to Danilo Almeida <dalmeida@centeris.com> for the help
in pointing out the change to write_sock().
2007-10-10 12:18:50 -05:00
Volker Lendecke
e5741e27c4 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
2007-10-10 12:18:42 -05:00
Gerald Carter
82dc19f844 r21632: Remove ununsed variable 2007-10-10 12:18:18 -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
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
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
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
Günther Deschner
1feb961577 r21158: Add _pam_setup_krb5_env() and _pam_warn_logon_type() functions for
pam_winbind.

Guenther
2007-10-10 12:17:44 -05:00
Günther Deschner
86b34cd5d6 r21155: Forgot one _PAM_LOG_STATE_DATA_STRING call (only in 3_0).
Guenther
2007-10-10 12:17:44 -05:00
Günther Deschner
97a0b1b794 r21154: Add PAM_WINBIND_LOGONSERVER, also merge the various pam_set_data calls.
Guenther
2007-10-10 12:17:43 -05:00
Günther Deschner
ebfae9a671 r21152: Correctly omit pam conversations when PAM_SILENT has been set by the
calling application.

Guenther
2007-10-10 12:17:43 -05:00
Günther Deschner
1b82c5fa0e r21145: Convert some int to BOOL in pam_winbind (only in 3_0).
Guenther
2007-10-10 12:17:42 -05:00
Günther Deschner
2ac9cb3bbd r21144: Create more accurate warning message when the pam_winbind chauthtok has
received NT_STATUS_PASSWORD_RESTRICTION.

Guenther
2007-10-10 12:17:42 -05:00
Günther Deschner
88e2185d29 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
2007-10-10 12:17:42 -05:00
Günther Deschner
08ca5ea6f1 r21122: Simplify code in pam_winbind a bit.
Guenther
2007-10-10 12:17:40 -05:00
Günther Deschner
c562095953 r21020: Some pam_winbind fixes:
* make debug_state also configurable from the config file
* minor code cleanup

Guenther
2007-10-10 12:17:28 -05:00
Günther Deschner
adb40884e0 r21019: Fix typo.
Guenther
2007-10-10 12:17:28 -05:00
Günther Deschner
46d23c72bf r21016: Fix pam_sm_setcred again.
Jerry, the switch statement must ignore the PAM_SILENT flag.

Guenther
2007-10-10 12:17:27 -05:00
Gerald Carter
f82a517530 r21015: fix typo that breaks the build 2007-10-10 12:17:27 -05:00
Gerald Carter
ed794f0872 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)
2007-10-10 12:17:27 -05:00
Gerald Carter
cc1a13a9f0 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.
2007-10-10 12:17:27 -05:00
Gerald Carter
402e859475 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.
2007-10-10 12:17:26 -05:00
Gerald Carter
4aca986489 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.
2007-10-10 12:17:26 -05:00
Günther Deschner
668b278653 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
2007-10-10 12:17:02 -05:00
Günther Deschner
22d7923712 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
2007-10-10 12:17:01 -05:00
Günther Deschner
2a428ac814 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
2007-10-10 12:16:40 -05:00
Günther Deschner
f6c9421abd r20249: Fail when parsing invalid options in _pam_parse.
Guenther
2007-10-10 12:16:36 -05:00
Günther Deschner
222320373f r20241: Slightly improve readability of the pam_vsyslog replacement function.
Guenther
2007-10-10 12:16:35 -05:00
Günther Deschner
ecbab58826 r20240: Be a little more verbose about the credential flags when the debug flag
is set.

Guenther
2007-10-10 12:16:35 -05:00
Günther Deschner
2c549f71f1 r20239: Parse the configfile for pam_sm_setcred as well
(e.g. to get the debug flag)

Guenther
2007-10-10 12:16:35 -05:00
Jeremy Allison
4a74c55384 r20180: Ensure that pam returns the correct error messages
when offline and or doing password changes.
Jeremy.
2007-10-10 12:16:30 -05:00
Jim McDonough
0d03f51379 r20136: Fix #4290. Properly compute time to password expiration in message from
pam_winbind.  Thanks to Andrew Benham <andrew.benham@thus.net>
2007-10-10 12:16:27 -05:00
Jeremy Allison
1af18f613b 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.
2007-10-10 12:15:48 -05:00
Simo Sorce
3fed72ac3e r19703: Don't free a string if you want to return it! 2007-10-10 12:15:48 -05:00
Günther Deschner
66b92f27fa r19351: Also export the info3 profilepath via the PAM_WINBIND_PROFILEPATH data
field.

Guenther
2007-10-10 12:15:30 -05:00
Günther Deschner
a4d17ee9c9 r19349: Fix invalid free on the PAM_WINBIND_PWD_LAST_SET data.
Guenther
2007-10-10 12:15:30 -05:00
Günther Deschner
9621bb420a r19348: Fix uninitialized dictionary handle, found by valgrind.
Guenther
2007-10-10 12:15:30 -05:00
Gerald Carter
4e464a2c35 r18927: Fix build. *please* compile the code at least once before checking it in. 2007-10-10 12:14:47 -05:00
Günther Deschner
143a48927b r18924: Minor cleanup.
Guenther
2007-10-10 12:14:47 -05:00
Volker Lendecke
8c60e71229 r18667: Two C++ warnings 2007-10-10 12:00:45 -05:00