Package: schroot
Version: 1.6.0-1

Both methods in question works fine outside schroot.

===

 nekoc    CALL  __sysctl(0xbfbfe8f4,0x4,0x804c060,0xbfbfe8f0,0,0)
 nekoc    SCTL  "kern.proc.pathname.-1"
-- schroot --
 nekoc    RET   __sysctl 0
-- outside --
 nekoc    RET   __sysctl -1 errno 2 No such file or directory

Attached code to reproduce it (from
http://patch-tracker.debian.org/patch/series/view/neko/1.8.1-6/kfreebsd-executable-path.diff).

===

 nekoc    CALL  readlink(0x804a334,0x804c060,0x400)
 nekoc    NAMI  "/proc/self/exe"
-- schroot --
 nekoc    RET   readlink -1 errno 2 No such file or directory
-- outside --
 nekoc    RET   readlink 14/0xe

-- schroot --
 # ls -l /proc/self/exe
 ls: cannot read symbolic link /proc/self/exe: No such file or directory
 lr--r--r-- 1 root root 0 Jul 14 14:39 /proc/self/exe

-- outside --
 # ls -l /proc/self/exe
 lr--r--r-- 1 root root 0 Jul 14 16:39 /proc/self/exe -> /bin/ls

===

This causes haxe FTBFS (haxe uses neko) that made haxe removed from
testing. http://bugs.debian.org/621890
#include <stdio.h>
#include <sys/sysctl.h>
 
main() {
	int mib[4];
	mib[0] = CTL_KERN;
	mib[1] = KERN_PROC;
	mib[2] = KERN_PROC_PATHNAME;
	mib[3] = -1;
	static char path[1024];
	size_t length = sizeof(path);
	sysctl(mib, 4, path, &length, NULL, 0);
	if( length < 0 || length >= 1024 ) {
		printf ("sysctl error\n");
		return 1;
	}
	path[length] = '\0';
	printf ("%s\n", path);
}

Reply via email to