~lightdm-team/lightdm/1.2

« back to all changes in this revision

Viewing changes to tests/src/libsystem.c

  • Committer: Robert Ancell
  • Date: 2012-03-28 05:14:40 UTC
  • Revision ID: robert.ancell@canonical.com-20120328051440-330ing09sz206vye
Add test for home directory being created on pam_open_session

Show diffs side-by-side

added added

removed removed

Lines of Context:
728
728
    if (pamh == NULL)
729
729
        return PAM_SYSTEM_ERR;
730
730
 
 
731
    if (strcmp (pamh->user, "make-home-dir") == 0)
 
732
    {
 
733
        struct passwd *entry;
 
734
        entry = getpwnam (pamh->user);
 
735
        g_mkdir_with_parents (entry->pw_dir, 0755);
 
736
    }
 
737
 
731
738
    return PAM_SUCCESS;
732
739
}
733
740