delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/06/12:52:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 6 Nov 2002 12:52:00 -0500
From: Jon LaBadie <jcyg AT jgcomp DOT com>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: ssh-host-config suggestion (was: Re: Updated: OpenSSH-3.5p1-1)
Message-ID: <20021106175200.GA16885@butch.jgcomp.com>
References: <20021106153438 DOT K2180 AT cygbert DOT vinschen DOT de> <15817 DOT 18485 DOT 56727 DOT 29262 AT jupiter DOT akutech-local DOT de> <20021106181026 DOT C2180 AT cygbert DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20021106181026.C2180@cygbert.vinschen.de>
User-Agent: Mutt/1.3.28i

On Wed, Nov 06, 2002 at 06:10:26PM +0100, Corinna Vinschen wrote:
> 
> > - could `chown' be modified to complain if it fails to do the work it
> >   was supposed to do?  It seems that the exit status is 0, and besides
> >   that the script simply does not care about the exit status of chown.
> 
> Tricky.  The problem (and the reason the script doesn't test the return
> code) is, there are several conditions for having a working chown.  It
> must be NT/2K/XP, ntsec must be on, FS must be NTFS.  The chown(2) syscall
> returns intentionally always 0 if any of these conditions isn't met.

That behavior seems rather "non-unix-like".  If chown(2) fails to work
shouldn't return an error status, and possibly set ERRNO.  Then chown(1)
could report a reasonable error message and exit status.

The script could continue to ignore the chown(1) success or failure
at its own peril.

-- 
Jon H. LaBadie                  jcyg AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019