Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libutempter / exec_path.patch
blobda3fe110fb670d4fbfd7c7d8aac1bdd476cd92f4
1 diff --git a/libutempter/iface.c b/libutempter/iface.c
2 index 37c74a8..6f44c9a 100644
3 --- a/libutempter/iface.c
4 +++ b/libutempter/iface.c
5 @@ -43,7 +43,7 @@
6 __result; }))
7 #endif
9 -#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
10 +#define UTEMPTER_DEFAULT_PATHNAME "utempter"
12 static const char *utempter_pathname;
13 static int saved_fd = -1;
14 @@ -57,8 +57,8 @@ do_child(int master_fd, const char *path, char *const *argv)
15 _exit(EXIT_FAILURE);
18 - execv(path, argv);
19 - print_dbg("execv: %s", strerror(errno));
20 + execvp(path, argv);
21 + print_dbg("execvp: %s", strerror(errno));
23 while (EACCES == errno) {
24 /* try saved group ID */
25 @@ -73,7 +73,7 @@ do_child(int master_fd, const char *path, char *const *argv)
26 if (setgid(sgid))
27 break;
29 - (void) execv(path, argv);
30 + (void) execvp(path, argv);
31 break;