[openssh-commits] [openssh] 01/04: stubs for OpenBSD unveil(2)
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Mar 10 14:46:09 AEDT 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 73888af650f0ce27cd93797f3e351b2d1b670550
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Tue Mar 10 14:43:30 2026 +1100
stubs for OpenBSD unveil(2)
---
configure.ac | 1 +
openbsd-compat/bsd-misc.c | 8 ++++++++
openbsd-compat/bsd-misc.h | 4 ++++
3 files changed, 13 insertions(+)
diff --git a/configure.ac b/configure.ac
index d98650bf3..831dd85b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2214,6 +2214,7 @@ AC_CHECK_FUNCS([ \
truncate \
unlinkat \
unsetenv \
+ unveil \
updwtmpx \
utimensat \
user_from_uid \
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index fe0c2a300..d5cc3755c 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -410,6 +410,14 @@ pledge(const char *promises, const char *execpromises)
}
#endif
+#ifndef HAVE_UNVEIL
+int
+unveil(const char *path, const char *permissions)
+{
+ return 0;
+}
+#endif
+
#ifndef HAVE_MBTOWC
/* a mbtowc that only supports ASCII */
int
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 8495f471c..53e569dc2 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -159,6 +159,10 @@ int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *,
int pledge(const char *promises, const char *execpromises);
#endif
+#ifndef HAVE_UNVEIL
+int unveil(const char *, const char *);
+#endif
+
/* bsd-err.h */
#ifndef HAVE_ERR
void err(int, const char *, ...) __attribute__((format(printf, 2, 3)));
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list