Skip to content
API Documentation
BastionGuard™
unknown-setuid-test.c
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2/*
3 * Harmless VM-only RootGuard probe. It never starts a shell or executes a
4 * command. When installed root:root mode 4755 it only prints real/effective
5 * UID and exits. RootGuard should audit or block its privilege transition.
6 */
7#include <stdio.h>
8#include <unistd.h>
9
10int main(void)
11{
12 printf("RootGuard VM probe: uid=%ld euid=%ld\n",
13 (long)getuid(), (long)geteuid());
14 return 0;
15}
int main(int argc, char *argv[])