util  Diff

Differences From Artifact [f722b7a517]:

To Artifact [bc7c445885]:


1
2
3
4
5
6
7
8
9
10
...
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
/* [ʞ] nkvd.c - XDG directory enforcer
 *  ~ lexi hale  <lexi@hale.su>
 *  © EUPL v1.2
 *  $ 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.
................................................................................
static const char* redir_prefix;
static const char* redir_to;
static size_t redir_len;
static const char* hq;
static size_t hq_len;

static void
configdirs() {
	const char* nkvd = getenv("nkvd_gulag");
	if (nkvd != NULL) redir_to = nkvd, redir_len = strlen(nkvd);

	const char* xdg = getenv("XDG_CONFIG_HOME");
	if (xdg != NULL) redir_to = xdg, redir_len = strlen(xdg);

	const char* home = getenv("HOME");
................................................................................
		if(strncmp(base,p,end-p) == 0) return (mode == blacklist);

		if (*end == 0) break;
			else p = end + 1;
	}

#	ifdef _NO_GNU
		free(name);
#	endif
	return (mode == whitelist);
#	ifdef _NO_GNU
		}
#	endif
}

#pragma GCC push_options
#pragma GCC optimize ("O0")

#define STAT_PARAMS  const char* volatile path, struct stat* volatile statbuf
#define XSTAT_PARAMS int volatile ver, const char* volatile path, struct stat* volatile statbuf


|







 







|







 







|


<
<
<







1
2
3
4
5
6
7
8
9
10
...
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
290
291
292
293
294
295
296
297
298
299



300
301
302
303
304
305
306
/* [ʞ] nkvd.c - XDG directory enforcer
 *  ~ lexi hale  <lexi@hale.su>
 *  🄯 GNU AGPL v3
 *  $ 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.
................................................................................
static const char* redir_prefix;
static const char* redir_to;
static size_t redir_len;
static const char* hq;
static size_t hq_len;

static void
configdirs(void) {
	const char* nkvd = getenv("nkvd_gulag");
	if (nkvd != NULL) redir_to = nkvd, redir_len = strlen(nkvd);

	const char* xdg = getenv("XDG_CONFIG_HOME");
	if (xdg != NULL) redir_to = xdg, redir_len = strlen(xdg);

	const char* home = getenv("HOME");
................................................................................
		if(strncmp(base,p,end-p) == 0) return (mode == blacklist);

		if (*end == 0) break;
			else p = end + 1;
	}

#	ifdef _NO_GNU
		free(name); }
#	endif
	return (mode == whitelist);



}

#pragma GCC push_options
#pragma GCC optimize ("O0")

#define STAT_PARAMS  const char* volatile path, struct stat* volatile statbuf
#define XSTAT_PARAMS int volatile ver, const char* volatile path, struct stat* volatile statbuf