From: Jeff Layton Subject: Re: [PATCH] cifs: Add mount option named backup Date: Tue, 30 Aug 2011 06:25:07 -0400 Message-ID: <20110830062507.2cb5ddc7@corrin.poochiereds.net> References: <1313166821-9172-1-git-send-email-shirishpargonkar@gmail.com> <20110823091510.2d8b8027@corrin.poochiereds.net> <20110829202910.0038ca06@corrin.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Shirish Pargaonkar , linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Steve French Return-path: In-Reply-To: Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Mon, 29 Aug 2011 20:11:13 -0500 Steve French wrote: > On Mon, Aug 29, 2011 at 7:29 PM, Jeff Layton wrot= e: > > On Mon, 29 Aug 2011 16:24:33 -0500 > > Shirish Pargaonkar wrote: > > > >> On Tue, Aug 23, 2011 at 8:15 AM, Jeff Layton w= rote: > >> > On Mon, 22 Aug 2011 08:33:49 -0500 > >> > Shirish Pargaonkar wrote: > >> > > >> >> On Fri, Aug 12, 2011 at 11:33 AM, =C2=A0 wrote: > >> >> > From: Shirish Pargaonkar > >> >> > > >> >> > > >> >> > Add mount option backup. > >> >> > > >> >> > It allows an authenticated user to access files with the inte= nt to back them > >> >> > up including their ACLs, who may not have access permission b= ut has > >> >> > "Backup files and directories user right" on them (by virtue = of being part > >> >> > of the built-in group Backup Operators. > >> >> > > >> >> > If an authenticated user is not part of the built-in group Ba= ckup Operators > >> >> > at the server, access to such files is denied. > >> >> > > >> >> > > >> >> > Signed-off-by: Shirish Pargaonkar > >> >> > --- > >> >> > >> >> > >> >> Jeff, =C2=A0Steve, > >> >> > >> >> Any comments on this patch (and manpage patch in cifs-utils)? > >> >> > >> > > >> > This seems like a really nasty kludge. It doesn't seem like the > >> > implications of this have been carefully considered. > >> > > >> > What happens I mount with the "backup" flag and do not have the > >> > necessary permissions on the server to use the flag in an open? = Will > >> > this new flag be mutually exclusive with "multiuser"? > >> > > >> > One idea that might be better is to come up with way to mark cer= tain > >> > (unix) users with the appropriate flag. If all the backup users = were in > >> > a certan group, for instance, then you could use that info to de= cide > >> > whether to set the flag in the open calls. > >> > > >> > -- > >> > Jeff Layton > >> > > >> > >> Jeff, one comment, it is not the (unix) user that matters, it is t= he > >> user on the server (authenticated) user at the server because the > >> user right to access a file in backup mode can be granted only > >> to a user at the server. > >> > > > > Right, I realize that. > > > >> I think care should be taken to make sure that backup and > >> multiuser are mutually exclusive mount options in mount.cifs. > >> > > > > My objection here is more fundamental... > > > > This patchset lends itself to a single, specific use. You can creat= e a > > mount that you want to use for backups. Typically, when running bac= kups > > like this you also intend for this mount to be used by only one (un= ix) > > user. > > > > Adding a "backup" option is tantamount to adding extra privileges t= o > > this mount for anyone who accesses it. However, it's not clear to m= e > > how these extra privileges will be secured from other users that do= n't > > necessarily need them. > > > > It seems to me that it would be far more useful to find a way to on= ly > > add these extra "backup" permissions for certain unix users that ar= e > > accessing the mount. > > > > Does that make sense? >=20 > I don't object to defaulting backup mounts to mode 0700 if that is wh= at > you are suggesting ...? >=20 That's not at all what I'm suggesting. What if unix extensions are in force? Relying on local permissions enforcement to prevent access to the mount is always very problematic. --=20 Jeff Layton