From citylink.dinoex.sub.de!admin%disp@citylink.dinoex.sub.org  Fri Dec  7 12:03:35 2001
Return-Path: <citylink.dinoex.sub.de!admin%disp@citylink.dinoex.sub.org>
Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182])
	by hub.freebsd.org (Postfix) with ESMTP id 1B86E37B405
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Dec 2001 12:03:33 -0800 (PST)
Received: from citylink.dinoex.sub.org (uucp@localhost)
	by net2.dinoex.sub.org (8.11.6/8.11.6) with UUCP id fB7K2up05726; Fri, 7 Dec 2001 21:02:56 +0100 (CET)
	(envelope-from citylink.dinoex.sub.de!admin%disp@citylink.dinoex.sub.org)
Received: from gate.oper.dinoex.org  by citylink.dinoex.sub.org (8.8.5/PMuch-B3b) with ESMTP
	id XAA00249; Thu, 6 Dec 2001 23:44:56 +0100 (CET)
Received: (from admin@localhost)
	by disp.oper.dinoex.org (8.11.6/8.11.6) id fB3L9xs00789;
	Mon, 3 Dec 2001 22:10:00 +0100 (CET)
	(envelope-from admin)
Message-Id: <200112032110.fB3L9xs00789@disp.oper.dinoex.org>
Date: Mon, 3 Dec 2001 22:10:00 +0100 (CET)
From: peter@citylink.dinoex.sub.org
Reply-To: peter@citylink.dinoex.sub.org
To: FreeBSD-gnats-submit@freebsd.org
Cc: grog@lemis.com
Subject: operator should backup vinum vols
X-Send-Pr-Version: 3.113

>Number:         32588
>Category:       bin
>Synopsis:       operator should backup vinum vols
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joerg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 07 12:10:00 PST 2001
>Closed-Date:    Fri Jan 17 00:50:30 MET 2003
>Last-Modified:  Fri Jan 17 00:50:30 MET 2003
>Originator:     Peter Much
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
n/a
>Environment:
System: FreeBSD disp.oper.dinoex.org 4.4-RELEASE FreeBSD 4.4-RELEASE #6: Mon Dec 3 20:58:04 CET 2001 root@disp.oper.dinoex.org:/u1/src/sys/compile/D1R44V1 i386

>Description:

	Vinum drives are mknod g+r with the current primary
	group, this is in most cases "wheel".
	Like on all other volumes, this should be "operator", so
	dumps can be done as usual by the system operator, 
	without giving this account additional permissions.
	Changing the group manually on the volume node or the
	directory will not help, as these are remade by vinum
	under various circumstances.

>How-To-Repeat:

	n/a

>Fix:

The following seems to help so far. The more elegant solution
might be to just make /dev/vinum group=operator and let it
propagate down - this should also be save as the control
devices get mode=600

*** sbin/vinum/v.c.orig	Tue Mar 13 04:04:06 2001
--- sbin/vinum/v.c	Mon Dec  3 21:21:18 2001
***************
*** 62,67 ****
--- 62,68 ----
  #include <sys/linker.h>
  #include <sys/module.h>
  #include <sys/resource.h>
+ #include <grp.h>
  
  FILE *cf;						    /* config file handle */
  FILE *history;						    /* history file */
***************
*** 590,595 ****
--- 591,597 ----
      dev_t voldev;
      char filename[PATH_MAX];				    /* for forming file names */
      int plexno;
+     struct group *operator_group;
  
      get_volume_info(&vol, volno);
      if (vol.state != volume_unallocated) {		    /* we could have holes in our lists */
***************
*** 599,604 ****
--- 601,610 ----
  	sprintf(filename, VINUM_DIR "/%s", vol.name);
  	if (mknod(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, voldev) < 0)
  	    fprintf(stderr, "Can't create %s: %s\n", filename, strerror(errno));
+ 	else {
+ 	    if((operator_group = getgrnam("operator")) != NULL)
+ 		chown(filename, -1, operator_group->gr_gid);
+ 	}
  
  	/* Create /dev/vinum/vol/<myvol> */
  	sprintf(filename, VINUM_DIR "/vol/%s", vol.name);

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Fri Dec 7 16:45:30 PST 2001 
Responsible-Changed-Why:  
Switch to maintainer, Mr. Vinum. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32588 
Responsible-Changed-From-To: grog->joerg 
Responsible-Changed-By: joerg 
Responsible-Changed-When: Mon Aug 26 23:18:31 MEST 2002 
Responsible-Changed-Why:  
I promised to Greg to look into this... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32588 
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Fri Jan 17 00:49:56 MET 2003 
State-Changed-Why:  
This is a duplicate for bin/28294 (which is going to be resolved 
as well though). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32588 
>Unformatted:
