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]

su - coreutils?


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/


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