summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-08-24 10:32:37 +0000
committerdg <dg@FreeBSD.org>1995-08-24 10:32:37 +0000
commit0af2eee79d716c53af10a0fe3d3d7d63ed157799 (patch)
tree25f0d078906126e97e0cdc172dfa96fb9c1f9527
parentc5cbc782d337dffb51162e0e9255b7c5eb742bee (diff)
downloadFreeBSD-src-0af2eee79d716c53af10a0fe3d3d7d63ed157799.zip
FreeBSD-src-0af2eee79d716c53af10a0fe3d3d7d63ed157799.tar.gz
Moved setting of VTEXT flag into the appropriate image activators. This
fixes a bug where linux binaries would get the flag set inappropriately.
-rw-r--r--sys/i386/ibcs2/imgact_coff.c4
-rw-r--r--sys/i386/linux/imgact_linux.c4
-rw-r--r--sys/kern/imgact_aout.c6
-rw-r--r--sys/kern/kern_exec.c5
4 files changed, 12 insertions, 7 deletions
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index f7e7670..14accfb 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_coff.c,v 1.3 1995/04/08 15:52:30 joerg Exp $
+ * $Id: imgact_coff.c,v 1.4 1995/05/30 08:00:17 rgrimes Exp $
*/
#include <sys/param.h>
@@ -472,6 +472,8 @@ printf("IBCS2: start vm_dsize = 0x%x, vm_daddr = 0x%x end = 0x%x\n",
ctob(vmspace->vm_dsize) + vmspace->vm_daddr );
printf("%s(%d): returning successfully!\n", __FILE__, __LINE__);
}
+ /* Indicate that this file should not be modified */
+ iparams->vnodep->v_flag |= VTEXT;
return 0;
}
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c
index d9650d3..276e8ce 100644
--- a/sys/i386/linux/imgact_linux.c
+++ b/sys/i386/linux/imgact_linux.c
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_linux.c,v 1.2 1995/06/07 21:27:57 sos Exp $
+ * $Id: imgact_linux.c,v 1.1 1995/06/25 17:32:32 sos Exp $
*/
#include <sys/param.h>
@@ -210,6 +210,8 @@ exec_linux_imgact(iparams)
if (error)
return (error);
}
+ /* Indicate that this file should not be modified */
+ iparams->vnodep->v_flag |= VTEXT;
}
/* Fill in process VM information */
vmspace->vm_tsize = round_page(a_out->a_text) >> PAGE_SHIFT;
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index ed8fce1..719e114 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: imgact_aout.c,v 1.13.2.1 1995/06/04 16:58:44 davidg Exp $
+ * $Id: imgact_aout.c,v 1.14 1995/06/11 19:31:33 rgrimes Exp $
*/
#include <sys/param.h>
@@ -193,6 +193,10 @@ exec_aout_imgact(iparams)
iparams->entry_addr = a_out->a_entry;
iparams->proc->p_sysent = &aout_sysvec;
+
+ /* Indicate that this file should not be modified */
+ iparams->vnodep->v_flag |= VTEXT;
+
return (0);
}
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 59a411b..ea2b811 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.20 1995/03/25 01:34:21 davidg Exp $
+ * $Id: kern_exec.c,v 1.21 1995/05/30 08:05:24 rgrimes Exp $
*/
#include <sys/param.h>
@@ -271,9 +271,6 @@ interpret:
p->p_cred->p_svuid = p->p_ucred->cr_uid;
p->p_cred->p_svgid = p->p_ucred->cr_gid;
- /* mark vnode pure text */
- ndp->ni_vp->v_flag |= VTEXT;
-
/*
* Store the vp for use in procfs
*/
OpenPOWER on IntegriCloud