run clang-format

This commit is contained in:
Jörg Thalheim
2024-12-11 15:13:24 +01:00
committed by Mic92
parent d40856c719
commit 91dbafd174
2 changed files with 20 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
#define _GNU_SOURCE
#include <dlfcn.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <pwd.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <stdio.h>
typedef struct passwd *(*getpwnam_type)(const char *name);

View File

@@ -6,27 +6,27 @@
typedef uint32_t uid_t;
#ifdef __APPLE__
struct dyld_interpose {
const void * replacement;
const void * replacee;
};
#define WRAPPER(ret, name) static ret _fakeroot_wrapper_##name
#define WRAPPER_DEF(name) \
__attribute__((used)) static struct dyld_interpose _fakeroot_interpose_##name \
__attribute__((section("__DATA,__interpose"))) = { &_fakeroot_wrapper_##name, &name };
struct dyld_interpose {
const void *replacement;
const void *replacee;
};
#define WRAPPER(ret, name) static ret _fakeroot_wrapper_##name
#define WRAPPER_DEF(name) \
__attribute__(( \
used)) static struct dyld_interpose _fakeroot_interpose_##name \
__attribute__((section("__DATA,__interpose"))) = { \
&_fakeroot_wrapper_##name, &name};
#else
#define WRAPPER(ret, name) ret name
#define WRAPPER_DEF(name)
#define WRAPPER(ret, name) ret name
#define WRAPPER_DEF(name)
#endif
WRAPPER(uid_t, geteuid)(const char * path, int flags, ...)
{
WRAPPER(uid_t, geteuid)(const char *path, int flags, ...) {
return 0; // Fake root
}
WRAPPER_DEF(geteuid)
WRAPPER(uid_t, getuid)(const char * path, int flags, ...)
{
WRAPPER(uid_t, getuid)(const char *path, int flags, ...) {
return 0; // Fake root
}
WRAPPER_DEF(getuid)