Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Sun, 4 May 2003 22:50:01 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: "Bill C. Riemers" cc: cygwin AT cygwin DOT com Subject: Re: xinetd help In-Reply-To: <00de01c3129c$534c3fd0$6400a8c0@FoxtrotTech0001> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Bill, may be of help here. Are you running xinetd as SYSTEM? If not, it won't be able to setuid(). Igor On Sun, 4 May 2003, Bill C. Riemers wrote: > Most of the log messages scroll off the screen. Unfortunately, xinetd > insists on outputing it's messages to the 'tty', even if stderr is > redirected to a file > or a pipe. However, I did manage to cut and paste the error. > > Normally, I would expect that this error means I don't have Administrator > privledges, but of course I do. I can't say if this is the same error that > occures when > xinetd is started by init, since error messages go to the bit bucket instead > of the log file. > However, the behavior of the xinetd is the same in both cases... > > For the most part, I'm using an unmodified passwd file generated by > "mkpasswd", so naturally I am not using 65535 as a user id. I have to > admit, I do not really under stand the usage of > the cygwin /etc/passwd file under cygwin. The file ownerships, and > permissions appear to be like unix. But try the following: > ssh -l bar localhost 'echo hi > /foo.txt;chmod 700 /foo.txt;chown fi > /foo.txt' > ssh -l fi localhost 'cat /foo.txt' > Even if both 'bar', and 'fi' have administrator permissions, this results in > a permission denied error. Furtermore: > ssh -l bar localhost 'echo hi > /foo.txt;chmod 700 /foo.txt;chown fi > /foo.txt' > ssh -l fi localhost 'chmod 777 /foo.txt;cp /foo.txt /foo2.txt;mv > /foo2.txt /foo.txt; \ > chmod 700 /foo.txt;cat foo.txt' > works without error. > > I find crazy things, like the CYGWIN FAQ claims 'su.exe' does not exist > under cygwin, unless you have a really old distribution. Which false... > But it says if you do have 'su.exe' it probably doesn't work. That part is > true. So, studying the documentation isn't helping in learning how file > permissions and such really work under cygwin. > > Bill > > 3/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: chargen-stream > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: chargen-dgram > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: daytime-stream > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: daytime-dgram > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: echo-stream > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: echo-dgram > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: ftp > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: exec > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: login > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: servers > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: services > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: talk > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} Started service: telnet > 03/5/4 AT 19:51:10: DEBUG: {cnf_start_services} mask_max = 19, services_started = 13 > 03/5/4 AT 19:51:10: NOTICE: {main} xinetd Version 2.3.9 started with no options compiled in. > 03/5/4 AT 19:51:10: NOTICE: {main} Started working: 13 available services > 03/5/4 AT 19:51:10: DEBUG: {main_loop} active_services = 13 > 03/5/4 AT 19:51:32: DEBUG: {main_loop} select returned 1 > 03/5/4 AT 19:51:32: DEBUG: {server_start} Starting service telnet > 03/5/4 AT 19:51:32: DEBUG: {main_loop} active_services = 13 > 03/5/4 AT 19:51:33: ERROR: {set_credentials} setuid failed: Permission denied (errno = 13) > 03/5/4 AT 19:51:33: DEBUG: {main_loop} active_services = 13 > 03/5/4 AT 19:51:33: DEBUG: {main_loop} select returned 1 > 03/5/4 AT 19:51:33: DEBUG: {check_pipe} Got signal 20 (Child status changed) > 03/5/4 AT 19:51:33: DEBUG: {child_exit} waitpid returned = 3356 > 03/5/4 AT 19:51:33: DEBUG: {server_end} telnet server 3356 exited > 03/5/4 AT 19:51:33: INFO: {conn_free} freeing connection > 03/5/4 AT 19:51:33: DEBUG: {child_exit} waitpid returned = -1 > 03/5/4 AT 19:51:33: DEBUG: {main_loop} active_services = 13 > 03/5/4 AT 19:52:25: NOTICE: {general_handler} Unexpected signal 2 (Interrupt) > > ----- Original Message ----- > From: "Igor Pechtchanski" > To: "Bill C. Riemers" > Cc: > Sent: Sunday, May 04, 2003 6:40 PM > Subject: Re: xinetd help > > > > On Sun, 4 May 2003, Bill C. Riemers wrote: > > > > > Hi there, > > > > > > I've been trying to get xinetd to work under Windows XP, but so far have > > > been unsuccessfull. The daemons starts and runs successfully, but all > > > connections to it's services fails. > > > > > > For example: > > > telnet localhost > > > just results in a connection that closes right away. > > > > > > I tried running xinetd in debug mode. It just keeps complaining "setuid" > > > failed, or goes into endless loops of connections closing and reopening, > > > depending on which service I try testing. > > > Bill > > > > Is the uid it's trying to set equal to 65535, as in > > ? > > If so, check your /etc/passwd to make sure it's up to date (with respect to > > domain users, most likely). Otherwise, please post the *exact* error > > message you're getting. > > Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Knowledge is an unending adventure at the edge of uncertainty. -- Leto II -- 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/