1 // bbcode.c is generated from bbcode.1.c
4 // This is the wrapper for bbcode.pl.
5 // It's run with SETUID to have accesss to some files where the www server
6 // should not. That's why it has a C wrapper. In modern systems running scripts
7 // directly with SETUID is considered unsafe and not allowed.
9 // Copyright (C) 2017 Balthasar SzczepaĆski
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU Affero General Public License as
13 // published by the Free Software Foundation, either version 3 of the
14 // License, or (at your option) any later version.
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Affero General Public License for more details.
21 // You should have received a copy of the GNU Affero General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
30 int main(int argc, char *argv[], char *envp[])
32 freopen(BBCODE_PL_ERRLOG,"at",stderr);
33 return execve(BBCODE_PL,argv,envp);