]> bicyclesonthemoon.info Git - ott/bsta/blob - attach.1.c
Initial state as of 31.08.2023
[ott/bsta] / attach.1.c
1 // attach.c is generated from attach.1.c
2 // 19.10.2016
3 // 
4 // This is the wrapper for frame.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.
8 //
9 //    Copyright (C) 2016  Balthasar SzczepaƄski
10 //
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.
15 //
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.
20 //
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/>.
23
24 #include <unistd.h>
25 #include <stdio.h>
26
27 ###ATTACH_PL;
28 ###ATTACH_PL_ERRLOG;
29
30 int main(int argc, char *argv[], char *envp[])
31 {
32         freopen(ATTACH_PL_ERRLOG,"at",stderr);
33         return execve(ATTACH_PL,argv,envp);
34 }