/[smecontribs]/rpms/smeserver-tftp-server/contribs8/smeserver-tftp-server-1.0-refuse.patch
ViewVC logotype

Contents of /rpms/smeserver-tftp-server/contribs8/smeserver-tftp-server-1.0-refuse.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Mar 15 10:58:35 2016 UTC (8 years, 8 months ago) by trevorbatley
Branch: MAIN
CVS Tags: smeserver-tftp-server-1_0-4_el5_sme
add -r (--refuse) option [SME 9248]

1 diff -up smeserver-tftp-server-1.0/root/var/service/tftpd/run.refuse smeserver-tftp-server-1.0/root/var/service/tftpd/run
2 --- smeserver-tftp-server-1.0/root/var/service/tftpd/run.refuse 2006-01-21 23:56:00.000000000 +1100
3 +++ smeserver-tftp-server-1.0/root/var/service/tftpd/run 2016-03-15 21:47:04.000000000 +1100
4 @@ -11,6 +11,7 @@
5 #PROP: timeout: VALUES: default/300 (secounds, 900 is the default)
6 #PROP: UDPPort: VALUES: 69
7 #PROP: directory VALUES: /tftpboot (or any other directory)
8 +#PROP: refuse VALUES: <tftp-option> (any tftp option that you need to disable)
9
10 TFTPD_STATUS=$(/sbin/e-smith/db configuration getprop tftpd status);
11 if [ $TFTPD_STATUS == "enabled" ]; then
12 @@ -21,35 +22,41 @@ if [ $TFTPD_STATUS == "enabled" ]; then
13 TFTPD_TIMEOUT=$(/sbin/e-smith/db configuration getprop tftpd timeout);
14 TFTPD_UDPPORT=$(/sbin/e-smith/db configuration getprop tftpd UDPPort);
15 TFTPD_DIRECTORY=$(/sbin/e-smith/db configuration getprop tftpd directory);
16 + TFTPD_REFUSE=$(/sbin/e-smith/db configuration getprop tftpd refuse);
17
18 + TFTPD_ACCESS_SETTING="127.0.0.1";
19 if [ $TFTPD_ACCESS == "public" ]; then
20 - TFTPD_ACCESS_SETTING='0.0.0.0';
21 + TFTPD_ACCESS_SETTING="0.0.0.0";
22 elif [ $TFTPD_ACCESS == "private" ]; then
23 TFTPD_ACCESS_SETTING=$(/sbin/e-smith/db configuration get LocalIP);
24 - else
25 - TFTPD_ACCESS_SETTING='127.0.0.1';
26 fi
27
28 + TFTPD_LOG_SETTING="-v";
29 if [ $TFTPD_LOG == "verbose" ]; then
30 - TFTPD_LOG_SETTING='-vv';
31 - elif [ $TFTPD_LOG == "normal" ]; then
32 - TFTPD_LOG_SETTING='-v';
33 + TFTPD_LOG_SETTING="-vv";
34 fi
35
36 + TFTPD_PRIVILEGE_SETTING=""
37 if [ $TFTPD_PRIVILEGE == "rw" ]; then
38 - TFTPD_PRIVILEGE_SETTING='-c';
39 + TFTPD_PRIVILEGE_SETTING="-c";
40 fi
41
42 + TFTPD_TIMEOUT_SETTING=""
43 if [ $TFTPD_TIMEOUT != "default" ]; then
44 TFTPD_TIMEOUT_SETTING="-t $TFTPD_TIMEOUT";
45 fi
46
47 + TFTPD_REFUSE_SETTING=""
48 + if [ $TFTPD_REFUSE != "" ]; then
49 + TFTPD_REFUSE_SETTING="-r $TFTPD_REFUSE";
50 + fi
51 +
52 cd /
53 exec 2>&1
54 - exec udpsvd -h $TFTPD_LOG_SETTING -u$TFTPD_USER \
55 + exec udpsvd -h $TFTPD_LOG_SETTING -u $TFTPD_USER \
56 $TFTPD_ACCESS_SETTING $TFTPD_UDPPORT \
57 in.tftpd $TFTPD_LOG_SETTING $TFTPD_PRIVILEGE_SETTING \
58 - -u $TFTPD_USER $TFTPD_TIMEOUT_SETTING -s $TFTPD_DIRECTORY
59 + -u $TFTPD_USER $TFTPD_TIMEOUT_SETTING $TFTPD_REFUSE_SETTING -s $TFTPD_DIRECTORY
60 else
61 /usr/bin/runsvctrl down .
62 fi

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed