nixos/programs.mosh: refactor
Adds programs.mosh.withUtempter (default: true). The option enables -with-utempter for mosh, allowing it to write to /var/run/utmp and thus making connected sessions appear in the output of `who -a`. For that, a guid-wrapper is required. Also, the path to the `utempter` was hardcoded in the resulting binary until now (so it could never been found), thus, libutempter was patched accordingly to point to /run/wrappers/bin/utempter which at least works when the wrapper is configured.
This commit is contained in:
25
pkgs/development/libraries/libutempter/exec_path.patch
Normal file
25
pkgs/development/libraries/libutempter/exec_path.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
diff -ur libutempter-1.1.6/iface.c libutempter-1.1.6.patched/iface.c
|
||||
--- libutempter-1.1.6/iface.c 2010-11-04 18:14:53.000000000 +0100
|
||||
+++ libutempter-1.1.6.patched/iface.c 2018-06-06 15:09:11.417755549 +0200
|
||||
@@ -60,9 +60,9 @@
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
- execv(path, argv);
|
||||
+ execvp(path, argv);
|
||||
#ifdef UTEMPTER_DEBUG
|
||||
- fprintf(stderr, "libutempter: execv: %s\n", strerror(errno));
|
||||
+ fprintf(stderr, "libutempter: execvp: %s\n", strerror(errno));
|
||||
#endif
|
||||
|
||||
while (EACCES == errno)
|
||||
@@ -79,7 +79,7 @@
|
||||
if (setgid(sgid))
|
||||
break;
|
||||
|
||||
- (void) execv(path, argv);
|
||||
+ (void) execvp(path, argv);
|
||||
break;
|
||||
}
|
||||
|
||||
Only in libutempter-1.1.6.patched: result
|
||||
Reference in New Issue
Block a user