This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: CYGWIN sshd service could not be started


On Tue, 3 May 2005, Corinna Vinschen wrote:

> On May  3 10:54, Corinna Vinschen wrote:
> > On May  2 13:25, Brian Dessent wrote:
> > > Brian Dessent wrote:
> > >
> > > > (It would probably be a good addition for ssh-host-config to check for
> > > > user mounts and bail or offer to remount them... this seems to come up a
> > > > lot.)
> > >
> > > Here is a patch against ssh-host-config that checks for this.
> > >
> > > Brian
> > > --- ssh-host-config.orig	2005-05-02 13:09:13.984375000 -0700
> > > +++ ssh-host-config	2005-05-02 13:23:50.640625000 -0700
> > > @@ -583,6 +583,16 @@
> > >  	chown "${_user}".544 ${LOCALSTATEDIR}/log/sshd.log
> > >        fi
> > >      fi
> > > +    if mount | egrep -q 'on /(|usr/(bin|lib)) type user'
> > > +    then
> > > +      echo
> > > +      echo "Warning: It appears that you have user mode mounts (\"Just me\""
> > > +      echo "chosen during install.)  Any daemons installed as services will"
> > > +      echo "fail to function unless system mounts are used.  To change this,"
> > > +      echo "re-run setup.exe and choose \"All users\"."
> > > +      echo
> > > +      echo "For more information, see http://cygwin.com/faq/faq0.html#TOC33";
> > > +    fi
> > >    fi
> > >  fi
> >
> > Good idea.  I'll add this to the script for the next version.
>
> Well... not exactly.  The problem is that if somebody has user *and*
> system mounts, the warning will be printed nevertheless.  It's not quite
> that simple.

You probably want to reverse the test, e.g.,

--- ssh-host-config.orig	2005-05-02 13:09:13.984375000 -0700
+++ ssh-host-config	2005-05-02 13:23:50.640625000 -0700
@@ -583,6 +583,16 @@
 	chown "${_user}".544 ${LOCALSTATEDIR}/log/sshd.log
       fi
     fi
+    if ! mount | egrep -q 'on /(|usr/(bin|lib)) type system'
+    then
+      echo
+      echo "Warning: It appears that you have user mode mounts (\"Just me\""
+      echo "chosen during install.)  Any daemons installed as services will"
+      echo "fail to function unless system mounts are used.  To change this,"
+      echo "re-run setup.exe and choose \"All users\"."
+      echo
+      echo "For more information, see http://cygwin.com/faq/faq0.html#TOC33";
+    fi
   fi
 fi

In the future versions, we should also check for user mounts for the SYSTEM
user -- unlikely, but very nasty and hard to detect.  I also wonder if the
above test should go into configurations for all services, or perhaps even
added to cygrunsrv in some form...
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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