git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
sharedscreen hack
[tridge/junkcode.git]
/
preload.c
1
#include <pwd.h>
2
#include <sys/types.h>
3
#include <dlfcn.h>
4
5
struct passwd *getpwuid(uid_t uid)
6
{
7
static void *h;
8
static struct passwd * (*getpwuid_orig)(uid_t uid);
9
if (!h) {
10
h = dlopen("/lib/libc.so.6", RTLD_LAZY);
11
getpwuid_orig = dlsym(h, "getpwuid");
12
}
13
14
return getpwuid_orig(uid+1);
15
}