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]

The eternal uid issue


Hi Cygwin lovers,

After some weeks of serious compiling, researching, understanding, fixing, testing
and compiling again, I managed to get the Sendmail source code compiled and working.

But I had to compromise in some critical areas. One of them is the uid issue.

* sendmail, procmail, mail.local assume that the id of the privileged user is '0'.

Within the current Cygwin DLL, this is '18'. So the maintainer of, let's say, the
procmail code has to change a constant, named ROOT_uid to be 18 if compiled in
cygwin. I had to do the same in Sendmails' own Mail Delivery Agent, 'mail.local'.

But that's no real fix. That's a work-around. Cygwin is supposed to emulate Linux,
so why not change the 'getuid' function to return '0' if the uid is '18'? This is
exactly what all Linux source code expects, so we would never have to worry about it
again.

Instead, maintainers constantly have to "correct" this "bug" in every new version of
their source code.

The general idea behind this is "never to break user space", where the programs are
seen as the users. Actually, it's Linus Torwalds's first rule of kernel programming
and one can read here how serious he is about this:

https://lkml.org/lkml/2012/12/23/75

Isn't it about time to make this our First Directive also?

Daniel


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


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