Timo Sirainen napsal(a):
On Thu, 2007-03-01 at 10:05 +0100, Václav Hůla wrote:
quota command: quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbffff218) = 0
dovecot: quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, {0, 135145272, 1075193885, 1075193885, 135145168, 135099456, 3221217528, 134953542}) = -1 EINVAL (Invalid argument) .. /usr/include/sys/quota.h extern int quotactl (int __cmd, const char *__special, int __id, caddr_t __addr) __THROW;
Actually Dovecot's quotactl() call looks correct to me. Q_GETFMT is something different. Did you give user parameter to quota command while straceing it?
Yes but it does not make much difference:
ax@zen:~$ strace /usr/bin/quota 2>&1 |grep quotactl quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address) quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbfffe778) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbfffe6f0) = 0 quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbfffe778) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbfffe6f0) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, 0xbfffe5f0) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 506, 0xbfffe5f0) = 0
ax@zen:~$ strace /usr/bin/quota ax 2>&1 |grep quotactl quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address) quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbfffe078) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbfffdff0) = 0 quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbfffe078) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbfffdff0) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, 0xbfffdef0) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 506, 0xbfffdef0) = 0
root@zen:~# strace /usr/bin/quota 2>&1 |grep quotactl quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address) quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbffff398) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbffff310) = 0 quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbffff398) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbffff310) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 0, 0xbffff210) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 0, 0xbffff210) = 0
root@zen:~# strace /usr/bin/quota ax 2>&1 |grep quotactl quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address) quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbfffec18) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbfffeb90) = 0 quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbfffec18) = 0 quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbfffeb90) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, 0xbfffea90) = 0 quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 506, 0xbfffea90) = 0
for full strace of last command see http://www.natur.cuni.cz/~ax/strace.quota.user
Hula
Václav Hůla, správce unixových serverů Přírodovědecká fakulta Univerzita Karlova v Praze