Overview
Comment: | fix make instructions |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
352d72f9c637de10b239462feacfb103 |
User & Date: | lexi on 2019-07-25 23:59:40 |
Other Links: | manifest | tags |
Context
2019-07-28
| ||
12:40 | add fabulist collaborative interaction fiction server (keeping it here until it gets its own repo) check-in: 9259bf507d user: lexi tags: trunk | |
2019-07-25
| ||
23:59 | fix make instructions check-in: 352d72f9c6 user: lexi tags: trunk | |
23:29 | remove debug code oops check-in: 6db4e12bdd user: lexi tags: trunk | |
Changes
Modified makefile from [6d462c849e] to [bb9a75f0d8].
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# procedural generators conv: ord # converters ctl: nkvd.so bgrd # manipulating disobedient software nkvd.so: nkvd.c $(CC) -fPIC -pie $< -o$@ -Wl,-E -ldl $(nkvd-flags) bgrd: bgrd.c $(cc) $< -lutil -o$@ $(cc-post) safekill: safekill.c $(cc) $< -lX11 -o$@ $(cc-post) xpriv: xpriv.c $(cc) $< -lrt -lutil -lX11 -o $@ $(cc-post) |
| |
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# procedural generators
conv: ord
# converters
ctl: nkvd.so bgrd
# manipulating disobedient software
nkvd.so: nkvd.c
$(CC) -fPIC -pie -shared $< -o$@ -Wl,-E -ldl $(nkvd-flags)
bgrd: bgrd.c
$(cc) $< -lutil -o$@ $(cc-post)
safekill: safekill.c
$(cc) $< -lX11 -o$@ $(cc-post)
xpriv: xpriv.c
$(cc) $< -lrt -lutil -lX11 -o $@ $(cc-post)
|
Modified nkvd.c from [6fd3f35c89] to [6971590b48].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
/* [ʞ] nkvd.c - XDG directory enforcer * ~ lexi hale <lexi@hale.su> * © AGPLv3 * $ cc -fPIC -pie nkvd.c -Wl,-E -onkvd -ldl * [-D_NO_GNU [-D_LIBC=…]] [-D_CONF_HOME=…] * $ export LD_PRELOAD=nkvd.so <dissident> * * ! NOTE: for unknown reasons, nkvd currently only works * when built without optimizations. it's probably that * wrecker Trotsky's fault. i'm working on it. * - partial solution on GCC: using #pragma to disable * optimization around the sensitive code. unclear if * this bug affects other compilers. * - bizarre complication: the bug can only be reproduced * if the -O flag itself is present; turning on the * same individual optimization flags that -O<x> is * supposed to represent does not trigger the problem. * - conclusion: compiler devils. * * ! WARNING: test this program thoroughly before you start * exporting it from your shellrcs; if things get fucked, * you may not be able to execute any binaries with the * variable set, and will need to log in as root or boot * off a rescue disk to fix the problem. LD_PRELOAD is * not a toy. you have been warned. ................................................................................ # define SYMSRC RTLD_NEXT # else # define SYMSRC hnd # endif #endif #include <string.h> #include <dlfcn.h> #include <stdio.h> #ifndef _LIBC # define _LIBC "libc.so.6" #endif #ifndef _CONF_HOME # define _CONF_HOME ".config" #endif #define pstr(x) x,sizeof x #define hl(txt) "\x1b[1;31m" txt "\x1b[m" #define bold(txt) "\x1b[1m" txt "\x1b[21m" #define e_fatal hl("(nkvd fatal)") " " #define fail(code, err) { write(2,pstr(e_fatal " " err)); _exit(code); } #define dbg(x) write(2,pstr(bold("(nkvd)") " " x)) |
|
|
<
<
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
/* [ʞ] nkvd.c - XDG directory enforcer * ~ lexi hale <lexi@hale.su> * © AGPLv3 * $ cc -fPIC -pie -shared nkvd.c -Wl,-E -onkvd -ldl * [-D_NO_GNU [-D_LIBC=…]] [-D_CONF_HOME=…] * $ export LD_PRELOAD=nkvd.so <dissident> * * ! NOTE: for unknown reasons, nkvd currently only works * when built without optimizations. it's probably that * wrecker Trotsky's fault. i'm working on it. * - partial solution on GCC: using #pragma to disable * optimization around the sensitive code. unclear if * this bug affects other compilers. * - bizarre complication: the bug can only be reproduced * if the -O flag itself is present; turning on the * same individual optimization flags that -O<x> is * supposed to represent does not trigger the problem. * - conclusion: compiler devils * * ! WARNING: test this program thoroughly before you start * exporting it from your shellrcs; if things get fucked, * you may not be able to execute any binaries with the * variable set, and will need to log in as root or boot * off a rescue disk to fix the problem. LD_PRELOAD is * not a toy. you have been warned. ................................................................................ # define SYMSRC RTLD_NEXT # else # define SYMSRC hnd # endif #endif #include <string.h> #include <dlfcn.h> #ifndef _LIBC # define _LIBC "libc.so.6" #endif #ifndef _CONF_HOME # define _CONF_HOME ".config" #endif #define pstr(x) x,sizeof x #define hl(txt) "\x1b[1;31m" txt "\x1b[m" #define bold(txt) "\x1b[1m" txt "\x1b[21m" #define e_fatal hl("(nkvd fatal)") " " #define fail(code, err) { write(2,pstr(e_fatal " " err)); _exit(code); } #define dbg(x) write(2,pstr(bold("(nkvd)") " " x)) |