Skip to content

Instantly share code, notes, and snippets.

View Blub's full-sized avatar

Wolfgang Bumiller Blub

View GitHub Profile
@Blub
Blub / gist:bb55648798dc86bc056b
Created July 22, 2015 13:27
libseccomp and 32 bit binaries on 64 bit hosts = bad
# cat umount.c
#include <stdio.h>
#include <sys/mount.h>
int main(int argc, char **argv) {
if (argc != 2) {
fprintf(stderr, "Dumb\n");
return 1;
}
@Blub
Blub / lxc-err1.txt
Created February 9, 2016 14:29
Curious lxc race condition
1) Log into container and do:
$ while : ; do uptime; done
2) On host do:
$ while : ; do lxc-freeze -n $CT ; lxc-unfreeze -n $CT; done
(or to see stuff happening:)
$ i = 0; while : ; do let i++; echo freeze $i && lxc-freeze -n 104; echo unfreeze && lxc-unfreeze -n 104; done
--
@Blub
Blub / lxc_seccomp.c
Created July 8, 2019 17:58
lxc seccomp notify proxy example
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>