This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd)


Earnie,

On Tue, Sep 19, 2000 at 12:18:00PM -0700, Earnie Boyd wrote:
> --- Jason Tishler <Jason.Tishler@dothill.com> 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.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]