Bug#734607: libc6-i686: granpt() fails with EPERM
Package: libc6-i686
Version: 2.18-0experimental0
Severity: important
grantpt() always fail with errno=EPERM:
$ ./test_grantpt
grantpt: Operation not permitted
Curiously enough, the non-686-optimized versions works correctly:
$ LD_HWCAP_MASK=0 ./test_grantpt
okay!
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64
Kernel: Linux 3.12-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libc6-i686 depends on:
ii libc6 2.18-0experimental0
--
Jakub Wilk
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
int main(int arg, char **argv)
{
int fd = getpt();
if (fd == -1) {
perror("getpt");
return 1;
}
int rc = grantpt(fd);
if (rc != 0) {
perror("grantpt");
return 1;
}
fprintf(stderr, "okay!\n");
exit(0);
}
Reply to: