delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/07/23/04:02:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=Qsy
66gRM3JkX0IsmfkSAk05HtONKpAdEMwMG0ei4MzngtR4oY3YUy9FYUbqOMRNynOi
eQd5jF8mnK8YZB7MpbnAWxnJRHsnSMazZgnwmiRAw57R02qQzGlWJFA7oQvjU6Wv
6Tf91uQ55eEMJX8mFcBawVvSrpsTzB/+SiLB6Lb4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=91JjTQ2+7
hxZM01c3c/G5/eTtIo=; b=PuCEU25QTArdcP7m+NjSDXvaU0nPe8bH6xC+O2PT1
a8DI7RCXaNVIWGSFRAXRubae0G3NTR4tT5ZbkPQMONHXyYAgKeC8a9EN4mfMrSkd
s+xoagONA+c3FciyZdHq5nc2+XYBh39+QwEKzSboVXZX+IQdHa5OrW3a7cS98b4N
Ko=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: "D. Boland" <daniel AT boland DOT nl>
Subject: The eternal uid issue
Date: Wed, 23 Jul 2014 10:06:04 +0200
Lines: 30
Message-ID: <53CF6CEC.6D68E485@boland.nl>
Mime-Version: 1.0
X-IsSubscribed: yes

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

- Raw text -


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