Menu

#209 pam_mkhomedir

feature-request
closed-fixed
modules (176)
5
2005-04-29
2002-08-26
No

Hello!

pam_mkhomedir does not work when there does not
exist parent directory of users homedirectory.

Sample:
user have directory:
/home/informatyka/2000/ID/p/cez
but on machine there is no directory:
/home/informatyka/2000/ID/p

then pam_mkhomedir does not work.

Please i somebody make a patch (I think it is trivial for
somebody who sit inside PAM) please announce me.

Best Regards
PS-Here is relevant place of code:
/* Create the new directory */
if (mkdir(dest,0700) != 0)
{
_log_err(LOG_DEBUG, "unable to create directory
%s",source);
return PAM_PERM_DENIED;
}

Here mkdir must be changed to procedure which
recusirely makes path (e.g. sample code is in mkdir
(option -p)).

Discussion

  • Ian P. Christian

    Logged In: YES
    user_id=693614

    Coreutils has lib/makepath.c that could probably be used to
    achive this.... My C is pretty poor, else I would attempt.
    Has anyone had a chance to look into this?

    Kind Regards,
    Ian

     
  • Thorsten Kukuk

    Thorsten Kukuk - 2005-04-29
    • assigned_to: nobody --> kukuk
    • status: open --> closed-fixed
     
  • Thorsten Kukuk

    Thorsten Kukuk - 2005-04-29

    Logged In: YES
    user_id=1142

    Fixed in CVS.

     

Log in to post a comment.

MongoDB Logo MongoDB