9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 9tftpd
@ 1998-08-18  7:09 arisawa
  0 siblings, 0 replies; 2+ messages in thread
From: arisawa @ 1998-08-18  7:09 UTC (permalink / raw)


Hello 9fans!

Plan9 uses tftpd to help booting.
However the use of tftpd on authentication
server has some security problems.
So I modified tftpd.
You can get the new tftpd at my ftp:
ftp://plan9.aichi-u.ac.jp/9tftpd/

9tftpd is a tftpd for plan9 and you can replace tftpd by 9tftpd.
9tftpd follows TFTPD protocols but the
use is limited to sending boot files. That is,
1. 9tftpd does not accept files from remote hosts.
2. 9tftpd looks ndb and sends bootf of the remote host.
3. the name space that 9tftpd is running belongs to none.

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [9fans] 9tftpd
@ 1998-09-02 11:25 arisawa
  0 siblings, 0 replies; 2+ messages in thread
From: arisawa @ 1998-09-02 11:25 UTC (permalink / raw)


Hello 9fans.

I received bug report of 9tftpd from beleos@plan9.cs.unr.edu.

Thanks,

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp

---------------------- bug report ------------------
It is working fine except for one problem - after a number of  
bootp's
(about 10 or so) 9tftpd eventually fails with a
"tftpopen: error (0): no free file descriptors" message.

The file descriptor leak appears to be in the ip2bootf function.
Adding 2 ndbclose() statements appears to fix the problem.

old:
        db = ndbopen(0);
        if(db == 0) return 0;
        if(ipinfo(db, 0, ip, 0, &info) < 0)
                return 0;
        if(info.bootf[0])
                return info.bootf;
        return 0;

new:
        db = ndbopen(0);
        if(db == 0) return 0;
        if(ipinfo(db, 0, ip, 0, &info) < 0) {
                ndbclose(db);
                return 0;
        }
        if(info.bootf[0]) {
                ndbclose(db);
                return info.bootf;
        }
        return 0;





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-09-02 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-18  7:09 [9fans] 9tftpd arisawa
1998-09-02 11:25 arisawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).