/[smecontribs]/rpms/smeserver-tftp-server/contribs9/smeserver-tftp-server-1.2-refuse.patch
ViewVC logotype

Annotation of /rpms/smeserver-tftp-server/contribs9/smeserver-tftp-server-1.2-refuse.patch

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


Revision 1.1 - (hide annotations) (download)
Fri Mar 18 09:13:43 2016 UTC (8 years, 7 months ago) by trevorbatley
Branch: MAIN
CVS Tags: smeserver-tftp-server-1_2-4_el6_sme, smeserver-tftp-server-1_2-5_el6_sme, smeserver-tftp-server-1_2-6_el6_sme, smeserver-tftp-server-1_2-3_el6_sme, smeserver-tftp-server-1_2-2_el6_sme, HEAD
[9248] [9316] [9317]

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

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