From owner-freebsd-bugs Fri Dec 7 12:10:39 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0343437B426 for ; Fri, 7 Dec 2001 12:10:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fB7KA0B73337; Fri, 7 Dec 2001 12:10:00 -0800 (PST) (envelope-from gnats) Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182]) by hub.freebsd.org (Postfix) with ESMTP id 1B86E37B405 for ; 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 X-Send-Pr-Version: 3.113 Subject: bin/32588: operator should backup vinum vols Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 #include #include + #include 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/ */ 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