[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Quota support for pam_mkhomedir



On Mon, 2002-02-18 at 21:03, Brian Masney wrote:
> I'll volunteer to write the module. I have a few ideas for the multiple
> device support. The first, have an option to where it would read /etc/mtab
> and attempt to set quotas for all mounted devices. Then we could have a 
> second option to where you can specify multiple mount points in the pam config 
> or point it to a file that containts the mount points. 

While working for the University of Wisconsin I wrote a utility to set
quotas for home, other people's home, project, and miscellaneous file
systems.  Much of the code from it may be useful for this.

Highlights of its features are:

        * Has the notion that not every user gets the same quota on
          every file system.  Currently the calculation method uses SQL+
          calls to the database in use by the UW College of Engineering,
          which will likely need to be changed to something more
          generic.
        * Has the notion that there may be multiple home directory file
          systems, but a user only has a home directory on one of them. 
          Quotas should be set differently on each.
        * Uses a configuration file
          (http://www.cae.wisc.edu/~gerdts/quotareset/quota.cf) to
          determine the default quotas for each file system.
        * Supports UFS and VxFS quotas.  I believe that the UFS code
          will work fine with ext2.
        * Licensed under the GPL.  If you give me a good argument, an
          alternate license may be available.

Ideas that I have had for the future of it:

        * Break all the quota get/set code out into libquota.  libquota
          will then be able to dynamically load the appropriate plugin
          for the file system that is being operated on.  This would
          work much in the same way that fsck looks at the file system
          time then calls the real fsck for that file system.  libquota
          would be a project of its own that would be available for use
          in this module, Samba, etc.  Some thoughts are outlined at
         
http://lists.samba.org/pipermail/samba-technical/2002-January/033992.html
        * Make the home and project directory quota calculation be
          pluggable modules.  The first pluggable module written should
          be a module that runs a command and uses values from that
          command's stdout as the quotas to set.  This would make it so
          that home and project are not special at all, unless the
          configuration file says that they are.  Each volume type
          should be able to use a different module.

Please take a look.  The code is well tested and thoroughly documented. 
http://www.cae.wisc.edu/~gerdts/quotareset/

Mike





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []