Skip to content

Instantly share code, notes, and snippets.

View ewxrjk's full-sized avatar

Richard Kettlewell ewxrjk

View GitHub Profile
@ewxrjk
ewxrjk / gist:07163a67894b0e65a4f6
Created May 26, 2015 18:24
Mysterious error output
From: root@...
To: root@...
Subject: Cron <root@...> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Date: Tue, 26 May 2015 02:28:06 +0100
/etc/cron.daily/logrotate:
2015/05/26 02:26:51| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
2015/05/26 02:26:51| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
2015/05/26 02:26:51| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
2015/05/26 02:26:51| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
@ewxrjk
ewxrjk / debmirror output
Created May 10, 2015 11:01
debmirror can't find diffs
Mirroring to /space/mirrors/debian from http://ftp.uk.debian.org/debian/
Arches: amd64,i386
Dists: jessie,jessie-updates,jessie-backports,stretch,stretch-updates,sid
Sections: main,contrib,non-free,main/debian-installer
Including source.
Pdiff mode: use
Will clean up after mirroring.
Attempting to get lock ...
Updating remote trace files (using rsync) ...
@ewxrjk
ewxrjk / gist:6c532651533403dd31c3
Last active August 29, 2015 14:20
Debian sid unprivileged container setup
Install required packages:
# apt-get install uidmap lxc
# ..and cgmanager? or not? Who can say?
Enable unshare:
# echo 'kernel.unprivileged_userns_clone = 1' >> /etc/sysctl.d/local.conf
# sysctl --system
Check /etc/subuid and /etc/subgid and add ranges if missing, e.g.:
# usermod -v 886432-951967 richard
@ewxrjk
ewxrjk / gist:c3f80a16d61c35678301
Last active August 29, 2015 14:20
clang -fsanitize=address breaks initial stream orientation
richard@deodand:~/junk$ cat t.c
#include <stdio.h>
#include <wchar.h>
int main(void) {
FILE *fp = fopen("/dev/null", "r");
return printf("initial orientation: %d\n", fwide(fp, 0));
}
richard@deodand:~/junk$ clang-3.6 -fsanitize=address -o t t.c
richard@deodand:~/junk$ ./t
@ewxrjk
ewxrjk / gist:cbaf528e526cf9d6017d
Last active August 29, 2015 14:19
Bizarre /dev/tty behavior on GNU HUrd
araminta:~$ ssh heceptor -t ls -l /dev/tty
crw--w---- 1 richard tty 0, 0 Jul 14 2012 /dev/tty
Connection to heceptor closed.
araminta:~$ ssh heceptor 'echo /dev/tt?'
/dev/tty
araminta:~$ ssh heceptor ls -l /dev/tty
ls: cannot access /dev/tty: No such device or address
araminta:~$ ssh heceptor uname -a
GNU heceptor 0.3 GNU-Mach 1.3.99-486/Hurd-0.3 i686-AT386 GNU