git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ldb speed test - needs free block dev
[tridge/junkcode.git]
/
rnotes.c
1
#define _GNU_SOURCE
2
#include <stdio.h>
3
#include <fcntl.h>
4
#include <pwd.h>
5
#include <sys/types.h>
6
#include <dlfcn.h>
7
#include <stdio.h>
8
#include <string.h>
9
#include <stdlib.h>
10
#include <stdarg.h>
11
#include <errno.h>
12
13
int main(void)
14
{
15
const char *lroot = getenv("LROOT");
16
uid_t uid = getuid();
17
if (setuid(0) != 0) return -1;
18
if (chroot(lroot) != 0) return -1;
19
if (chdir("/") != 0) return -1;
20
if (setuid(uid) != 0) return -1;
21
22
return system("/usr/bin/richclient");
23
}