[Gllug] Problem with users (authing over Active Directory) not being about to run software, but local users can.

Bruce Richardson itsbruce at workshy.org
Thu Oct 15 13:50:04 UTC 2009


On Thu, Oct 15, 2009 at 02:46:15PM +0100, Peter wrote:
> 2009/10/15 Matthew King <matthew.king at monnsta.net>:
> > John Edwards <john at cornerstonelinux.co.uk> writes:
> >
> >> In the old days it used to be a 16 bit unsigned int, so 65535
> >> (2^16 -1). Almost all modern UNIX-like systems now use a 32 bit
> >> signed int, so 2147483647 (2^31 -1).
> >
> > Is there any reason why when this was implemented it was decided to use
> > 31 instead of 32 bits? I know that 4 billion users is unlikely but it
> > seems a bit odd to use an unsigned instead of a signed int.
> >
> > Assuming of course that negative UIDs are illegal.
> >
> > Matthew
> >
> 
>  I suspect the reason was to keep it simple a signed integer was used
> for every thing so you unsigned operators are not needed, one less
> thing to break, one less thing to fix.
> 

It's not a signed int; it's an unsigned int.  Go look at the include
files on your Linux box to verify this.

There has traditionally been some confusion out there about whether Unix
UUIDs are signed or unsigned types because of the way the max ID is
tested in some code - since 65535 in a 16 bit unsigned integer is
equivalent to -1 in a signed 16 bit integer, some coders would use -1
because it's easier to remember and type (and potentially
forwards-compatible, depending on how type macros are managed on your
*nix of choice).

> The logic being that when you only have 16 bits every bit matters but
> when you have 32 bits available what the harm in only using only 31
> and not needing two version of every operator...

I really do not believe they would be that utterly stupid.  And they
haven't been.

-- 
Bruce

I must admit that the existence of Disneyland (which I know is real)
proves that we are not living in Judea in AD 50. -- Philip K. Dick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20091015/dc996998/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list