Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only provide execvpe(3) when needed #15609

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/user.m4
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [
ZFS_AC_CONFIG_USER_MAKEDEV_IN_MKDEV
ZFS_AC_CONFIG_USER_ZFSEXEC

AC_CHECK_FUNCS([issetugid mlockall strlcat strlcpy])
AC_CHECK_FUNCS([execvpe issetugid mlockall strlcat strlcpy])

AC_SUBST(RM)
])
2 changes: 2 additions & 0 deletions lib/libspl/include/os/freebsd/sys/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
extern size_t spl_pagesize(void);
#define PAGESIZE (spl_pagesize())

#ifndef HAVE_EXECVPE
extern int execvpe(const char *name, char * const argv[], char * const envp[]);
#endif

#endif
4 changes: 3 additions & 1 deletion lib/libzfs/os/freebsd/libzfs_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
#define ZFS_KMOD "openzfs"
#endif


#ifndef HAVE_EXECVPE
/* FreeBSD prior to 15 lacks execvpe */
static int
execvPe(const char *name, const char *path, char * const *argv,
char * const *envp)
Expand Down Expand Up @@ -192,6 +193,7 @@ execvpe(const char *name, char * const argv[], char * const envp[])

return (execvPe(name, path, argv, envp));
}
#endif /* !HAVE_EXECVPE */

static __thread char errbuf[ERRBUFLEN];

Expand Down