Oh dear. And I now realise that this is submitted under a non-existent release version of libutempter — that's the patched version of it I created in order to test out the core idea in the fix, sorry. On the offchance that it's any use, I attach the patch below.
Conrad
Description: Use ttyname, not ptsname. Bugfix; see changelog. . libutempter (1.1.6-4) unstable; urgency=medium . * Use ttyname, not ptsname. Author: Conrad J.C. Hughes (for Debian package stuff) <debb...@xrad.org> --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: <vendor|upstream|other>, <url of original patch> Bug: <url in upstream bugtracker> Bug-Debian: https://bugs.debian.org/<bugnumber> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> Forwarded: <no|not-needed|url proving that it has been forwarded> Reviewed-By: <name and email of someone who approved the patch> Last-Update: 2017-07-24 --- libutempter-1.1.6.orig/utempter.c +++ libutempter-1.1.6/utempter.c @@ -241,7 +241,7 @@ main(int argc, const char *argv[]) exit(EXIT_FAILURE); } - device = ptsname(STDIN_FILENO); + device = ttyname(STDIN_FILENO); if (!device) {