Moved setting of VTEXT flag into the appropriate image activators. This

fixes a bug where linux binaries would get the flag set inappropriately.
This commit is contained in:
David Greenman 1995-08-24 10:32:37 +00:00
parent 21ff364166
commit c0e5de7d88
4 changed files with 12 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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 @@ execve(p, uap, retval)
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
*/