sftpd statvfs: check the virtual quota against that of the filesystem

if the virtual quota limit is greater than the filesystem available space,
we need to return the filesystem limits

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-05-14 14:53:26 +02:00
parent 67abf03fe3
commit d2f4edcdb6
3 changed files with 21 additions and 17 deletions

View File

@@ -131,6 +131,9 @@ func TestMain(m *testing.M) {
}
}()
waitTCPListening(sftpdConf.Bindings[0].GetAddress())
waitTCPListening(httpdConf.Bindings[0].GetAddress())
go func() {
// start a test HTTP server to receive action notifications
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@@ -180,9 +183,6 @@ func TestMain(m *testing.M) {
waitTCPListening(httpProxyAddr)
waitTCPListening(smtpServerAddr)
waitTCPListening(sftpdConf.Bindings[0].GetAddress())
waitTCPListening(httpdConf.Bindings[0].GetAddress())
exitCode := m.Run()
os.Remove(logFilePath)
os.Exit(exitCode)