https://bugzilla.novell.com/show_bug.cgi?id=740110 https://bugzilla.novell.com/show_bug.cgi?id=740110#c10 --- Comment #10 from Marcus Meissner <meissner@suse.com> 2012-06-22 10:06:06 UTC --- it had some warnings i needed to fix. i also have some questions: 1. + if (setfsgid(gid) != gid || setfsuid(uid) != uid) { + syslog(LOG_ERR, "pam_ecryptfs: setfsuid error"); + goto outnouid; + } setfsuid and setfsgid return the previous fsgid / fsuid value ... is this right? 2. + if (setresuid(pwd->pw_uid, pwd->pw_uid, pwd->pw_uid) < 0) + return -1; + if (setgroups(1, &pwd->pw_gid) < 0 || setgid(pwd->pw_gid) < 0) + return -1; is this the right order? or setroup/setgid before setresuid)() 3. order? + if (setuid(uid) < 0 || setgid(gid) < 0 || setgroups(1, &gid) < 0) { + syslog(LOG_ERR, "pam_ecryptfs: Error setting uid/gid"); + goto out_child; + } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.