Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2005 16:39:50 GMT
From:      Denis Grudkin <denis41@icape.nw.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/81732: A typo in tftpd.c
Message-ID:  <200505311639.j4VGdoBW009208@www.freebsd.org>
Resent-Message-ID: <200505311640.j4VGe2oL049063@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
>Number:         81732
>Category:       misc
>Synopsis:       A typo in tftpd.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 31 16:40:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Denis Grudkin
>Release:        FreeBSD 5.4-STABLE
>Organization:
ROKSON network
>Environment:
FreeBSD 5.4-STABLE i386
>Description:
tftpd server in FreeBSD 5.4-STABLE has an option -U to specify umask for newly created files. But then I tried to use this option I got segmentaion fault error. As I can see, the problem is in missed colon in getopt call in tftpd.c
Revision of my tftpd.c is 1.34
>How-To-Repeat:
Run tftpd server with -U option set.      
>Fix:
Looks like all we need is to insert missing colon in tftpd.c

$ diff -u /usr/src/libexec/tftpd/tftpd.c ./tftpd.c 
--- /usr/src/libexec/tftpd/tftpd.c	Mon Aug 16 19:45:24 2004
+++ ./tftpd.c	Tue May 31 20:07:42 2005
@@ -135,7 +135,7 @@
 	tzset();			/* syslog in localtime */
 
 	openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
-	while ((ch = getopt(argc, argv, "cClns:u:Uw")) != -1) {
+	while ((ch = getopt(argc, argv, "cClns:u:U:w")) != -1) {
 		switch (ch) {
 		case 'c':
 			ipchroot = 1;
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505311639.j4VGdoBW009208>