mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-08 21:29:37 +00:00
Simplify socket symlink-attack checking
This is a minor bugfix cleanup (Bug#33847#161). * lib-src/emacsclient.c: Move "#include <acl.h>" to inside "#ifdef SOCKETS_IN_FILE_SYSTEM", which is more accurate and simpler than having a separate "#ifndef WINDOWSNT". (O_PATH): Likewise.
This commit is contained in:
parent
fc32a3bd95
commit
732c70a0d9
1 changed files with 6 additions and 7 deletions
|
@ -80,9 +80,6 @@ char *w32_getenv (const char *);
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifndef WINDOWSNT
|
|
||||||
# include <acl.h>
|
|
||||||
#endif
|
|
||||||
#include <filename.h>
|
#include <filename.h>
|
||||||
#include <intprops.h>
|
#include <intprops.h>
|
||||||
#include <min-max.h>
|
#include <min-max.h>
|
||||||
|
@ -94,10 +91,6 @@ char *w32_getenv (const char *);
|
||||||
# pragma GCC diagnostic ignored "-Wformat-truncation=2"
|
# pragma GCC diagnostic ignored "-Wformat-truncation=2"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined O_PATH && !defined WINDOWSNT
|
|
||||||
# define O_PATH O_SEARCH
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Name used to invoke this program. */
|
/* Name used to invoke this program. */
|
||||||
static char const *progname;
|
static char const *progname;
|
||||||
|
@ -1135,6 +1128,12 @@ process_grouping (void)
|
||||||
|
|
||||||
#ifdef SOCKETS_IN_FILE_SYSTEM
|
#ifdef SOCKETS_IN_FILE_SYSTEM
|
||||||
|
|
||||||
|
# include <acl.h>
|
||||||
|
|
||||||
|
# ifndef O_PATH
|
||||||
|
# define O_PATH O_SEARCH
|
||||||
|
# endif
|
||||||
|
|
||||||
/* A local socket address. The union avoids the need to cast. */
|
/* A local socket address. The union avoids the need to cast. */
|
||||||
union local_sockaddr
|
union local_sockaddr
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue