Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix the order of handling of posix_spawn attributes...
details: https://anonhg.NetBSD.org/src/rev/936b4f8392a3
branches: trunk
changeset: 379596:936b4f8392a3
user: martin <martin%NetBSD.org@localhost>
date: Fri Jun 11 12:54:22 2021 +0000
description:
Fix the order of handling of posix_spawn attributes and file actions.
The standard is explicit about it and it matters if e.g. RESETIDS is
used as an attribute and file actions depend on the group rights for
opening a file.
diffstat:
sys/kern/kern_exec.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 64c18881e5d1 -r 936b4f8392a3 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Fri Jun 11 12:23:00 2021 +0000
+++ b/sys/kern/kern_exec.c Fri Jun 11 12:54:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.505 2021/05/02 10:23:55 martin Exp $ */
+/* $NetBSD: kern_exec.c,v 1.506 2021/06/11 12:54:22 martin Exp $ */
/*-
* Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.505 2021/05/02 10:23:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.506 2021/06/11 12:54:22 martin Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -2260,13 +2260,13 @@ spawn_return(void *arg)
rw_enter(&p->p_reflock, RW_WRITER);
have_reflock = true;
- /* handle posix_spawn_file_actions */
- error = handle_posix_spawn_file_actions(spawn_data->sed_actions);
+ /* handle posix_spawnattr */
+ error = handle_posix_spawn_attrs(attrs, spawn_data->sed_parent);
if (error)
goto report_error;
- /* handle posix_spawnattr */
- error = handle_posix_spawn_attrs(attrs, spawn_data->sed_parent);
+ /* handle posix_spawn_file_actions */
+ error = handle_posix_spawn_file_actions(spawn_data->sed_actions);
if (error)
goto report_error;
Home |
Main Index |
Thread Index |
Old Index