Automount segfaults in do_mount_indirect
On Fedora Core 6 (autofs-5.0.1-0.rc3.21) I get occasional segfaults in do_mount_indirect, the issue seems to remain in 5.0.1 version. The attached patch seems to take care of the issue.
See also: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229344
Signature · 5 lines
Anders Blomdell Email: [email protected] Department of Automatic Control Lund University Phone: +46 46 222 4625 P.O. Box 118 Fax: +46 46 138118 SE-221 00 Lund, Sweden
daemon/indirect.c +4 -4
@@ -806,8 +806,8 @@ goto cont; } - status =getpwuid_r (mt->uid, ppw, pw_tmp, tmplen, pppw); -if (status) { + status =getpwuid_r (mt->uid, &pw, pw_tmp, tmplen, pppw); +if (status || !ppw) {error (ap->logopt,"failed to get passwd info from getpwuid_r" );free (tsv);free (pw_tmp);
@@ -853,8 +853,8 @@ goto cont; } - status =getgrgid_r (mt->gid, pgr, gr_tmp, tmplen, ppgr); -if (status) { + status =getgrgid_r (mt->gid, &gr, gr_tmp, tmplen, ppgr); +if (status || !pgr) {error (ap->logopt,"failed to get group info from getgrgid_r" );free (tsv->user);free (tsv->home);
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs