Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2001 22:10:00 +0100 (CET)
From:      peter@citylink.dinoex.sub.org
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        grog@lemis.com
Subject:   bin/32588: operator should backup vinum vols
Message-ID:  <200112032110.fB3L9xs00789@disp.oper.dinoex.org>

next in thread | raw e-mail | index | archive | help

>Number:         32588
>Category:       bin
>Synopsis:       operator should backup vinum vols
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 07 12:10:00 PST 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112032110.fB3L9xs00789>