Skip to content

Commit 1157f01

Browse files
committed
sudo_edit_openat_nofollow: Fix typo, O_DIRECTORY not DIRECTORY
Only affects systems without O_NOFOLLOW.
1 parent ce13289 commit 1157f01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/edit_open.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ sudo_edit_openat_nofollow(int dfd, char *path, int oflags, mode_t mode)
289289
debug_decl(sudo_edit_openat_nofollow, SUDO_DEBUG_EDIT);
290290

291291
/* Save cwd and chdir to dfd (cannot use O_PATH on older Linux kernels). */
292-
if ((odfd = open(".", O_RDONLY|DIRECTORY)) == -1)
292+
if ((odfd = open(".", O_RDONLY|O_DIRECTORY)) == -1)
293293
debug_return_int(-1);
294294
if (fchdir(dfd) == -1) {
295295
close(odfd);

0 commit comments

Comments
 (0)