From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23172 invoked by alias); 1 Dec 2011 00:04:22 -0000 Received: (qmail 23152 invoked by uid 9478); 1 Dec 2011 00:04:21 -0000 Date: Thu, 01 Dec 2011 00:04:00 -0000 Message-ID: <20111201000421.23150.qmail@sourceware.org> From: jbrassow@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/tools lvchange.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00000.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-12-01 00:04:21 Modified files: tools : lvchange.c Log message: Do not allow users to change permissions on RAID sub-LVs. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.136&r2=1.137 --- LVM2/tools/lvchange.c 2011/11/18 19:22:49 1.136 +++ LVM2/tools/lvchange.c 2011/12/01 00:04:21 1.137 @@ -43,6 +43,14 @@ return 0; } + /* Not allowed to change permissions on RAID sub-LVs directly */ + if ((lv->status & RAID_META) || (lv->status & RAID_IMAGE)) { + log_error("Cannot change permissions of RAID %s \"%s\"", + (lv->status & RAID_IMAGE) ? "image" : + "metadata area", lv->name); + return 0; + } + if (lv_access & LVM_WRITE) { lv->status |= LVM_WRITE; log_verbose("Setting logical volume \"%s\" read/write",