> From [EMAIL PROTECTED] Wed Jul 12 16:12 MET 1995
> From: [EMAIL PROTECTED]
> Subject: Re: What are the valid uids? (fwd)
> To: [EMAIL PROTECTED]
> Date: Wed, 12 Jul 1995 10:06:13 -0300 (BSC)
> Hi:

dito.

> 
>    I'm very tahkfull for all the response taht I got concerning my
> questions about the AFS root with id 0. Besides Transarc recomendations I'm
> still wanting to create a network wide root user, because I can't 
> have all my root passwors (I have more than 100 RS/6000).
>    But, as Scott Grosch, when I create a user netroot with -id 0 
> pts ignores the id 0 and just put an arbitray id. I've tried to
> set the pts setmax to 0 , but then the first created user get the id equals 1.
> Maybe if I set the maxid has the biggest one, would it turn around to 0?
> If this true what would be the biggest id?

I think it will not function this way. I've just browsed through the code of
pts and found out that a value of 0 for the id is taken as an indicator to
allocate a new ID (as Scott Grosch demonstrated by his 4 lines excerpt). If
a new ID is to be allocated the algorithm functions as follows:

        1. Start with biggest currently automatically allocated ID
        2. As long as there already exist an entry with this ID
                a. Increment the ID
        3. Store new ID as new maximum ID

The maximum ID is of type 32 bit integer, thus, the maximum value is 2^32 - 1.
(The loop in 2. is also restricted to run upto 50 times.) Note that if you 
manually set the ID the maximum counter seems to be *not* adjusted (because
if it were, the loop would be meaningless: You would never had an ID bigger
than the maximum ID) Consequently, creating a dummy account with id 2^32 - 1
would not work.

What you actually have to do is to set the value of the internal maximum
ID counter. Problematic. You don't have access to this variable. 
Theoratically you must assign *all* of ID values first, before you 
reach the overflow ...

-Peter
 
Konrad-Zuse-Zentrum fuer                  Email: [EMAIL PROTECTED]
Informationstechnik Berlin (ZIB)          Phone: +49 03 89604-267

                      "All (opinions are) mine."

Reply via email to