public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "D. Boland" <daniel@boland.nl>
To: cygwin@cygwin.com
Subject: The eternal uid issue
Date: Wed, 23 Jul 2014 08:01:00 -0000	[thread overview]
Message-ID: <53CF6CEC.6D68E485@boland.nl> (raw)

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

             reply	other threads:[~2014-07-23  8:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23  8:01 D. Boland [this message]
2014-07-23  8:19 ` Linda Walsh
2014-07-23  8:34   ` D. Boland
2014-07-26  2:07     ` The deprecated uid issue: use caps Linda Walsh
2014-07-26 13:29       ` D. Boland
2014-07-23  9:14 ` The eternal uid issue Corinna Vinschen
2014-07-23 11:31   ` D. Boland
2014-07-23 15:13     ` Larry Hall (Cygwin)
2014-07-23 15:24     ` Corinna Vinschen
2014-07-24  6:48       ` D. Boland
2014-07-24 13:52         ` Corinna Vinschen
2014-07-24 21:38           ` D. Boland
2014-07-24 22:18             ` Jeffrey Altman
2014-07-25 12:42             ` Corinna Vinschen
2014-07-25 12:47               ` Corinna Vinschen
2014-07-25 14:01                 ` D. Boland
2014-07-28  8:03               ` D. Boland
2014-07-28  9:14                 ` Corinna Vinschen
2014-07-28 11:38                   ` D. Boland
2014-07-28 11:53                     ` Corinna Vinschen
2014-07-28 12:04                       ` Corinna Vinschen
2014-07-29 14:02                       ` D. Boland
2014-07-30 13:10                         ` Corinna Vinschen
2014-07-31 12:48                           ` D. Boland
2014-07-23 16:20     ` Andrey Repin
2014-07-23 16:27       ` Christopher Faylor
2014-07-24  9:30         ` D. Boland
2014-07-24 13:20           ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CF6CEC.6D68E485@boland.nl \
    --to=daniel@boland.nl \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).