[Mimedefang] Compliance

Jan Pieter Cornet johnpc at xs4all.nl
Wed Apr 13 15:21:45 EDT 2005


On Wed, Apr 13, 2005 at 09:52:30AM +0900, alan premselaar wrote:
> >We use a setuid copy of /usr/bin/quota to do quota checking on our Red 
> >Hat server.  (We use a copy rather than making /usr/bin/quota setuid 
> >since any updates to the quota package would reset the setuid bit.)  
> >It's probably not the most efficient setup, but I thought that it would 
> >be simpler than a quota daemon.
> >
> >I can post my code if anyone's interested, although it's not as fancy as 
> 
>  I'd be interested in at least looking at it.  Currently I'm using 
> procmail for local delivery and its Quota handling is kludgey at best.
> I'd really like to get something working within MD.  Since the method 
> Jan uses calls the perl module for Quota directly, I don't think setting 
> setuid on the quota application will make any difference (although I 
> haven't looked at the Quota module code either)

No, just using my code and setting the setuid on quota won't work. (And
beware that on some OSes, /usr/bin/quota is already setuid, eg FreeBSD).

The idea is to use a setuid quota binary and then wrapping it in methods
that mimic the effect of Quota::query(Quota::getqcarg($path), $uid, 0),
which is basically what I use in my MD quota verification code.

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet



More information about the MIMEDefang mailing list