/*==========================================================================*\ * vHost - one-step solution for all virtual hosting needs * * vhost.cc - setuid c wrapper * * * * Copyright(c) Chaogic Systems, LLC. http://chaogic.com * * Author: Jake Fan * * * * This is Free Software; permission to use, copy, modify, and distribute * * this software and its documentation for any purpose - with or without fee * * - is hereby granted, provided that the above copyright information and * * this permission notice appear in all copies and documentations. This * * software is provided "as is" without express or implied warranty. For * * more details, see GNU General Public License as published by the Free * * Software Foundation. * * * \*==========================================================================*/ #include #include #include #include main(int ac, char **av) { char str[256]; sprintf(str, "UID=%d", getuid()); putenv(str); execv("/usr/sbin/vhost.pl", av); }