git: 9d58243fbc4a - main - do_execve(): switch boolean locals to use bool type
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 Oct 2021 17:50:37 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=9d58243fbc4a1931aba618f8f5f6872779656c42
commit 9d58243fbc4a1931aba618f8f5f6872779656c42
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-10-23 14:47:28 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-10-28 17:49:16 +0000
do_execve(): switch boolean locals to use bool type
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32611
---
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 eb785c9f71d5..e86d19e9eed1 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -421,10 +421,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;
@@ -558,14 +558,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