summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ptools/pfiles/pfiles.c
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2021-03-24 16:09:02 +0000
committerMike Zeller <mike@mikezeller.net>2021-03-31 13:48:29 -0400
commit4b8e1742ff2e081b51a1c92087ab3f5c2dcc87c4 (patch)
tree8663ee24d1a4a13307fd3c5897543899b0d43c2b /usr/src/cmd/ptools/pfiles/pfiles.c
parent9d6ec448872defb7278c9f6cfeb23f249f0f91cc (diff)
downloadillumos-joyent-4b8e1742ff2e081b51a1c92087ab3f5c2dcc87c4.tar.gz
OS-8278 lx improve O_PATH|O_NOFOLLOW emulation for symlinks
Diffstat (limited to 'usr/src/cmd/ptools/pfiles/pfiles.c')
-rw-r--r--usr/src/cmd/ptools/pfiles/pfiles.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/cmd/ptools/pfiles/pfiles.c b/usr/src/cmd/ptools/pfiles/pfiles.c
index 474650faa4..8d6cacff2e 100644
--- a/usr/src/cmd/ptools/pfiles/pfiles.c
+++ b/usr/src/cmd/ptools/pfiles/pfiles.c
@@ -25,7 +25,7 @@
*/
/*
* Copyright (c) 2017 Joyent, Inc. All Rights reserved.
- * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
#include <stdio.h>
@@ -44,6 +44,7 @@
#include <sys/mkdev.h>
#include <sys/stropts.h>
#include <sys/timod.h>
+#include <sys/file.h>
#include <sys/un.h>
#include <libproc.h>
#include <netinet/in.h>
@@ -364,7 +365,8 @@ dofcntl(struct ps_prochandle *Pr, const prfdinfo_t *info, int mandatory,
#define ALL_O_FLAGS O_ACCMODE | O_NDELAY | O_NONBLOCK | O_APPEND | \
O_SYNC | O_DSYNC | O_RSYNC | O_XATTR | \
- O_CREAT | O_TRUNC | O_EXCL | O_NOCTTY | O_LARGEFILE
+ O_CREAT | O_TRUNC | O_EXCL | O_NOCTTY | O_LARGEFILE | \
+ __FLXPATH
static void
show_fileflags(int flags)
@@ -417,6 +419,8 @@ show_fileflags(int flags)
(void) strcat(str, "|O_LARGEFILE");
if (flags & O_XATTR)
(void) strcat(str, "|O_XATTR");
+ if (flags & __FLXPATH)
+ (void) strcat(str, "|__FLXPATH");
if (flags & ~(ALL_O_FLAGS))
(void) sprintf(str + strlen(str), "|0x%x",
flags & ~(ALL_O_FLAGS));