Hello! On my system [1],
growisofs -version causes a core dump in mkisofs (8). The exact output is: * growisofs by <[EMAIL PROTECTED]>, version 7.0.1, front-ending to mkisofs: Bus error(coredump) (It says growisofs version 7.0.1, not 7.0, because I also use another patch [2]. The problem occurs with or without this patch, though.) I don't usually call growisofs like that myself, but k3b, for example, does. I can't say I understand the cause of the bug completely, but I believe the problem is simply that growisofs calls setuid (2) and munlockall (2) in the wrong order. The attached patch fixes the problem for me.
--- growisofs.c.orig Tue Aug 28 06:30:16 2007 +++ growisofs.c Tue Aug 28 07:10:32 2007 @@ -2924,10 +2924,16 @@ printf (" front-ending to %s: ",mkisofs_argv[0]); fflush (stdout); #if defined(__unix) || defined(__unix__) - setuid(getuid()); # ifdef __FreeBSD__ munlockall(); -#endif +# endif + /* Calling [setuid] before [munlockall] on FreeBSD + * causes [munlockall] to fail. This, in turn, leads + * to a bus error in mkisofs and it dumps core. + * However, calling [setuid] after [munlockall] works + * just fine. + */ + setuid(getuid()); execlp (mkisofs_argv[0],mkisofs_argv[0],"-version",NULL); #elif defined(_WIN32) if (_spawnl (_P_WAIT,mkisofs_argv[0],
Greetings Wolfram Fenske Footnotes: [1] $ uname -a FreeBSD hondo 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #1: Mon Jul 9 03:49:32 CEST 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/NVE_RELEASE_6_1 i386 The kernel is only slightly customized. The only real difference is that I use the nve (4) driver from -CURRENT because my network adapter didn't work properly at the time I built the kernel. [2] <http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/dvd%2Brw-tools/files/patch-growisofs.c?rev=1.5>
_______________________________________________ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[EMAIL PROTECTED]"