Changes On Branch 2204669e3bcce671

Changes In Branch seccomp Through [2204669e3b] Excluding Merge-Ins

This is equivalent to a diff from 7ee2e833d2 to 2204669e3b

2020-03-31
18:46
Added AFL test script check-in: 05a7ef3fae user: rkeene tags: trunk
15:44
Added seccomp support check-in: 854cb424a1 user: rkeene tags: seccomp
14:33
Merged in trunk check-in: 2204669e3b user: rkeene tags: seccomp
14:30
Integrated remove-c11-atomics changes check-in: 7ee2e833d2 user: rkeene tags: trunk
14:26
Made socket idle timeout checks more frequent Closed-Leaf check-in: fe6d401e68 user: rkeene tags: remove-c11-atomics
2018-05-03
20:08
Added support for not redirecting to index.html check-in: 879cdc86ce user: rkeene tags: trunk
2014-06-16
17:00
Added start of seccomp support check-in: 5e8db14086 user: rkeene tags: seccomp

Modified filed.c from [7252b16239] to [05973c0b4a].

21
22
23
24
25
26
27

28
29
30
31
32
33
34
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35







+







 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 * POSSIBILITY OF SUCH DAMAGE.
 */
#include <sys/sendfile.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/prctl.h>
#include <arpa/inet.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <pthread.h>
#include <strings.h>
#include <signal.h>
1909
1910
1911
1912
1913
1914
1915



1916
1917
1918
1919
1920
1921
1922
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926







+
+
+







		setuid_ret = setuid(user);
		if (setuid_ret != 0) {
			perror("setuid");

			return(1);
		}
	}

	/* Do not allow any privilege changes beyond this point */
	prctl(PR_SET_NO_NEW_PRIVS, 1);

	/* Initialize */
	init_ret = filed_init(cache_size);
	if (init_ret != 0) {
		perror("filed_init");

		return(3);