Fighting quotas (bsd)

Shawn F. Mckay shawn at mit-eddie.MIT.EDU
Mon Dec 22 23:27:49 AEST 1986


Sorry to bother such a large forum, but I am having trouble trying to
implement a program to update a users quotas on any given file system.

The problem stems from the fact that I can have a user with a directory
name like /u/a/b/c/username, and the root directory for the file system
is in /u/a, hence, the quota file is /u/a/quotas. The problem is that I
can be nested any number of levels deep.

With this in mind, how do I find my way back to the 'right' quotas file for
the given file system? (Short of rindexing and trying each pathname).

Trying all this has lead me to the idea of writing my own quota library,
since the current implementation is very unfriendly to people like me who
just wan't to update a uid's quotas, with a new dqblk structure. What I
am looking for is something like putquota (uid, [st_dev], &dqblk), same
with getquota, I don't care really if I have to specify a device, I can
stat the users directory and pass the device I get back from that, but I
would rather not have to worry about pathames, or other file systems, etc.

I am hopeful someone else has tried the same things, and come to the same
wall, and written some routines to do just this, if so, please send me
a message. Else, I will write the library routines, and post the results.

			Thanks,
			  -- Shawn



More information about the Comp.unix.wizards mailing list