aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-10-23 14:47:28 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-11-06 02:12:31 +0000
commit3b4baefca9256b976963add91e8e8082c3e281fd (patch)
treeb4a50d8c336808e26523e19b1a69eb76cd400d71
parent0b06c284ae631fcca562e9ff13350b71362df6e5 (diff)
downloadsrc-3b4baefca9256b976963add91e8e8082c3e281fd.tar.gz
src-3b4baefca9256b976963add91e8e8082c3e281fd.zip
do_execve(): switch boolean locals to use bool type
(cherry picked from commit 9d58243fbc4a1931aba618f8f5f6872779656c42)
-rw-r--r--sys/kern/kern_exec.c8
1 files 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