From gfoster@gfoster.intr.net  Thu Oct  2 06:12:37 1997
Received: from gfoster.intr.net (gfoster.intr.net [207.32.93.21])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA24623
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 2 Oct 1997 06:12:34 -0700 (PDT)
Received: (from gfoster@localhost)
	by gfoster.intr.net (8.8.7/8.8.6) id JAA01609;
	Thu, 2 Oct 1997 09:12:33 -0400 (EDT)
Message-Id: <199710021312.JAA01609@gfoster.intr.net>
Date: Thu, 2 Oct 1997 09:12:33 -0400 (EDT)
From: Glen Foster <gfoster@gfoster.com>
Reply-To: gfoster@gfoster.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: xtend(8) doesn't handle the "dump" command correctly
X-Send-Pr-Version: 3.2

>Number:         4679
>Category:       misc
>Synopsis:       xtend(8) doesn't handle the "dump" command correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct  2 06:20:00 PDT 1997
>Closed-Date:    Sat Apr 18 06:43:45 PDT 1998
>Last-Modified:  Sat Apr 18 06:46:03 PDT 1998
>Originator:     Glen Foster
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
self
>Environment:

	affects only sites running the tw0 optional device driver and 
	xtend(8)/xten(1) software.

>Description:

	The xtend man page describes a command "dump" to the xtend
	daemon.  As shipped, xtend tries to write the dump file to
	an inappropriate location, one where it has no write permission
	and is not logically tied to the program.

>How-To-Repeat:

	Compile a kernel with the tw0 device, set xtend_enable="YES" in 
	/etc/rc.conf.  Run "xten -" and issue the command "dump" to the
	xtend daemon.  Rather than writing a status.out file in 
	/var/spool/xten/, the command will generate an error.

>Fix:
	
	Apply the patch:

*** /usr/src/libexec/xtend/user.c.orig	Thu Oct  2 08:54:35 1997
--- /usr/src/libexec/xtend/user.c	Thu Oct  2 08:55:05 1997
***************
*** 73,78 ****
--- 73,79 ----
        }
      } else if(!strcmp("dump\n", cmd)) {
        strcpy(dumppath, X10DIR);
+       strcat(dumppath, "/");
        strcat(dumppath, X10DUMPNAME);
        if((dumpf = fopen(dumppath, "w")) != NULL) {
  	for(h = 0; h < 16; h++) {

>Release-Note:
>Audit-Trail:

Suggested patch committed to -CURRENT and RELENG_2_2.

State-Changed-From-To: open->closed 
State-Changed-By: stark 
State-Changed-When: Sat Apr 18 06:43:45 PDT 1998 
State-Changed-Why:  
Suggested patch committed to -CURRENT and RELENG_2_2. 
>Unformatted:
