[Dovecot] AIX: mntctl implementation for NFS quota support

Ralf Becker beckerr at fh-trier.de
Mon Jul 21 02:44:47 EEST 2008



Timo Sirainen schrieb am 20.07.2008 18:01:
> Committed with a few changes, could you try if it still works? :)
> http://hg.dovecot.org/dovecot-1.1/rev/ecc57955b99d
> 

There is a small compiling issue:

--- dovecot-1.1.2-orig/src/lib/mountpoint.c     2008-07-20 
17:56:16.000000000 +0200
+++ dovecot-1.1.2/src/lib/mountpoint.c  2008-07-21 01:02:15.000000000 +0200
@@ -123,7 +123,7 @@
     for (i = 0; i < count && device_path == NULL; i++) {
         struct stat vst;
         const char *vmt_base = (const char *)vmt;
-       const char *vmt_base, *vmt_object, *vmt_stub, *vmt_hostname;
+       const char *vmt_object, *vmt_stub, *vmt_hostname;

         vmt_hostname = vmt_base + vmt->vmt_data[VMT_HOSTNAME].vmt_off;
         vmt_object   = vmt_base + vmt->vmt_data[VMT_OBJECT].vmt_off;


>  - Instead of just one mntctl() retry I added a while-loop. The required
> allocation size can change if more mounts are added, right? So there's
> otherwise a small race condition between the size checking and the
> actual allocation that could cause an unwanted failure. And I think it's
> pretty safe to assume that the kernel won't return values that will
> cause infinite looping. :)

Yes, you're right. That looks perfect for me :-)


-- 
______________________________________________________________________

  Dipl.-Inform. (FH) Ralf Becker     Rechenzentrum (r/ft) der FH Trier
  (Network|Mail|Web|Firewall)           University of applied sciences
  Administrator                           Schneidershof, D-54293 Trier

    Mail: beckerr at fh-trier.de                    Fon: +49 651 8103 499
     Web: http://www.fh-trier.de/~beckerr        Fax: +49 651 8103 214
  PubKey: http://www.fh-trier.de/~beckerr     Crypto: GnuPG, S/MIME
______________________________________________________________________

  Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
  endeten Gebete traditionell mit </amen>. (Tom Listen)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6074 bytes
Desc: S/MIME Cryptographic Signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20080721/9d3f807d/attachment-0001.bin 


More information about the dovecot mailing list