Tags: patch When AuFin is called with errno = 0, error_at_line(3) does not exit. The attached patch sets errno to EINVAL following the pattern in most other similar error checks in aufs-tools.
With this change "auplink / flush" outputs the following error message and exists without segfaulting: auplink:plink.c:342: no aufs mount point: Invalid argument This bug causes docker core files to appear in docker container's root directory. Henrik
diff -uNr aufs-tools-3.2+20130722.orig/plink.c aufs-tools-3.2+20130722/plink.c --- aufs-tools-3.2+20130722.orig/plink.c 2013-08-11 16:48:48.000000000 +0300 +++ aufs-tools-3.2+20130722/plink.c 2015-08-13 18:18:39.836110526 +0300 @@ -337,8 +337,10 @@ if (flags & AuPlinkFlag_OPEN) { p = hasmntopt(&ent, "si"); - if (!p) + if (!p) { + errno = EINVAL; AuFin("no aufs mount point"); + } strncpy(si, p, sizeof(si)); p = strchr(si, ','); if (p)