ALT Linux Bugzilla
– Attachment 789 Details for
Bug 6385
PAM_mkhomedir does not work with SSHD
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Patch to openssh-3.6.1p2-alt6 for solving problem.
openssh-3.6.1p2-zu-session.patch (text/plain), 1.86 KB, created by
Boldin Pavel
on 2005-04-02 23:16:34 MSD
(
hide
)
Description:
Patch to openssh-3.6.1p2-alt6 for solving problem.
Filename:
MIME Type:
Creator:
Boldin Pavel
Created:
2005-04-02 23:16:34 MSD
Size:
1.86 KB
patch
obsolete
>diff -NurpP openssh-3.6.1p2.orig/auth-pam.c openssh-3.6.1p2/auth-pam.c >--- openssh-3.6.1p2.orig/auth-pam.c 2005-04-02 13:18:31 +0500 >+++ openssh-3.6.1p2/auth-pam.c 2005-04-02 13:20:34 +0500 >@@ -319,13 +319,16 @@ void do_pam_session(char *username, cons > pam_retval, PAM_STRERROR(__pamh, pam_retval)); > } > >- pam_retval = pam_open_session(__pamh, 0); >- log_reinit(); >- if (pam_retval != PAM_SUCCESS) >- fatal("PAM session setup failed[%d]: %.200s", >- pam_retval, PAM_STRERROR(__pamh, pam_retval)); >+ if(username != NULL) >+ { >+ pam_retval = pam_open_session(__pamh, 0); >+ log_reinit(); >+ if (pam_retval != PAM_SUCCESS) >+ fatal("PAM session setup failed[%d]: %.200s", >+ pam_retval, PAM_STRERROR(__pamh, pam_retval)); > >- session_opened = getpid(); >+ session_opened = getpid(); >+ } > } > > /* Set PAM credentials */ >diff -NurpP openssh-3.6.1p2.orig/session.c openssh-3.6.1p2/session.c >--- openssh-3.6.1p2.orig/session.c 2005-04-02 13:18:31 +0500 >+++ openssh-3.6.1p2/session.c 2005-04-02 13:19:17 +0500 >@@ -456,7 +456,7 @@ do_exec_no_pty(Session *s, const char *c > session_proctitle(s); > > #if defined(USE_PAM) >- do_pam_session(s->pw->pw_name, NULL); >+ do_pam_session(NULL, NULL); > do_pam_setcred(1); > if (is_pam_password_change_required()) > packet_disconnect("Password change required but no " >@@ -583,7 +583,7 @@ do_exec_pty(Session *s, const char *comm > ttyfd = s->ttyfd; > > #if defined(USE_PAM) >- do_pam_session(s->pw->pw_name, s->tty); >+ do_pam_session(NULL, s->tty); > do_pam_setcred(1); > #endif > >@@ -1250,6 +1250,8 @@ do_setusercontext(struct passwd *pw) > * These will have been wiped by the above initgroups() call. > * Reestablish them here. > */ >+ /* We should get working pam_mkhomedir */ >+ do_pam_session(s->pw->pw_name, NULL); > do_pam_setcred(0); > # endif /* USE_PAM */ > # if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 6385
: 789 |
790