Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 19 Sep 2000 15:55:27 -0400 From: Jason Tishler To: Earnie Boyd Cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd) Message-ID: <20000919155527.C18108@DP> References: <20000919191801 DOT 29826 DOT qmail AT web121 DOT yahoomail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20000919191801.29826.qmail@web121.yahoomail.com>; from earnie_boyd@yahoo.com on Tue, Sep 19, 2000 at 12:18:00PM -0700 Organization: Dot Hill Systems Corp. Earnie, On Tue, Sep 19, 2000 at 12:18:00PM -0700, Earnie Boyd wrote: > --- Jason Tishler wrote: > -8<- > > static void > > read_mount_table () > > { > > @@ -83,7 +137,7 @@ read_mount_table () > > windir[2] = 0; > > root_dir = concat (windir, "\\cygwin", 0); > > root_text = IDC_ROOT_BINARY; > > - root_scope = IDC_ROOT_USER; > > + root_scope = (is_admin()) ? IDC_ROOT_SYSTEM : IDC_ROOT_USER; > > } > > } > > > > Of course you did test this patch, correct? Yes. I would not have submit it if I didn't. > What happens if I with > administrator privileges have my mounts in IDC_ROOT_USER and not > IDC_ROOT_SYSTEM? Shouldn't it default to what is already setup in the mount > tables? It does. You were mislead into an erroneous conclusion due to the limited context provided by the patch. Try the following: static void read_mount_table () { int istext; int issystem; root_dir = find_root_mount (&istext, &issystem); if (root_dir) { if (istext) root_text = IDC_ROOT_TEXT; else root_text = IDC_ROOT_BINARY; if (issystem) root_scope = IDC_ROOT_SYSTEM; else root_scope = IDC_ROOT_USER; } else { char windir[_MAX_PATH]; GetWindowsDirectory (windir, sizeof (windir)); windir[2] = 0; root_dir = concat (windir, "\\cygwin", 0); root_text = IDC_ROOT_BINARY; root_scope = (is_admin()) ? IDC_ROOT_SYSTEM : IDC_ROOT_USER; } } Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corporation Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason DOT Tishler AT dothill DOT com Hazlet, NJ 07730 USA WWW: http://www.dothill.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com