Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Feb 1999 01:19:44 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        jdp@polstra.com (John Polstra)
Cc:        tlambert@primenet.com, hackers@FreeBSD.ORG
Subject:   Re: UIDs greater than 65535?
Message-ID:  <199902200119.SAA17512@usr02.primenet.com>
In-Reply-To: <XFMail.990219163650.jdp@polstra.com> from "John Polstra" at Feb 19, 99 04:36:50 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >> Can anybody think of a reason why UIDs > 65535 wouldn't work under
> >> FreeBSD?  They seem to work, and I can't find any reason why they
> >> shouldn't.  Even the NFS protocol (though not necessarily all NFS
> >> servers) seems to be able to accomodate 4-byte UIDs.
> > 
> > 65536 in an unsigned short is -1 is "nobody".
> 
> Actually, nobody is 65534 on FreeBSD systems.  But anyway, I've only
> found a couple of places where UIDs are stored in unsigned shorts:

I meant 65535, but yeah, -2 is right.  I can't remember back to
Ultrix, but I know -1 was *something*; ah, got it.  It's who root
becomes if you don't allow root access via NFS.


> * In the API to the System V message functions, in <sys/ipc.h>.
> * In Linux programs run under emulation.
> 
> There are also some limits in archive files, because UIDs are encoded
> as (*gag*) 5-digit decimal numbers.
> 
> These problems are all avoidable in the application I have in mind.

See the quota code.  The thing uses a sparse file, and spazzes out
> 65535.  Not that it has spare space for the time_t going to 64 bits
anyway.  8-(.


I have a quota stacking layer that resolves both the Year 2038 issues
and the uid_t/gid_t issues, includes version stamping the file, and has
a format converter (quotacheck -c 1), but it won't run in an unhacked
FreeBSD kernel because of my local VFS changes to support stacking
layers actually working, and cleaner vnode based kernel file I/O.

I think a stacking layer is the way to go; I can put quotas on my
ext2fs and UMSDOS (stack over VFAT, using Udo Walter's attribute
file: -linux--.--- [bletch] or mine: -umsdos-.--- [yea, symmetric,
not OS tagged]) FS's.  Woo hoo.  8-).


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902200119.SAA17512>