From 369eab84e7a350e83587dadaa1579c24fcda4c46 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 25 Jul 2016 14:27:14 -0400 Subject: [PATCH] Fix a typo We were trying to check if O_NOFOLLOW was set here. (flags & BIT_A) == BIT_B never make sense. --- document-portal/xdp-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document-portal/xdp-main.c b/document-portal/xdp-main.c index a474b962..990c6f85 100644 --- a/document-portal/xdp-main.c +++ b/document-portal/xdp-main.c @@ -348,7 +348,7 @@ validate_fd_common (int fd, /* Must be O_PATH */ ((fd_flags & O_PATH) != O_PATH) || /* Must not be O_NOFOLLOW (because we want the target file) */ - ((fd_flags & O_NOFOLLOW) == O_PATH) || + ((fd_flags & O_NOFOLLOW) == O_NOFOLLOW) || /* Must be able to fstat */ fstat (fd, st_buf) < 0 || /* Must be a regular file */