public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mount points and inetd
@ 2000-09-16 23:56 Chris Abbey
  2000-09-16 23:59 ` Robert Collins
  0 siblings, 1 reply; 15+ messages in thread
From: Chris Abbey @ 2000-09-16 23:56 UTC (permalink / raw)
  To: cygwin

ok, I read the thread from a week or so ago, but that's not
quite what I'm seeing....

I'm working on a clean install here of the latest, dated 7 Sept.
2000 (cygwin 1.1.4). before this install there has been NO cygnus
product on this machine (NT was recently scratch installed, again)
If I start bash up via the cygwin icon, the mount table looks like
this:

c:\cygwin\bin	/usr/bin	user	textmode
c:\cygwin\lib	/usr/lib	user	textmode
c:\cygwin	/		user	textmode
d:\		/data		user	textmode

At this point everything is good. So now I setup inetd.conf and test
it out, still good, so I install it as a service. At this point I can
restart my machine, login and start bash, see the mount table, start
inetd, still see the mount table, everything is happy. So I set it up
as an autostarted service. Opps, next reboot I see the two copies of
inetd.exe running, but nothing works, so I open a bash shell and
something just seems wrong... check the mount table and it's empty.

As long as there is a cygwin binary loaded (iow the cygwin1.dll is
pinned in memory) then the mount table is empty (I can add to it, but
it doesn't have the defaults it should have), but once I exit everything
then the next cygwin binary to load (i.e. start a new bash shell)
will cause it to be initialized correctly.

I don't *think* this is a user id issue, because if I set inetd to
be a manually started service, then put a bat file in my startup folder
which does net start inetd I see the same thing. My current work around
is to use a shell script instead of a bat file as sh.exe seems to properly
initialize the table, then inetd.exe pins it in memory.

thoughts?


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-16 23:56 mount points and inetd Chris Abbey
@ 2000-09-16 23:59 ` Robert Collins
  2000-09-17  1:06   ` Chris Abbey
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Collins @ 2000-09-16 23:59 UTC (permalink / raw)
  To: cygwin, Chris Abbey

Two thoughts:

are your mounts system or user mounts?

two: inetd may be trying to start before the networking services have
started: ie before tcp is available.
you may want to try setting inetd's service to be dependent on another
networking service - see support.microsoft.com and do a search for a how-to
on this.

Rob

----- Original Message -----
From: "Chris Abbey" <cabbey@bresnanlink.net>
To: <cygwin@sourceware.cygnus.com>
Sent: Sunday, September 17, 2000 5:52 PM
Subject: mount points and inetd


> ok, I read the thread from a week or so ago, but that's not
> quite what I'm seeing....
>
> I'm working on a clean install here of the latest, dated 7 Sept.
> 2000 (cygwin 1.1.4). before this install there has been NO cygnus
> product on this machine (NT was recently scratch installed, again)
> If I start bash up via the cygwin icon, the mount table looks like
> this:
>
> c:\cygwin\bin /usr/bin user textmode
> c:\cygwin\lib /usr/lib user textmode
> c:\cygwin / user textmode
> d:\ /data user textmode
>
> At this point everything is good. So now I setup inetd.conf and test
> it out, still good, so I install it as a service. At this point I can
> restart my machine, login and start bash, see the mount table, start
> inetd, still see the mount table, everything is happy. So I set it up
> as an autostarted service. Opps, next reboot I see the two copies of
> inetd.exe running, but nothing works, so I open a bash shell and
> something just seems wrong... check the mount table and it's empty.
>
> As long as there is a cygwin binary loaded (iow the cygwin1.dll is
> pinned in memory) then the mount table is empty (I can add to it, but
> it doesn't have the defaults it should have), but once I exit everything
> then the next cygwin binary to load (i.e. start a new bash shell)
> will cause it to be initialized correctly.
>
> I don't *think* this is a user id issue, because if I set inetd to
> be a manually started service, then put a bat file in my startup folder
> which does net start inetd I see the same thing. My current work around
> is to use a shell script instead of a bat file as sh.exe seems to properly
> initialize the table, then inetd.exe pins it in memory.
>
> thoughts?
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-16 23:59 ` Robert Collins
@ 2000-09-17  1:06   ` Chris Abbey
  2000-09-17  1:13     ` Robert Collins
  0 siblings, 1 reply; 15+ messages in thread
From: Chris Abbey @ 2000-09-17  1:06 UTC (permalink / raw)
  To: cygwin

At 18:00 9/17/00 +1100, Robert Collins wrote:
>Two thoughts:
>
>are your mounts system or user mounts?

all user as I showed, but I think the three created by default
*should* be system; at least / should be.... I've just moved them
over to system mounts and am rebooting now...

ok, that fixes the three important ones, but that exposes me to
the userid behavior... I guess I'll just make *all* my mounts
system mounts (in which case I'll question the usefulness of
having user mode mounts at all.)

>two: inetd may be trying to start before the networking services have
>started: ie before tcp is available.

hmmm... good idea, although I should have pointed out that the
failure was clearly mount point related as the logs showed that
it couldn't find /etc/inetd.conf

actually... shouldn't inetd --install-as-service do this
automatically? I've created the reg key myself for this,
just to prevent future wierdness though. ;) If anyone wants
directions on how to do this let me know.


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-17  1:06   ` Chris Abbey
@ 2000-09-17  1:13     ` Robert Collins
  2000-09-17  1:41       ` Chris Abbey
  2000-09-18 13:10       ` DJ Delorie
  0 siblings, 2 replies; 15+ messages in thread
From: Robert Collins @ 2000-09-17  1:13 UTC (permalink / raw)
  To: cygwin, Chris Abbey

----- Original Message -----
From: "Chris Abbey" <cabbey@bresnanlink.net>
To: <cygwin@sourceware.cygnus.com>
Sent: Sunday, September 17, 2000 7:03 PM
Subject: Re: mount points and inetd


> At 18:00 9/17/00 +1100, Robert Collins wrote:
> >Two thoughts:
> >
> >are your mounts system or user mounts?
>
> all user as I showed, but I think the three created by default
> *should* be system; at least / should be.... I've just moved them
> over to system mounts and am rebooting now...
>
> ok, that fixes the three important ones, but that exposes me to
> the userid behavior... I guess I'll just make *all* my mounts
> system mounts (in which case I'll question the usefulness of
> having user mode mounts at all.)

Inetd *needs a mount table* - just as with Unix systems.

In fact cygwin is more flexible that some Unices. I suggest that your core
(/, /usr/bin, /usr/lib, /etc) mounts be system and then the rest can be user
or system at your choice.

DJ - perhaps setup should default to 'install for all' ? (If it doesn't
already)

> >two: inetd may be trying to start before the networking services have
> >started: ie before tcp is available.
>
> hmmm... good idea, although I should have pointed out that the
> failure was clearly mount point related as the logs showed that
> it couldn't find /etc/inetd.conf
>
> actually... shouldn't inetd --install-as-service do this
> automatically? I've created the reg key myself for this,
> just to prevent future wierdness though. ;) If anyone wants
> directions on how to do this let me know.
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-17  1:13     ` Robert Collins
@ 2000-09-17  1:41       ` Chris Abbey
  2000-09-18 13:11         ` DJ Delorie
  2000-09-18 13:10       ` DJ Delorie
  1 sibling, 1 reply; 15+ messages in thread
From: Chris Abbey @ 2000-09-17  1:41 UTC (permalink / raw)
  To: cygwin

At 19:14 9/17/00 +1100, Robert Collins wrote:
>Inetd *needs a mount table* - just as with Unix systems.

umm... yeah, duh. :) the issue is "why the frick is it not
using the one I have set up." and I think we've answered
that.

>In fact cygwin is more flexible that some Unices. I suggest that your core

very true. I personally love being able to mount /foo, then /foo/bar,
then umount /foo and still be able to access /foo/bar. That and being
able to move and remount / is one of the best parts of piggy backing
ontop of the native win32 file system.

>(/, /usr/bin, /usr/lib, /etc) mounts be system and then the rest can be user
>or system at your choice.

except that if I'm running inetd automatically they have to be
system, or the specific user that inetd runs under. (who is that?
system?). Otherwise my user mounts would never be seen. Similarly
if I had two users "bob" and "joan" and they both had different
things mounted in their user profile, then it would be a question
of who loaded the mount table first; this would cause havoc if
you tried to use a box as a compute server.

>DJ - perhaps setup should default to 'install for all' ? (If it doesn't
>already)

or perhaps "install for all" and "install for me" need better explanations.
I take it from your statement that had I chosen install for all that there
would have been some difference... like the core mounts being system.
I assume then that the "all" means all users on the local machine, as
opposed to a network server install (which is what I took it to mean.)
which still leaves open the question of how several differnet users
could have their own user mode mounts and not get in each others way...
unless that "install for all" mode results in something hackish, like a
separate copy of cygwin1.dll in memory for each user (or at least each
has their own mount table). This brings me back to the question what
good are user mode mounts? What are they used for?


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-17  1:13     ` Robert Collins
  2000-09-17  1:41       ` Chris Abbey
@ 2000-09-18 13:10       ` DJ Delorie
  2000-09-18 21:11         ` Chris Abbey
                           ` (2 more replies)
  1 sibling, 3 replies; 15+ messages in thread
From: DJ Delorie @ 2000-09-18 13:10 UTC (permalink / raw)
  To: robert.collins; +Cc: cygwin, cabbey

> DJ - perhaps setup should default to 'install for all' ? (If it doesn't
> already)

Setup should default to "install for all" *if* you have administrative
privileges, or to "me only" if you don't.  Patches welcome; I don't
know how to easily test for such privs.

I've also heard rumors that system mounts can't even be *used* by an
account that doesn't have admin privs (does cygwin read the mounts
with a read/write key, or a read-only key?).

Otherwise, if a consensus can be reached about what the best
(i.e. safest) overall defaults are, it's easy to change.  Note that
setup won't change your system if it's doing an upgrade; it defaults
to whatever you had before.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-17  1:41       ` Chris Abbey
@ 2000-09-18 13:11         ` DJ Delorie
  0 siblings, 0 replies; 15+ messages in thread
From: DJ Delorie @ 2000-09-18 13:11 UTC (permalink / raw)
  To: cabbey; +Cc: cygwin

> or perhaps "install for all" and "install for me" need better explanations.

It used to say "System" and "User" but I got complaints about those
also.  If anyone wants to volunteer to add a "Help..." button, I'll
gladly work with them to get those patches in.

> This brings me back to the question what good are user mode mounts?
> What are they used for?

User mounts do not require admin privs to set them.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-18 13:10       ` DJ Delorie
@ 2000-09-18 21:11         ` Chris Abbey
  2000-09-19  0:37           ` Andrej Borsenkow
  2000-09-19  6:42         ` Jason Tishler
  2000-09-19 14:18         ` mount points and inetd Corinna Vinschen
  2 siblings, 1 reply; 15+ messages in thread
From: Chris Abbey @ 2000-09-18 21:11 UTC (permalink / raw)
  To: cygwin

At 16:11 9/18/00 -0400, DJ Delorie wrote:
>It used to say "System" and "User" but I got complaints about those
>also.  If anyone wants to volunteer to add a "Help..." button, I'll
>gladly work with them to get those patches in.

hmm... what's setup's gui written in? I can certainly write up a
suggested bit of text after having been clearly wrong in my
understanding of the two ;) but I'll hold off on offering the
patches without knowing what it's coded in. :}

At 16:09 9/18/00 -0400, DJ Delorie wrote:
>I've also heard rumors that system mounts can't even be *used* by an
>account that doesn't have admin privs (does cygwin read the mounts
>with a read/write key, or a read-only key?).

not sure about 9x, but for NT4 users of class *GUEST* can use
system mounts just fine. (you've got to enable a policy to even
allow this class of user to login first if you wanna test that.)
so *any* user that can login can use them.

>Otherwise, if a consensus can be reached about what the best
>(i.e. safest) overall defaults are, it's easy to change.  Note that
>setup won't change your system if it's doing an upgrade; it defaults
>to whatever you had before.

My suggestion would be to assign /, /usr/bin, and /usr/lib as
system; as without them stuff stops working as soon as you load
the cygwin dll under an unusual user. (i.e. inetd)

(actually I'm in favor of symlinks for the /usr stuff so
that it doesn't show up as folders in windows explorer and
non-cygwin tools (like winzip) won't try to write stuff
out there; either that or touch empty files in their place
instead of creating directories.)

 From a *user* perspective the next thing I'd suggest is that
the issue with user mounts and their quirky persistence be
documented. While I grok the statement that their point is
to allow non-root, er non-admin, to mount stuff, they don't
exactly behave like user mounts in *nix. Case in point: user
A logs in, user mode mounts /home/A/foo, logsout, user B logs
in, user mode mounts /home/B/yada, user A telnets in, /home/A/foo
isn't mounted anymore. A runs screaming to the machine room,
shoves B of the console, logs in and... wtf? /home/A/foo is
there again.

Second case: user X logs in, mounts /yada, root (er, Administraitor)
tries to telnet in, telnet fails with connection refused,
Administraitor does a 'net start \\computer\inetd' from across the
lan, opps mount table just got scrogged and X's read from
/yada/master.rdb now resembles reading /dev/null.

been there, done that, not in a hurry to have the coronary again,
thanks. ;)

I don't even want to think about the ramifications in WTS?
anyone got one of those beasts they can play with? What happens
when you have more than one user login via the "console"?
Telnetting in through inetd doesn't seem to affect the mount
table, but what about comming in through a non-cygwin method
like WTS or RAS?

A part of that documentation would be a good explanation of
what user inetd runs under and where that user's mount table
is stored.

(note: someone is most likely going to come back and say this
is documented, I just needed to RTFM... well I've looked and
not found it, so if that's the case then the above can all be
replaced with a suggestion to document where the FM is...
perhaps in a big red blinking link on the setup screen.)


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: mount points and inetd
  2000-09-18 21:11         ` Chris Abbey
@ 2000-09-19  0:37           ` Andrej Borsenkow
  0 siblings, 0 replies; 15+ messages in thread
From: Andrej Borsenkow @ 2000-09-19  0:37 UTC (permalink / raw)
  To: cygwin

>
> At 16:09 9/18/00 -0400, DJ Delorie wrote:
> >I've also heard rumors that system mounts can't even be *used* by an
> >account that doesn't have admin privs (does cygwin read the mounts
> >with a read/write key, or a read-only key?).
>
> not sure about 9x, but for NT4 users of class *GUEST* can use
> system mounts just fine. (you've got to enable a policy to even
> allow this class of user to login first if you wanna test that.)
> so *any* user that can login can use them.
>

It was me, who passed this rumor around :-)

Please, NT4 != WinNT.

Look at permissions for HKLM\Software on NT4. They inlclude (by default) at
least "Set value" and "Create subkey" for everybody. That means, that anybody
can create Cygiwn mount points here, including Guest.

Under Win2k HKLM\Software is read-only by default (except for Administrators
and System. Power users have special access). Cygwin *does* read mounts with
requested Read/Write permissions. That fails under Win2k unless user is
administrator (default install assumed).

Win9x  has no security anyway, so it cannot possibly fail here.

> >Otherwise, if a consensus can be reached about what the best
> >(i.e. safest) overall defaults are, it's easy to change.  Note that
> >setup won't change your system if it's doing an upgrade; it defaults
> >to whatever you had before.
>
> My suggestion would be to assign /, /usr/bin, and /usr/lib as
> system; as without them stuff stops working as soon as you load
> the cygwin dll under an unusual user. (i.e. inetd)
>

That would fail under Win2k. I just tested it.

-andrej


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-18 13:10       ` DJ Delorie
  2000-09-18 21:11         ` Chris Abbey
@ 2000-09-19  6:42         ` Jason Tishler
  2000-09-19  7:17           ` DJ Delorie
  2000-09-19 14:18         ` mount points and inetd Corinna Vinschen
  2 siblings, 1 reply; 15+ messages in thread
From: Jason Tishler @ 2000-09-19  6:42 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

DJ,

On Mon, Sep 18, 2000 at 04:09:00PM -0400, DJ Delorie wrote:
> 
> > DJ - perhaps setup should default to 'install for all' ? (If it doesn't
> > already)
> 
> Setup should default to "install for all" *if* you have administrative
> privileges, or to "me only" if you don't.  Patches welcome; I don't
> know how to easily test for such privs.

I can provide you with a "patch" (i.e., code snippets) that tests whether
or not the current user is a member of the Administrators group.  Is this
the kind of test for which you are looking?

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-19  6:42         ` Jason Tishler
@ 2000-09-19  7:17           ` DJ Delorie
  2000-09-19 11:50             ` [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd) Jason Tishler
  0 siblings, 1 reply; 15+ messages in thread
From: DJ Delorie @ 2000-09-19  7:17 UTC (permalink / raw)
  To: Jason.Tishler; +Cc: cygwin

> I can provide you with a "patch" (i.e., code snippets) that tests whether
> or not the current user is a member of the Administrators group.  Is this
> the kind of test for which you are looking?

Yes, but a patch against setup's cvs sources would be best.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd)
  2000-09-19  7:17           ` DJ Delorie
@ 2000-09-19 11:50             ` Jason Tishler
  0 siblings, 0 replies; 15+ messages in thread
From: Jason Tishler @ 2000-09-19 11:50 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

DJ,

On Tue, Sep 19, 2000 at 10:17:10AM -0400, DJ Delorie wrote:
> 
> > I can provide you with a "patch" (i.e., code snippets) that tests whether
> > or not the current user is a member of the Administrators group.  Is this
> > the kind of test for which you are looking?
> 
> Yes, but a patch against setup's cvs sources would be best.

OK, you shamed me into it.  If I remember correctly, you preferred inline...

ChangeLog:

Tue Sep 19 14:25:23 2000  Jason Tishler <jt@dothill.com>

    * root.cc (is_admin): New function.
    * root.cc (read_mount_table): Check for administrative priviledges and
    set installation scope as appropriate.

Patch:

Index: root.cc
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/root.cc,v
retrieving revision 2.2
diff -u -p -r2.2 root.cc
--- root.cc	2000/09/07 03:09:30	2.2
+++ root.cc	2000/09/19 18:24:12
@@ -59,6 +59,60 @@ save_dialog (HWND h)
   root_dir = eget (h, IDC_ROOT_DIR, root_dir);
 }
 
+/*
+ * is_admin () determines whether or not the current user is a member of the
+ * Administrators group.  On Windows 9X, the current user is considered an
+ * Administrator by definition.
+ */
+
+static int
+is_admin ()
+{
+  // Windows 9X users are considered Administrators by definition
+  OSVERSIONINFO verinfo;
+  verinfo.dwOSVersionInfoSize = sizeof (verinfo);
+  GetVersionEx (&verinfo);
+  if (verinfo.dwPlatformId != VER_PLATFORM_WIN32_NT)
+    return 1;
+
+  // Get the process token for the current process
+  HANDLE token;
+  BOOL status = OpenProcessToken (GetCurrentProcess(), TOKEN_QUERY, &token);
+  if (!status)
+    return 0;
+
+  // Get the group token information
+  UCHAR token_info[1024];
+  PTOKEN_GROUPS groups = (PTOKEN_GROUPS) token_info;
+  DWORD token_info_len = sizeof (token_info);
+  status = GetTokenInformation (token, TokenGroups, token_info, token_info_len, &token_info_len);
+  CloseHandle(token);
+  if (!status)
+    return 0;
+
+  // Create the Administrators group SID
+  PSID admin_sid;
+  SID_IDENTIFIER_AUTHORITY authority = SECURITY_NT_AUTHORITY;
+  status = AllocateAndInitializeSid (&authority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &admin_sid);
+  if (!status)
+    return 0;
+
+  // Check to see if the user is a member of the Administrators group
+  status = 0;
+  for (UINT i=0; i<groups->GroupCount; i++) {
+    if (EqualSid(groups->Groups[i].Sid, admin_sid)) {
+      status = 1;
+      break;
+    }
+  }
+
+  // Destroy the Administrators group SID
+  FreeSid (admin_sid);
+
+  // Return whether or not the user is a member of the Administrators group
+  return status;
+}
+
 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;
     }
 }
 
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: mount points and inetd
  2000-09-18 13:10       ` DJ Delorie
  2000-09-18 21:11         ` Chris Abbey
  2000-09-19  6:42         ` Jason Tishler
@ 2000-09-19 14:18         ` Corinna Vinschen
  2 siblings, 0 replies; 15+ messages in thread
From: Corinna Vinschen @ 2000-09-19 14:18 UTC (permalink / raw)
  To: cygwin

DJ Delorie wrote:
> I've also heard rumors that system mounts can't even be *used* by an
> account that doesn't have admin privs (does cygwin read the mounts
> with a read/write key, or a read-only key?).

It uses R/O mode to read the keys so this shouldn't be an issue
(on W2K either).

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                        mailto:cygwin@sources.redhat.com
Red Hat, Inc.
mailto:vinschen@cygnus.com

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd)
  2000-09-19 12:18 [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd) Earnie Boyd
@ 2000-09-19 12:55 ` Jason Tishler
  0 siblings, 0 replies; 15+ messages in thread
From: Jason Tishler @ 2000-09-19 12:55 UTC (permalink / raw)
  To: Earnie Boyd; +Cc: cygwin

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd)
@ 2000-09-19 12:18 Earnie Boyd
  2000-09-19 12:55 ` Jason Tishler
  0 siblings, 1 reply; 15+ messages in thread
From: Earnie Boyd @ 2000-09-19 12:18 UTC (permalink / raw)
  To: Jason Tishler, DJ Delorie; +Cc: cygwin

--- 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?  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?

Cheers,

=====
--- < http://earniesystems.safeshopper.com > ---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
           __Minimalist GNU for Windows__
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2000-09-19 14:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-16 23:56 mount points and inetd Chris Abbey
2000-09-16 23:59 ` Robert Collins
2000-09-17  1:06   ` Chris Abbey
2000-09-17  1:13     ` Robert Collins
2000-09-17  1:41       ` Chris Abbey
2000-09-18 13:11         ` DJ Delorie
2000-09-18 13:10       ` DJ Delorie
2000-09-18 21:11         ` Chris Abbey
2000-09-19  0:37           ` Andrej Borsenkow
2000-09-19  6:42         ` Jason Tishler
2000-09-19  7:17           ` DJ Delorie
2000-09-19 11:50             ` [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd) Jason Tishler
2000-09-19 14:18         ` mount points and inetd Corinna Vinschen
2000-09-19 12:18 [PATCH]: setup.exe defaults install scope (was Re: mount points and inetd) Earnie Boyd
2000-09-19 12:55 ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).