1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-06 11:41:52 +00:00
freebsd-ports/security/sfs/files/patch-sfsmisc_suidgetfd.C
Edwin Groothuis ef4fc524f8 Update port: security/sfs, fix build with gcc42
The attached patch fixes security/sfs so it builds with
	gcc42. The only change I made that I am wary of is commenting
	out the LIBTOOL variable in ${WRKSRC}/sfsrwcd/Makefile.
	However, this seems to work fine on both 7.0-CURRENT and
	6.2-STABLE.

	In addition, I would not mind maintaining the port.

PR:		ports/116389
Submitted by:	Dave Grochowski <malus.x@gmail.com>
2007-09-23 03:17:21 +00:00

21 lines
852 B
C

--- sfsmisc/suidgetfd.C.orig 2001-02-07 02:48:01.000000000 -0500
+++ sfsmisc/suidgetfd.C 2007-09-15 19:11:34.000000000 -0400
@@ -42,7 +42,7 @@
close_on_exec (fds[0]);
str path = fix_exec_path ("suidconnect");
- char *av[] = { "suidconnect", const_cast<char *> (prog.cstr ()), NULL };
+ char *av[] = { const_cast<char *> ("suidconnect"), const_cast<char *> (prog.cstr ()), NULL };
if (spawn (path, av, fds[1]) == -1) {
close (fds[0]);
close (fds[1]);
@@ -64,7 +64,7 @@
close_on_exec (fds[0]);
str path = fix_exec_path ("suidconnect");
- char *av[] = { "suidconnect", const_cast<char *> (prog.cstr ()), NULL };
+ char *av[] = { const_cast<char *> ("suidconnect"), const_cast<char *> (prog.cstr ()), NULL };
if (spawn (path, av, fds[1]) == -1)
fatal << path << ": " << strerror (errno) << "\n";
close (fds[1]);