Date: Mon, 21 Nov 2005 18:05:43 +0100 (CET) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-fs@FreeBSD.ORG Subject: Re: mount -u -r drops nosuid ? Message-ID: <200511211705.jALH5hO4022907@lurza.secnetix.de> In-Reply-To: <4381BFE2.80106@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Andriy Gapon <avg@icyb.net.ua> wrote: > Not sure if this is a bug or a feature, It's a feature, and it's documented this way. > but it seems like potential > security risk: I have a ufs fs mounted rw+nosuid, then I needed to > downgrade it to ro, so I executed mount -u -r on it - imagine my surpise > when I found that nosuid flag was removed as well. Because you didn't specify it. When updating the options on a filesystem, only the options that you specify are used. Otherwise there would be no way to remove options like nosuid. If you want to change only one option and keep all other existing options, do this: # mount -u -o current,ro /mountpoint The special option "current" represents all options that are currently in effect on the file system. Following options (in this case "ro") override those. See the mount(8) manual page for detailed information. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. It's trivial to make fun of Microsoft products, but it takes a real man to make them work, and a God to make them do anything useful.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511211705.jALH5hO4022907>
