git: 3b4baefca925 - stable/13 - do_execve(): switch boolean locals to use bool type
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 Nov 2021 02:25:16 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=3b4baefca9256b976963add91e8e8082c3e281fd
commit 3b4baefca9256b976963add91e8e8082c3e281fd
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-10-23 14:47:28 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-11-06 02:12:31 +0000
do_execve(): switch boolean locals to use bool type
(cherry picked from commit 9d58243fbc4a1931aba618f8f5f6872779656c42)
---
sys/kern/kern_exec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 15af8f402b05..1fd11e34a048 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -391,10 +391,10 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p,
struct ktr_io_params *kiop;
#endif
struct vnode *oldtextvp = NULL, *newtextvp;
- int credential_changing;
+ bool credential_changing;
#ifdef MAC
struct label *interpvplabel = NULL;
- int will_transition;
+ bool will_transition;
#endif
#ifdef HWPMC_HOOKS
struct pmckern_procexec pe;
@@ -525,14 +525,14 @@ interpret:
* XXXMAC: For the time being, use NOSUID to also prohibit
* transitions on the file system.
*/
- credential_changing = 0;
+ credential_changing = false;
credential_changing |= (attr.va_mode & S_ISUID) &&
oldcred->cr_uid != attr.va_uid;
credential_changing |= (attr.va_mode & S_ISGID) &&
oldcred->cr_gid != attr.va_gid;
#ifdef MAC
will_transition = mac_vnode_execve_will_transition(oldcred, imgp->vp,
- interpvplabel, imgp);
+ interpvplabel, imgp) != 0;
credential_changing |= will_transition;
#endif