]> git.lizzy.rs Git - plan9front.git/commitdiff
upas/fs: remove read timeout via alarm(2) in pop3resp
authorAlex Musolino <alex@musolino.id.au>
Mon, 20 May 2019 05:30:14 +0000 (15:00 +0930)
committerAlex Musolino <alex@musolino.id.au>
Mon, 20 May 2019 05:30:14 +0000 (15:00 +0930)
The alarm note is not handled by upas/fs, so if and when it did fire,
the pop3 client process would terminate rendering the entire fs
unresponsive.

sys/src/cmd/upas/fs/pop3.c

index a835e7d2b4a47be022e293f56b15fac1b80dc752..3922823832cfba06b2c7f638f60bc0f40af1e44e 100644 (file)
@@ -89,14 +89,11 @@ pop3resp(Pop *pop)
        char *s;
        char *p;
 
-       alarm(60*1000);
        if((s = Brdstr(&pop->bin, '\n', 0)) == nil){
                close(pop->fd);
                pop->fd = -1;
-               alarm(0);
                return "unexpected eof";
        }
-       alarm(0);
 
        p = s + strlen(s) - 1;
        while(p >= s && (*p == '\r' || *p == '\n'))