]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/misc-progs/setuid.h
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / src / misc-progs / setuid.h
CommitLineData
903310c4
MT
1/* SmoothWall helper program - header file
2 *
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
5 * Simple header file for all setuid progs.
66c36198 6 *
903310c4
MT
7 */
8
9#ifndef SETUID_H
10#define SETUID_H 1
11
12#include <stdlib.h>
13#include <sys/types.h>
14
15/* As nothing in setuid.c uses STRING_SIZE specifically there's no real reason
16 * to redefine it if it already is set */
17#ifndef STRING_SIZE
555637d1 18#define STRING_SIZE 1024
903310c4 19#endif
903310c4 20
81790c8a
MT
21#ifndef CONFIG_ROOT
22#define CONFIG_ROOT "/var/ipfire"
23#endif
24
25#ifndef SNAME
26#define SNAME "SNAME to be filled"
27#endif
28
903310c4
MT
29extern char * trusted_env[4];
30
ca060524 31int run(char* command, char** argv);
903310c4
MT
32int safe_system(char* command);
33int unpriv_system(char* command, uid_t uid, gid_t gid);
903310c4
MT
34int initsetuid(void);
35
db984059
MT
36int is_valid_argument_alnum(const char* arg);
37int is_valid_argument_num(const char* arg);
38
2b875b39
MT
39/* Compatibility for the local copy of strlcat,
40 * which has been removed. */
41#define strlcat(src, dst, size) strncat(src, dst, size)
42
903310c4 43#endif