1a563ca70SAlex Hornung /* 2a563ca70SAlex Hornung * Copyright (c) 2011 Alex Hornung <alex@alexhornung.com>. 3a563ca70SAlex Hornung * All rights reserved. 4a563ca70SAlex Hornung * 5a563ca70SAlex Hornung * Redistribution and use in source and binary forms, with or without 6a563ca70SAlex Hornung * modification, are permitted provided that the following conditions 7a563ca70SAlex Hornung * are met: 8a563ca70SAlex Hornung * 9a563ca70SAlex Hornung * 1. Redistributions of source code must retain the above copyright 10a563ca70SAlex Hornung * notice, this list of conditions and the following disclaimer. 11a563ca70SAlex Hornung * 2. Redistributions in binary form must reproduce the above copyright 12a563ca70SAlex Hornung * notice, this list of conditions and the following disclaimer in 13a563ca70SAlex Hornung * the documentation and/or other materials provided with the 14a563ca70SAlex Hornung * distribution. 15a563ca70SAlex Hornung * 16a563ca70SAlex Hornung * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17a563ca70SAlex Hornung * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18a563ca70SAlex Hornung * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 19a563ca70SAlex Hornung * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20a563ca70SAlex Hornung * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21a563ca70SAlex Hornung * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 22a563ca70SAlex Hornung * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23a563ca70SAlex Hornung * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24a563ca70SAlex Hornung * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25a563ca70SAlex Hornung * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26a563ca70SAlex Hornung * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27a563ca70SAlex Hornung * SUCH DAMAGE. 28a563ca70SAlex Hornung */ 29a563ca70SAlex Hornung 300d575305SAntonio Huete Jimenez int run_userland(const char *binary, int argc, const char **argv, const char *interpreter, 31*039caa27SAntonio Huete Jimenez int need_setuid, uid_t uid, struct timeval *timeout, int rc, 32*039caa27SAntonio Huete Jimenez int unify_output, char *errbuf, size_t errbuf_sz, 33*039caa27SAntonio Huete Jimenez struct testcase_result *tr); 34a563ca70SAlex Hornung int run_simple_cmd(const char *binary, const char *arg, char *errbuf, 35a563ca70SAlex Hornung size_t errbuf_sz, struct testcase_result *tr); 36