tools/toCOPY/mock_overlay/mount_wrappers/mock_tmpfs_mount.c
Saul Wold 73c1d66677 Rename cgcs_overlay to mock_overlay
This helps to debrand (remove cgcs) from the tools area

Story: 2006387
Task: 36208
Change-Id: I357837a710207f8cec6409d1de99f443f8c50c84
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-10-08 12:32:50 -07:00

19 lines
335 B
C

#include <unistd.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *const argv[])
{
int rc;
rc = setuid(0);
if ( rc != 0 )
{
printf("setuid returned %d\n", rc);
exit(1);
}
return execv("/usr/bin/mock_tmpfs_mount.sh", argv);
}