1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Update from Gnulib by running admin/merge-gnulib

* admin/merge-gnulib (GNULIB_MODULES): Add stringeq.
With current Gnulib it is already present as in indirect dependency;
listing it here because Emacs now depends on it directly.
* lib-src/ebrowse.c, lib-src/etags.c:
(streq): Remove, as Gnulib defines this now.
* lib/fseterr.c, lib/fseterr.h, lib/issymlink.c, lib/issymlink.h:
* lib/issymlinkat.c, lib/stdio-consolesafe.c, lib/string.c:
* m4/fseterr.m4, m4/gettext_h.m4, m4/stringeq.m4:
New files from Gnulib.
* src/conf_post.h (tzfree) [__ANDROID_API__ >= 35]: Remove.
This commit is contained in:
Paul Eggert 2025-11-04 09:14:54 -08:00
parent 327c16ce14
commit 59fbaca6b9
115 changed files with 1733 additions and 1097 deletions

View file

@ -31,7 +31,7 @@
# include <string.h>
#endif
#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
@ -45,7 +45,7 @@ acl_extended_nontrivial (acl_t acl)
return (acl_entries (acl) > 0);
}
# else /* Linux, FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
# else /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
Return 1 if the given ACL is non-trivial.
@ -118,9 +118,9 @@ acl_access_nontrivial (acl_t acl)
- S-1-5-32-545 (group "Users")
Cf. <https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids>
and look at the output of the 'mkgroup' command. */
ignorable = (strcmp (group_sid, "S-1-5-18") == 0
|| strcmp (group_sid, "S-1-5-32-544") == 0
|| strcmp (group_sid, "S-1-5-32-545") == 0);
ignorable = (streq (group_sid, "S-1-5-18")
|| streq (group_sid, "S-1-5-32-544")
|| streq (group_sid, "S-1-5-32-545"));
}
}
if (!ignorable)
@ -137,46 +137,6 @@ acl_access_nontrivial (acl_t acl)
}
return got_one;
# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */
/* Don't use acl_get_entry: it is undocumented. */
int count = acl->acl_cnt;
int i;
for (i = 0; i < count; i++)
{
acl_entry_t ace = &acl->acl_entry[i];
acl_tag_t tag = ace->ae_tag;
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ
|| tag == ACL_OTHER_OBJ))
return 1;
}
return 0;
# elif HAVE_ACL_FREE_TEXT /* Tru64 */
/* Don't use acl_get_entry: it takes only one argument and does not work. */
int count = acl->acl_num;
acl_entry_t ace;
for (ace = acl->acl_first; count > 0; ace = ace->next, count--)
{
acl_tag_t tag;
acl_perm_t perm;
tag = ace->entry->acl_type;
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
return 1;
perm = ace->entry->acl_perm;
/* On Tru64, perm can also contain non-standard bits such as
PERM_INSERT, PERM_DELETE, PERM_MODIFY, PERM_LOOKUP, ... */
if ((perm & ~(ACL_READ | ACL_WRITE | ACL_EXECUTE)) != 0)
return 1;
}
return 0;
# else
errno = ENOSYS;
@ -548,7 +508,7 @@ void
free_permission_context (struct permission_context *ctx)
{
#if USE_ACL
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
if (ctx->acl)
acl_free (ctx->acl);
# if !HAVE_ACL_TYPE_EXTENDED