delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/17/16:43:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Message-ID: <4172D969.8040107@x-ray.at>
Date: Sun, 17 Oct 2004 22:43:21 +0200
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a3) Gecko/20040817
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: marklist AT fangorn DOT ca
Subject: su - coreutils?
References: <Pine DOT GSO DOT 4 DOT 56 DOT 0403271502550 DOT 18236 AT slinky DOT cs DOT nyu DOT edu> <406C37A9 DOT 3030809 AT landheer DOT com> <20040401165235 DOT GF2598 AT cygbert DOT vinschen DOT de> <406C7928 DOT 9070708 AT fangorn DOT ca> <20040402073643 DOT GI2598 AT cygbert DOT vinschen DOT de> <406D6453 DOT 20104 AT fangorn DOT ca> <20040402141222 DOT GA14036 AT cygbert DOT vinschen DOT de> <20040402160030 DOT GD1144 AT coc DOT bosbc DOT com> <406DAD0C DOT 6090402 AT fangorn DOT ca>
In-Reply-To: <406DAD0C.6090402@fangorn.ca>
X-IsSubscribed: yes

I've taken Mark's coreutils patches, the proposed fileutils patches, and 
some of Bas latest patches (ignore errors) and tried to build a package.
Builds fine, just some fixes for setuid processing in make install need 
to be done. (for su)

http://xarch.tu-graz.ac.at/publ/cygwin/coreutils/

But while we are here some questions, mostly to Corinna:

sync:
sync is a no-op in cygwin. Shouldn't we print a warning when calling 
sync.exe?

su:
ok, su was never ported to cygwin. I did read the archives, esp.
http://www.cygwin.com/ml/cygwin/2003-06/msg00897.html

I've taken the liberty to use some code form corinna's login package and 
applied these changes to su, to do something useful at the password 
prompt and the setuid then.
Without these patches the password prompt is entirely bogus.
Only a minor change from setuid to seteuid had to be done.

Also:
/* The user to become if none is specified.  */
#ifdef __CYGWIN__
#define DEFAULT_USER "Administrator"
#define ROOT_UID	18		// system
#else
#define DEFAULT_USER "root"
#define ROOT_UID	0
#endif

Idea: Logon as Administrator, not as SYSTEM.
But if already SYSTEM avoid asking for passwords.
And use the login cygwin_logon_user() code.

But: cygwin_logon_user always fails, even in a sysbash.

And, how to support empty password accounts?
cygwin_logon_user fails with set_errno(EINVAL);
   Can we use subauth/cygsuba.c then?
   Is there any template where this is used?

Or should we leave as is?
   (bogus getpassword for existing expect scripts, no setuid done)
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

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

- Raw text -


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