#22: pam_mkhomedir uses user alias username instead of canonical name when
creating home directories
-------------------------------------------------+-------------------------
Reporter: musicalvegan0 | Owner: pam-
Type: defect | developers@…
Priority: major | Status: closed
Version: 1.1.x | Component: modules
Keywords: sssd, ipa, active directory, | Resolution: fixed
mkhomedir | Blocked By:
Blocking: |
-------------------------------------------------+-------------------------
Changes (by ldv):
* status: new => closed
* resolution: => fixed
Comment:
Replying to [comment:3 ldv]:
OK, {{{pam_mkhomedir}}} essentially implements the following:
- gets {{{NAME}}} via {{{pam_get_item(PAM_USER)}}}, it is the same
{{{NAME}}} that
was passed to {{{pam_start()}}} unless explicitly changed
using {{{pam_set_item(PAM_USER)}}};
- if {{{getpwnam(NAME)->pw_dir}}} exists, exit;
- if {{{getpwnam(getpwnam(NAME)->pw_name)->pw_dir}}} exists, exit;
- create {{{getpwnam(getpwnam(NAME)->pw_name)->pw_dir}}} from the
skeleton
directory.
https://git.fedorahosted.org/cgit/linux-
pam.git/commit/?id=f9db4aae8b0292d1273c7acda1cc20ff87fabd5c brings the
check and the creation back in sync, both handling
{{{getpwnam(NAME)->pw_dir}}}.
A system where {{{getpwnam(NAME)->pw_dir}}} differs from
{{{getpwnam(getpwnam(NAME)->pw_name)->pw_dir}}} is likely to suffer from
other problems, and {{{pam_mkhomedir}}} is not the right place to deal
with them.
I'm closing this bug report as fixed, assuming that it was actually about
inconsistency between the home directory check and its creation.
--
Ticket URL: <
https://fedorahosted.org/linux-pam/ticket/22#comment:7>
linux-pam <
http://fedorahosted.org/linux-pam>
The Linux-PAM (Pluggable Authentication Modules) project