Author iwings
Recipients iwings
Date 2016-09-05.13:25:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473081937.73.0.0253643547204.issue27955@psf.upfronthosting.co.za>
In-reply-to
Content
On QNAP's Linux Station (lxc based virtual environment), getrandom() syscall returns EPERM not ENOSYS when it's not available.

(HOST) uname -a
Linux ******-NAS 3.12.6 #1 SMP Thu Sep 1 00:57:44 CST 2016 x86_64 unknown

(HOST) /lib64/libc-2.19.so
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.6) stable release version 2.19, by Roland McGrath et al.

(LXC) uname -a
Linux ubuntu_1604 3.12.6 #1 SMP Thu Sep 1 00:57:44 CST 2016 x86_64 x86_64 x86_64 GNU/Linux

(LXC) /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.23-0ubuntu3) stable release version 2.23, by Roland McGrath et al.

(LXC)
long n = syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
printf("SYS_getrandom: %ld (%d)\n", n, errno);
=> 
SYS_getrandom: -1 (1)

Proper fall back to /dev/urandom is not happening in this case, so most python app calling getrandom function fails. This includes apt, command-not-found etc.
History
Date User Action Args
2016-09-05 13:25:37iwingssetrecipients: + iwings
2016-09-05 13:25:37iwingssetmessageid: <1473081937.73.0.0253643547204.issue27955@psf.upfronthosting.co.za>
2016-09-05 13:25:37iwingslinkissue27955 messages
2016-09-05 13:25:36iwingscreate