From 113dcb2d3a7759e78c6c40ec2d1800e5319f22bc Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 28 Oct 2015 11:59:08 +0000 Subject: [PATCH] Paranoa: p_pledgenote the NAMEI for ld.so loading --- sys/kern/exec_elf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 4c0c5ee2079..dfb3cad1c57 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.117 2015/09/28 20:32:59 deraadt Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.118 2015/10/28 11:59:08 deraadt Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -83,6 +83,7 @@ #include #include #include +#include #include @@ -327,6 +328,7 @@ ELFNAME(load_file)(struct proc *p, char *path, struct exec_package *epp, int loop; size_t randomizequota = ELF_RANDOMIZE_LIMIT; + p->p_pledgenote = PLEDGE_RPATH; NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, path, p); if ((error = namei(&nd)) != 0) { return (error); -- 2.20.1