From e95d94cd0b7585623c73fbe6ec9a632b91a94cb9 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Fri, 26 Jan 2018 22:35:29 +0000 Subject: [PATCH] git-revoke-linknamespace commit 22f24293a4311e395fa978b3bb3b1e30e9a01caf Author: Samuel Thibault Date: Thu Sep 28 00:01:40 2017 +0200 hurd: Fix `revoke' symbol exposition from `unlockpt' `revoke' is MISC only, it should not be exposed along `unlockpt' which is XOPEN. * include/unistd.h (__revoke): New declaration. * misc/revoke.c (revoke): Rename to __revoke, and redefine as weak alias. * sysdeps/mach/hurd/revoke.c (revoke): Likewise. * sysdeps/unix/bsd/unlockpt.c (unlockpt): Use __revoke instead of revoke. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-revoke-linknamespace.diff --- include/unistd.h | 1 + misc/revoke.c | 4 +++- sysdeps/mach/hurd/revoke.c | 4 +++- sysdeps/unix/bsd/unlockpt.c | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/unistd.h b/include/unistd.h index 96e6930f3..527699074 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -131,6 +131,7 @@ extern int __symlink (const char *__from, const char *__to); extern ssize_t __readlink (const char *__path, char *__buf, size_t __len); extern int __unlink (const char *__name); extern int __gethostname (char *__name, size_t __len); +extern int __revoke (const char *__file); extern int __profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale); extern int __getdtablesize (void); diff --git a/misc/revoke.c b/misc/revoke.c index d95321624..21df2bbf9 100644 --- a/misc/revoke.c +++ b/misc/revoke.c @@ -20,9 +20,11 @@ #include int -revoke (const char *file) +__revoke (const char *file) { __set_errno (ENOSYS); return -1; } + +weak_alias (__revoke, revoke) stub_warning (revoke) diff --git a/sysdeps/mach/hurd/revoke.c b/sysdeps/mach/hurd/revoke.c index 15b955b73..2f47f42de 100644 --- a/sysdeps/mach/hurd/revoke.c +++ b/sysdeps/mach/hurd/revoke.c @@ -21,7 +21,7 @@ #include int -revoke (const char *file_name) +__revoke (const char *file_name) { error_t err; file_t file = __file_name_lookup (file_name, 0, 0); @@ -36,3 +36,5 @@ revoke (const char *file_name) return __hurd_fail (err); return 0; } + +weak_alias (__revoke, revoke) diff --git a/sysdeps/unix/bsd/unlockpt.c b/sysdeps/unix/bsd/unlockpt.c index 7388c9852..ca4e7c654 100644 --- a/sysdeps/unix/bsd/unlockpt.c +++ b/sysdeps/unix/bsd/unlockpt.c @@ -32,5 +32,5 @@ unlockpt (int fd) /* BSD doesn't have a lock, but it does have `revoke'. */ if (__ptsname_r (fd, buf, sizeof (buf))) return -1; - return revoke (buf); + return __revoke (buf); } -- 2.30.2