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/42de8610a188
branches:  trunk
changeset: 983839:42de8610a188
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 bd414feee9de -r 42de8610a188 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 @@
        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