Bug#765499: Patch to make policy document 32-bit uids

2015-02-05 Thread Bill Allombert
On Mon, Feb 02, 2015 at 08:51:44PM +0100, Julien Cristau wrote:
> On Sun, Feb  1, 2015 at 23:38:24 +0100, Bill Allombert wrote:
> 
> > On Sat, Jan 31, 2015 at 12:28:22PM -0800, Russ Allbery wrote:
> > > Bill Allombert  writes:
> > > 
> > > > + 4294967294:
> > > > + 
> > > > +   
> > > > + (uid_t)(-2) == (gid_t)(-2) must
> > > > + not be used, because it is mistaken for
> > > > +  65534 nobody by some
> > > > +  programs.
> > > > +   
> > > > + 
> > > 
> > > I would instead say:
> > > 
> > > must not be used, because it is used as the anonymous,
> > > unauthenticated user by some NFS implementations.
> > 
> > OK I offer an updated patch.
> > 
> > Third time's a charm I hope.
> > 
> Seconded.

This makes two seconds.

I have created a branch bug765499-bill with this patch that I will merge
shortly if there is no further comments. 

Cheers,
-- 
Bill. 

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#765499: Patch to make policy document 32-bit uids

2015-02-02 Thread Julien Cristau
On Sun, Feb  1, 2015 at 23:38:24 +0100, Bill Allombert wrote:

> On Sat, Jan 31, 2015 at 12:28:22PM -0800, Russ Allbery wrote:
> > Bill Allombert  writes:
> > 
> > > +   4294967294:
> > > +   
> > > + 
> > > +   (uid_t)(-2) == (gid_t)(-2) must
> > > +   not be used, because it is mistaken for
> > > +  65534 nobody by some
> > > +  programs.
> > > + 
> > > +   
> > 
> > I would instead say:
> > 
> > must not be used, because it is used as the anonymous,
> > unauthenticated user by some NFS implementations.
> 
> OK I offer an updated patch.
> 
> Third time's a charm I hope.
> 
Seconded.

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#765499: Patch to make policy document 32-bit uids

2015-02-01 Thread Russ Allbery
Bill Allombert  writes:

> OK I offer an updated patch.

> Third time's a charm I hope.

Looks good to me.  Seconded.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#765499: Patch to make policy document 32-bit uids

2015-02-01 Thread Bill Allombert
On Sat, Jan 31, 2015 at 12:28:22PM -0800, Russ Allbery wrote:
> Bill Allombert  writes:
> 
> > + 4294967294:
> > + 
> > +   
> > + (uid_t)(-2) == (gid_t)(-2) must
> > + not be used, because it is mistaken for
> > +  65534 nobody by some
> > +  programs.
> > +   
> > + 
> 
> I would instead say:
> 
> must not be used, because it is used as the anonymous,
> unauthenticated user by some NFS implementations.

OK I offer an updated patch.

Third time's a charm I hope.

Cheers,
-- 
Bill. 

Imagine a large red swirl here. 
diff --git a/policy.sgml b/policy.sgml
index 24cf7d7..947a1e1 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7351,6 +7351,35 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
  65535:
  

+ This value must not be used, because it was
+ the error return sentinel value when uid_t
+ was 16 bits.
+   
+ 
+
+ 65536-4294967293:
+ 
+   
+ Dynamically allocated user accounts.  By
+ default adduser will not allocate UIDs
+ and GIDs in this range, to ease compatibility with
+ legacy systems where uid_t is still 16
+ bits.
+   
+ 
+
+ 4294967294:
+ 
+   
+  (uid_t)(-2) == (gid_t)(-2) must not be
+  used, because it is used as the anonymous, unauthenticated
+  user by some NFS implementations.
+   
+ 
+
+ 4294967295:
+ 
+   
  (uid_t)(-1) == (gid_t)(-1) must
  not be used, because it is the error return
  sentinel value.


Bug#765499: Patch to make policy document 32-bit uids

2015-01-31 Thread Russ Allbery
Bill Allombert  writes:

> +   4294967294:
> +   
> + 
> +   (uid_t)(-2) == (gid_t)(-2) must
> +   not be used, because it is mistaken for
> +  65534 nobody by some
> +  programs.
> + 
> +   

I would instead say:

must not be used, because it is used as the anonymous,
unauthenticated user by some NFS implementations.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#765499: Patch to make policy document 32-bit uids

2015-01-31 Thread Bill Allombert
On Sun, Jan 25, 2015 at 02:27:06PM +0100, Bastian Blank wrote:
> On Thu, Jan 22, 2015 at 04:44:22PM +, Matthew Vernon wrote:
> > Here's a patch to document the 32-bit nature of UIDs, in line with Ben's
> > suggestion (which seems sound to me).
> 
> I miss the special case of 32-bit wide -2, aka nobody as used by nfs.
> It should be reserved at least.

Please find an updated patch.
Do you have a reference for this I could add ?

Does it look OK ?

Cheers,
-- 
Bill. 

Imagine a large red swirl here. 
diff --git a/debian/changelog b/debian/changelog
index 0ade396..28ce1e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
 debian-policy (3.9.7.0) unstable; urgency=low
 
   * Policy: refreshed the names of the Policy Editors.
+  * Policy: [9.2.2] document 32-bit uids
+Wording: Matthew Vernon 
+Seconded: Russ Allbery 
+Seconded: Bill Allombert 
 
- -- Bill Allombert   Sat, 22 Nov 2014 16:00:10 +0100
+ -- Bill Allombert   Sat, 31 Jan 2015 17:00:41 +0100
 
 debian-policy (3.9.6.1) unstable; urgency=low
 
diff --git a/policy.sgml b/policy.sgml
index 7bb703b..cf4174c 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7351,6 +7351,36 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
  65535:
  

+ This value must not be used, because it was
+ the error return sentinel value when uid_t
+ was 16 bits.
+   
+ 
+
+ 65536-4294967293:
+ 
+   
+ Dynamically allocated user accounts.  By
+ default adduser will not allocate UIDs
+ and GIDs in this range, to ease compatibility with
+ legacy systems where uid_t is still 16
+ bits.
+   
+ 
+
+ 4294967294:
+ 
+   
+ (uid_t)(-2) == (gid_t)(-2) must
+ not be used, because it is mistaken for
+  65534 nobody by some
+  programs.
+   
+ 
+
+ 4294967295:
+ 
+   
  (uid_t)(-1) == (gid_t)(-1) must
  not be used, because it is the error return
  sentinel value.


Bug#765499: Patch to make policy document 32-bit uids

2015-01-25 Thread Bastian Blank
On Thu, Jan 22, 2015 at 04:44:22PM +, Matthew Vernon wrote:
> Here's a patch to document the 32-bit nature of UIDs, in line with Ben's
> suggestion (which seems sound to me).

I miss the special case of 32-bit wide -2, aka nobody as used by nfs.
It should be reserved at least.

Bastian

-- 
Intuition, however illogical, is recognized as a command prerogative.
-- Kirk, "Obsession", stardate 3620.7


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#765499: Patch to make policy document 32-bit uids

2015-01-22 Thread Matthias Urlichs
Hi,

Matthew Vernon:
> Here's a patch to document the 32-bit nature of UIDs, in line with Ben's
> suggestion (which seems sound to me). I've added a note to the effect
> that useradd won't use the higher-numbered UIDs, which seems sensible as
> a) that requires no changes to useradd b) there are some systems you
> might want to NIS with which still have 16 bits only.
> 
We might want to explicitly reserve a range (2^31…2^32-2 ?) for
(auto-)allocating UID blocks for user namespaces.

This way, I could allocate one 2048-or-whatever UID block per container and
not be concerned that somebody's random UID matches some random customer's
root user. Or be forced to pre-allocate 2048 dummy users so that adduser
won't.

-- 
-- Matthias Urlichs


signature.asc
Description: Digital signature


Bug#765499: Patch to make policy document 32-bit uids

2015-01-22 Thread Bill Allombert
On Thu, Jan 22, 2015 at 10:20:00AM -0800, Russ Allbery wrote:
> Matthew Vernon  writes:
> 
> > Here's a patch to document the 32-bit nature of UIDs, in line with Ben's
> > suggestion (which seems sound to me). I've added a note to the effect
> > that useradd won't use the higher-numbered UIDs, which seems sensible as
> > a) that requires no changes to useradd b) there are some systems you
> > might want to NIS with which still have 16 bits only.
> 
> Looks good to me.  Thank you!  Seconded.

Seconded too.
I have created a git branch bug765499-bill with this patch.
Let's start a one week discussion period.

Cheers,
-- 
Bill. 

Imagine a large red swirl here. 


signature.asc
Description: Digital signature


Bug#765499: Patch to make policy document 32-bit uids

2015-01-22 Thread Russ Allbery
Matthew Vernon  writes:

> Here's a patch to document the 32-bit nature of UIDs, in line with Ben's
> suggestion (which seems sound to me). I've added a note to the effect
> that useradd won't use the higher-numbered UIDs, which seems sensible as
> a) that requires no changes to useradd b) there are some systems you
> might want to NIS with which still have 16 bits only.

Looks good to me.  Thank you!  Seconded.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#765499: Patch to make policy document 32-bit uids

2015-01-22 Thread Matthew Vernon
tags 765499 +patch
quit

Hi,

Here's a patch to document the 32-bit nature of UIDs, in line with Ben's
suggestion (which seems sound to me). I've added a note to the effect
that useradd won't use the higher-numbered UIDs, which seems sensible as
a) that requires no changes to useradd b) there are some systems you
might want to NIS with which still have 16 bits only.

HTH,

Matthew
--- policy.sgml.orig	2015-01-22 16:08:58.764239260 +
+++ policy.sgml	2015-01-22 16:39:05.244580859 +
@@ -7352,6 +7352,26 @@
 	  65535:
 	  
 		
+		  This value must not be used, because it was
+		  the error return sentinel value when uid_t
+		  was 16 bits.
+		
+	  
+
+	  65536-4294967294:
+	  
+		
+		  Dynamically allocated user accounts.  By
+		  default adduser will not allocate UIDs
+		  and GIDs in this range, to ease compatibility with
+		  legacy systems where uid_t is still 16
+		  bits.
+	
+	  
+
+	  4294967295:
+	  
+		
 		  (uid_t)(-1) == (gid_t)(-1) must
 		  not be used, because it is the error return
 		  sentinel value.