소스 검색

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 년 전
부모
커밋
a995b5dc5b

+ 1
- 0
doc/EN/armbian.org 파일 보기

@@ -62,6 +62,7 @@ sudo su
62 62
 Then clone the Freedombone repository and checkout the stretch development branch.
63 63
 
64 64
 #+begin_src bash
65
+apt-get -y install git dialog build-essential
65 66
 git clone https://github.com/bashrc/freedombone
66 67
 cd freedombone
67 68
 git checkout stretch

+ 2
- 2
doc/EN/beaglebone.org 파일 보기

@@ -38,7 +38,7 @@ You may need to obtain a domain name and set up a dynamic DNS account for your n
38 38
 On your laptop or desktop prepare a microSD card image as follows. To create an image on a Debian based system:
39 39
 
40 40
 #+begin_src bash
41
-sudo apt-get install git
41
+sudo apt-get install git dialog build-essential
42 42
 git clone https://github.com/bashrc/freedombone
43 43
 cd freedombone
44 44
 git checkout stretch
@@ -49,7 +49,7 @@ freedombone-image --setup debian
49 49
 Or on Arch/Parabola:
50 50
 
51 51
 #+begin_src bash
52
-sudo pacman -S git
52
+sudo pacman -S git dialog
53 53
 git clone https://github.com/bashrc/freedombone
54 54
 cd freedombone
55 55
 git checkout stretch

+ 2
- 2
doc/EN/homeserver.org 파일 보기

@@ -20,7 +20,7 @@ The quickest way to get started is as follows. You will need to be running a Deb
20 20
 First install freedombone onto your local system (not the target hardware that you want to run Freedombone on). On a debian based distro:
21 21
 
22 22
 #+begin_src bash
23
-sudo apt-get install git
23
+sudo apt-get install git dialog build-essential
24 24
 git clone https://github.com/bashrc/freedombone
25 25
 cd freedombone
26 26
 git checkout stretch
@@ -32,7 +32,7 @@ freedombone-image -t i386 --onion-addresses-only yes
32 32
 Or on Arch/Parabola:
33 33
 
34 34
 #+begin_src bash
35
-sudo pacman -S git
35
+sudo pacman -S git dialog
36 36
 git clone https://github.com/bashrc/freedombone
37 37
 cd freedombone
38 38
 git checkout stretch

BIN
man/freedombone-template.1.gz 파일 보기


+ 447
- 0
src/freedombone-app-bdsmail 파일 보기

@@ -0,0 +1,447 @@
1
+#!/bin/bash
2
+#
3
+# .---.                  .              .
4
+# |                      |              |
5
+# |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.
6
+# |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'
7
+# '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'
8
+#
9
+#                    Freedom in the Cloud
10
+#
11
+# Brain Dead Simple Mail Server for i2p
12
+#
13
+# License
14
+# =======
15
+#
16
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
17
+#
18
+# This program is free software: you can redistribute it and/or modify
19
+# it under the terms of the GNU Affero General Public License as published by
20
+# the Free Software Foundation, either version 3 of the License, or
21
+# (at your option) any later version.
22
+#
23
+# This program is distributed in the hope that it will be useful,
24
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
+# GNU Affero General Public License for more details.
27
+#
28
+# You should have received a copy of the GNU Affero General Public License
29
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
+
31
+VARIANTS='full full-vim'
32
+
33
+IN_DEFAULT_INSTALL=0
34
+SHOW_ON_ABOUT=1
35
+
36
+BDSMAIL_REPO="https://github.com/majestrate/bdsmail"
37
+BDSMAIL_COMMIT='8fb00a725edea59b31b8d23eb32e0c21972bb723'
38
+BDSMAIL_DIR=/etc/bdsmail
39
+I2P_SAM_PORT=7656
40
+I2P_SMTP_PORT=2525
41
+
42
+bdsmail=(MY_USERNAME)
43
+
44
+function bdsmail_configure_users {
45
+    for d in /home/*/ ; do
46
+        USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
47
+        if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
48
+
49
+            # Add the user to the i2p group
50
+            usermod -a -G i2psvc $USERNAME
51
+
52
+            if [ -f /home/$USERNAME/.muttrc ]; then
53
+                # Create a mutt i2p folder
54
+                if ! grep -q ' =i2p' /home/$USERNAME/.muttrc; then
55
+                    MUTT_MAILBOXES=$(grep "mailboxes =" /home/$USERNAME/.muttrc)
56
+                    sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =i2p|g" /home/$USERNAME/.muttrc
57
+                fi
58
+
59
+                # Create a mutt folder hook to the i2p config
60
+                if ! grep -q 'folder-hook !i2p' /home/$USERNAME/.muttrc; then
61
+                    echo 'folder-hook !i2p/*     source ~/.muttrc' >> /home/$USERNAME/.muttrc
62
+                fi
63
+                if ! grep -q 'folder-hook i2p' /home/$USERNAME/.muttrc; then
64
+                    echo 'folder-hook i2p/*     source ~/.mutt/bdsmail' >> /home/$USERNAME/.muttrc
65
+                fi
66
+            fi
67
+
68
+            # Create a directory where i2p mail will be stored
69
+            if [ ! -d /home/$USERNAME/Maildir/i2p/new ]; then
70
+                mkdir -p /home/$USERNAME/Maildir/i2p/cur
71
+                mkdir -p /home/$USERNAME/Maildir/i2p/new
72
+                chown -R $USERNAME:$USERNAME /home/$USERNAME/Maildir/i2p
73
+            fi
74
+        fi
75
+    done
76
+}
77
+
78
+function logging_on_bdsmail {
79
+    echo -n ''
80
+}
81
+
82
+function logging_off_bdsmail {
83
+    echo -n ''
84
+}
85
+
86
+function remove_user_bdsmail {
87
+    remove_username="$1"
88
+}
89
+
90
+function add_user_bdsmail {
91
+    new_username="$1"
92
+    new_user_password="$2"
93
+
94
+    if [ ! -d /home/$new_username/.mutt ]; then
95
+        mkdir /home/$new_username/.mutt
96
+        cp /etc/skel/.mutt/bdsmail /home/$new_username/.mutt
97
+    fi
98
+    sed -i "s|username|$new_username|g" /home/$new_username/.mutt/bdsmail
99
+    bdsmail_configure_users
100
+    $BDSMAIL_DIR/bin/mailtool $BDSMAIL_DIR/config.ini $new_username /home/$new_username/Maildir/i2p
101
+    chown -R $new_username:$new_username /home/$new_username/.mutt
102
+    echo '0'
103
+}
104
+
105
+function install_interactive_bdsmail {
106
+    echo -n ''
107
+    APP_INSTALLED=1
108
+}
109
+
110
+function change_password_bdsmail {
111
+    curr_username="$1"
112
+    new_user_password="$2"
113
+}
114
+
115
+function bdsmail_update_domain {
116
+    sed -i "s|set from=.*|set from=username@$(bdsmail_domain)|g" /etc/skel/.mutt/bdsmail
117
+    for d in /home/*/ ; do
118
+        USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
119
+        if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
120
+            cp /etc/skel/.mutt/bdsmail /home/${USERNAME}/.mutt/bdsmail
121
+            sed -i "s|set from=.*|set from=${USERNAME}@$(bdsmail_domain)|g" /home/${USERNAME}/.mutt/bdsmail
122
+            chown ${USERNAME}:${USERNAME} /home/${USERNAME}/.mutt/bdsmail
123
+        fi
124
+    done
125
+}
126
+
127
+function bdsmail_wait_for_key_generation {
128
+    # wait for domain to be generated by the daemon
129
+    # This can take a while, probably because i2p is connecting
130
+    bds_domain=
131
+    sleep_ctr=0
132
+    while [ ! $bds_domain ]; do
133
+        echo $"Waiting for i2p domain to be generated ${sleep_ctr}/100"
134
+        systemctl restart bdsmail
135
+        sleep 30
136
+        bds_domain=$(bdsmail_domain)
137
+        sleep_ctr=$((sleep_ctr + 1))
138
+        if [ $sleep_ctr -gt 100 ]; then
139
+            break
140
+        fi
141
+    done
142
+}
143
+
144
+function reconfigure_bdsmail {
145
+    systemctl stop bdsmail
146
+    rm $BDSMAIL_DIR/*.dat
147
+    rm $BDSMAIL_DIR/*.pem
148
+    bdsmail_wait_for_key_generation
149
+    if [ ! -f $BDSMAIL_DIR/bdsmail-privkey.dat ]; then
150
+        return
151
+    fi
152
+    bdsmail_update_domain
153
+}
154
+
155
+function upgrade_bdsmail {
156
+    CURR_BDSMAIL_COMMIT=$(get_completion_param "bdsmail commit")
157
+    if [[ "$CURR_BDSMAIL_COMMIT" == "$BDSMAIL_COMMIT" ]]; then
158
+        return
159
+    fi
160
+
161
+    # update to the next commit
162
+    set_repo_commit $BDSMAIL_DIR "bdsmail commit" "$BDSMAIL_COMMIT" $BDSMAIL_REPO
163
+    cd $BDSMAIL_DIR
164
+    make GOROOT=/home/go/go${GO_VERSION}
165
+    chown -R i2psvc:i2psvc $BDSMAIL_DIR
166
+    systemctl restart bdsmail
167
+
168
+    if ! grep -q "$(bdsmail_domain)" /etc/skel/.mutt/bdsmail; then
169
+        bdsmail_update_domain
170
+    fi
171
+}
172
+
173
+function backup_local_bdsmail {
174
+    systemctl stop bdsmail
175
+
176
+    source_directory=$BDSMAIL_DIR
177
+
178
+    function_check backup_directory_to_usb
179
+    dest_directory=bdsmail
180
+    backup_directory_to_usb $source_directory $dest_directory
181
+
182
+    systemctl start bdsmail
183
+}
184
+
185
+function restore_local_bdsmail {
186
+    systemctl stop bdsmail
187
+
188
+    temp_restore_dir=/root/tempbdsmail
189
+    bdsmail_dir=$BDSMAIL_DIR
190
+
191
+    function_check restore_directory_from_usb
192
+    restore_directory_from_usb $temp_restore_dir bdsmail
193
+    if [ -d $temp_restore_dir ]; then
194
+        if [ -d cp $temp_restore_dir$bdsmail_dir ]; then
195
+            cp -rp $temp_restore_dir$bdsmail_dir $bdsmail_dir/
196
+        else
197
+            if [ ! -d $bdsmail_dir ]; then
198
+                mkdir $bdsmail_dir
199
+            fi
200
+            cp -rp $temp_restore_dir/* $bdsmail_dir
201
+        fi
202
+        chown -R i2psvc:i2psvc $bdsmail_dir
203
+        rm -rf $temp_restore_dir
204
+    fi
205
+
206
+    systemctl start bdsmail
207
+}
208
+
209
+function backup_remote_bdsmail {
210
+    systemctl stop bdsmail
211
+
212
+    source_directory=$BDSMAIL_DIR
213
+
214
+    function_check backup_directory_to_friend
215
+    dest_directory=bdsmail
216
+    backup_directory_to_friend $source_directory $dest_directory
217
+
218
+    systemctl start bdsmail
219
+}
220
+
221
+function restore_remote_bdsmail {
222
+    systemctl stop bdsmail
223
+
224
+    temp_restore_dir=/root/tempbdsmail
225
+    bdsmail_dir=$BDSMAIL_DIR
226
+
227
+    function_check restore_directory_from_friend
228
+    restore_directory_from_friend $temp_restore_dir bdsmail
229
+    if [ -d $temp_restore_dir ]; then
230
+        if [ -d cp $temp_restore_dir$bdsmail_dir ]; then
231
+            cp -rp $temp_restore_dir$bdsmail_dir $bdsmail_dir/
232
+        else
233
+            if [ ! -d $bdsmail_dir ]; then
234
+                mkdir $bdsmail_dir
235
+            fi
236
+            cp -rp $temp_restore_dir/* $bdsmail_dir
237
+        fi
238
+        chown -R i2psvc:i2psvc $bdsmail_dir
239
+        rm -rf $temp_restore_dir
240
+    fi
241
+
242
+    systemctl start bdsmail
243
+}
244
+
245
+function remove_bdsmail {
246
+    if [ -f /etc/systemd/system/bdsmail.service ]; then
247
+        systemctl stop bdsmail
248
+        systemctl disable bdsmail
249
+        rm /etc/systemd/system/bdsmail.service
250
+    fi
251
+
252
+    for d in /home/*/ ; do
253
+        USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
254
+        if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
255
+            # remove the user from the i2p group
256
+            deluser $USERNAME i2psvc
257
+
258
+            # Remove mutt folder hook to the i2p config
259
+            if [ -f /home/$USERNAME/.muttrc ]; then
260
+                if grep -q 'folder-hook !i2p' /home/$USERNAME/.muttrc; then
261
+                    sed -i '/folder-hook !i2p/d' /home/$USERNAME/.muttrc
262
+                fi
263
+                if grep -q 'folder-hook i2p' /home/$USERNAME/.muttrc; then
264
+                    sed -i '/folder-hook i2p/d' /home/$USERNAME/.muttrc
265
+                fi
266
+            fi
267
+
268
+            # Remove folder
269
+            if grep -q ' =i2p' /home/$USERNAME/.muttrc; then
270
+                sed -i 's| =i2p||g' /home/$USERNAME/.muttrc
271
+            fi
272
+
273
+            # NOTE: leave Maildir/i2p/cur. We might want to archive that
274
+            # or just be reinstalling the system without losing mail
275
+            rm -rf /home/$USERNAME/Maildir/i2p/new
276
+        fi
277
+    done
278
+
279
+    remove_i2p
280
+    remove_app bdsmail
281
+    remove_completion_param install_bdsmail
282
+    sed -i '/bdsmail/d' $COMPLETION_FILE
283
+    rm -rf /etc/skel/.mutt
284
+    if [ -d $BDSMAIL_DIR ]; then
285
+        rm -rf $BDSMAIL_DIR
286
+    fi
287
+    rm /usr/bin/bdsmail_domain
288
+    sed -i '/bdsmail_distribute/d' /etc/crontab
289
+    rm /usr/bin/bdsmail_distribute
290
+    if [ -f /etc/skel/.mutt/bdsmail ]; then
291
+        rm /etc/skel/.mutt/bdsmail
292
+    fi
293
+}
294
+
295
+function install_bdsmail {
296
+    if [ -d $BDSMAIL_DIR ]; then
297
+        remove_bdsmail
298
+    fi
299
+
300
+    if [ -d /repos/bdsmail ]; then
301
+        mkdir $BDSMAIL_DIR
302
+        cp -r -p /repos/bdsmail/. $BDSMAIL_DIR
303
+        cd $BDSMAIL_DIR
304
+        git pull
305
+    else
306
+        git_clone $BDSMAIL_REPO $BDSMAIL_DIR
307
+    fi
308
+
309
+    if [ ! -d $BDSMAIL_DIR ]; then
310
+        echo $'Unable to clone bdsmail repo'
311
+        exit 5735735
312
+    fi
313
+
314
+    cd $BDSMAIL_DIR
315
+    git checkout $BDSMAIL_COMMIT -b $BDSMAIL_COMMIT
316
+    set_completion_param "bdsmail commit" "$BDSMAIL_COMMIT"
317
+
318
+    mkdir -p $BDSMAIL_DIR/Maildir/i2p
319
+    chmod -R 700 $BDSMAIL_DIR/Maildir
320
+
321
+    make GOROOT=/home/go/go${GO_VERSION}
322
+    if [ ! -f $BDSMAIL_DIR/bin/bdsconfig ]; then
323
+        echo $'Unable to make bdsmail'
324
+        exit 87923567842
325
+    fi
326
+
327
+    install_i2p
328
+    i2p_enable_sam
329
+
330
+    # create configuration file
331
+    $BDSMAIL_DIR/bin/bdsconfig > $BDSMAIL_DIR/config.ini
332
+    echo '[maild]' > $BDSMAIL_DIR/config.ini
333
+    echo "i2paddr = 127.0.0.1:$I2P_SAM_PORT" >> $BDSMAIL_DIR/config.ini
334
+    echo 'i2pkeyfile = bdsmail-privkey.dat' >> $BDSMAIL_DIR/config.ini
335
+    echo "bindmail = 127.0.0.1:$I2P_SMTP_PORT" >> $BDSMAIL_DIR/config.ini
336
+    echo 'bindweb = 127.0.0.1:8489' >> $BDSMAIL_DIR/config.ini
337
+    echo 'bindpop3 = 127.0.0.1:1110' >> $BDSMAIL_DIR/config.ini
338
+    echo 'domain = localhost' >> $BDSMAIL_DIR/config.ini
339
+    echo 'maildir = Maildir/i2p' >> $BDSMAIL_DIR/config.ini
340
+    echo 'database = localhost.sqlite' >> $BDSMAIL_DIR/config.ini
341
+    echo 'assets = contrib/assets/web' >> $BDSMAIL_DIR/config.ini
342
+
343
+    echo '[Unit]' > /etc/systemd/system/bdsmail.service
344
+    echo 'Description=bdsmail' >> /etc/systemd/system/bdsmail.service
345
+    echo 'After=syslog.target' >> /etc/systemd/system/bdsmail.service
346
+    echo 'After=network.target' >> /etc/systemd/system/bdsmail.service
347
+    echo '' >> /etc/systemd/system/bdsmail.service
348
+    echo '[Service]' >> /etc/systemd/system/bdsmail.service
349
+    echo 'Type=simple' >> /etc/systemd/system/bdsmail.service
350
+    echo 'User=i2psvc' >> /etc/systemd/system/bdsmail.service
351
+    echo 'Group=i2psvc' >> /etc/systemd/system/bdsmail.service
352
+    echo "WorkingDirectory=$BDSMAIL_DIR" >> /etc/systemd/system/bdsmail.service
353
+    echo "ExecStart=$BDSMAIL_DIR/bin/maild $BDSMAIL_DIR/config.ini" >> /etc/systemd/system/bdsmail.service
354
+    echo 'Restart=always' >> /etc/systemd/system/bdsmail.service
355
+    echo 'Environment="USER=i2psvc"' >> /etc/systemd/system/bdsmail.service
356
+    echo '' >> /etc/systemd/system/bdsmail.service
357
+    echo '[Install]' >> /etc/systemd/system/bdsmail.service
358
+    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/bdsmail.service
359
+
360
+    echo '#!/usr/bin/env python2' > $BDSMAIL_DIR/get_address
361
+    echo 'import base64, hashlib, sys' >> $BDSMAIL_DIR/get_address
362
+    echo 'with open(sys.argv[1]) as f:' >> $BDSMAIL_DIR/get_address
363
+    echo "    print(base64.b32encode(hashlib.sha256(base64.b64decode(f.read(516), '-~')).digest()).strip('=')+\".b32.i2p\")" >> $BDSMAIL_DIR/get_address
364
+    chmod +x $BDSMAIL_DIR/get_address
365
+
366
+    chown -R i2psvc:i2psvc $BDSMAIL_DIR
367
+    systemctl enable bdsmail
368
+    systemctl start bdsmail
369
+
370
+    echo '#!/bin/bash' > /usr/bin/bdsmail_distribute
371
+    echo "BDSMAIL_DIR=$BDSMAIL_DIR" >> /usr/bin/bdsmail_distribute
372
+    echo "MAIL_DIR=\$BDSMAIL_DIR/\$(cat \$BDSMAIL_DIR/config.ini | grep 'maildir =' | awk -F ' ' '{print \$3}')" >> /usr/bin/bdsmail_distribute
373
+    echo 'if [ ! -d $MAIL_DIR/postmaster/new ]; then' >> /usr/bin/bdsmail_distribute
374
+    echo '    exit 0' >> /usr/bin/bdsmail_distribute
375
+    echo 'fi' >> /usr/bin/bdsmail_distribute
376
+    echo 'for filename in $MAIL_DIR/postmaster/new/*; do' >> /usr/bin/bdsmail_distribute
377
+    echo '    to_line=$(cat $filename | grep "To: " | head -n 1)' >> /usr/bin/bdsmail_distribute
378
+    echo "    to_username=\$(echo \"\$to_line\" | awk -F ' ' '{print \$2}' | awk -F '@' '{print \$1}')" >> /usr/bin/bdsmail_distribute
379
+    echo '    if [ -d /home/$to_username/Maildir/i2p/new ]; then' >> /usr/bin/bdsmail_distribute
380
+    echo '        chown $to_username:$to_username $filename' >> /usr/bin/bdsmail_distribute
381
+    echo '        chmod 600 $filename' >> /usr/bin/bdsmail_distribute
382
+    echo '        mv $filename /home/$to_username/Maildir/i2p/new' >> /usr/bin/bdsmail_distribute
383
+    echo '    fi' >> /usr/bin/bdsmail_distribute
384
+    echo 'done' >> /usr/bin/bdsmail_distribute
385
+    chmod +x /usr/bin/bdsmail_distribute
386
+
387
+    if ! grep -q 'bdsmail_distribute' /etc/crontab; then
388
+        echo '*/1            * *   *   *   root /usr/bin/bdsmail_distribute 2> /dev/null' >> /etc/crontab
389
+    fi
390
+
391
+    echo '#!/bin/bash' > /usr/bin/bdsmail_domain
392
+    echo "cd $BDSMAIL_DIR" >> /usr/bin/bdsmail_domain
393
+    echo 'if [ ! -f bdsmail-privkey.dat ]; then' >> /usr/bin/bdsmail_domain
394
+    echo '    exit 1' >> /usr/bin/bdsmail_domain
395
+    echo 'fi' >> /usr/bin/bdsmail_domain
396
+    echo "python2 get_address bdsmail-privkey.dat | tr '[:upper:]' '[:lower:]'" >> /usr/bin/bdsmail_domain
397
+    chmod +x /usr/bin/bdsmail_domain
398
+
399
+    echo ''
400
+    echo $'Now we will wait for i2p to connect and a private key to be generated'
401
+    echo $'This may take a while.'
402
+    echo ''
403
+
404
+    bdsmail_wait_for_key_generation
405
+
406
+    if [ ! $bds_domain ]; then
407
+        systemctl stop bdsmail
408
+        systemctl disable bdsmail
409
+        remove_i2p
410
+        echo $'Failed to get the bdsmail domain'
411
+        exit 8934638
412
+    fi
413
+
414
+    bdsmail_admin_password="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
415
+    ${PROJECT_NAME}-pass -u $MY_USERNAME -a bdsmail -p "$bdsmail_admin_password"
416
+    $BDSMAIL_DIR/bin/mailtool $BDSMAIL_DIR/config.ini admin $BDSMAIL_DIR/Maildir/i2p/admin "$bdsmail_admin_password"
417
+
418
+    # Create mutt configuration
419
+    if [ ! -d /etc/skel/.mutt ]; then
420
+        mkdir /etc/skel/.mutt
421
+    fi
422
+    echo 'set mbox_type=Maildir' > /etc/skel/.mutt/bdsmail
423
+    echo "set smtp_url=smtp://admin:${bdsmail_admin_password}@127.0.0.1:$I2P_SMTP_PORT/" >> /etc/skel/.mutt/bdsmail
424
+    echo 'set use_from=yes' >> /etc/skel/.mutt/bdsmail
425
+    echo "set from=username@${bds_domain}" >> /etc/skel/.mutt/bdsmail
426
+    echo "set spoolfile=~/Maildir/i2p" >> /etc/skel/.mutt/bdsmail
427
+    echo 'set pgp_autoencrypt=no' >> /etc/skel/.mutt/bdsmail
428
+    echo 'set pgp_replyencrypt=no' >> /etc/skel/.mutt/bdsmail
429
+    echo 'set pgp_autosign=no' >> /etc/skel/.mutt/bdsmail
430
+    echo 'set pgp_replysign=no' >> /etc/skel/.mutt/bdsmail
431
+
432
+    # mutt configuration for the admin user
433
+    if [ ! -d /home/$MY_USERNAME/.mutt ]; then
434
+        mkdir /home/$MY_USERNAME/.mutt
435
+    fi
436
+    cp /etc/skel/.mutt/bdsmail /home/$MY_USERNAME/.mutt
437
+    sed -i "s|username|$MY_USERNAME|g" /home/$MY_USERNAME/.mutt/bdsmail
438
+    chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.mutt
439
+
440
+    bdsmail_configure_users
441
+
442
+    $BDSMAIL_DIR/bin/mailtool $BDSMAIL_DIR/config.ini $MY_USERNAME /home/$MY_USERNAME/Maildir/i2p
443
+
444
+    APP_INSTALLED=1
445
+}
446
+
447
+# NOTE: deliberately there is no "exit 0"

+ 13
- 6
src/freedombone-app-peertube 파일 보기

@@ -51,6 +51,7 @@ peertube_variables=(PEERTUBE_DOMAIN_NAME
51 51
                     ONION_ONLY
52 52
                     DDNS_PROVIDER
53 53
                     MY_USERNAME
54
+                    ARCHITECTURE
54 55
                     MY_EMAIL_ADDRESS)
55 56
 
56 57
 function peertube_create_database {
@@ -140,8 +141,8 @@ function peertube_disable_signups {
140 141
            --yesno $"\nDo you wish to disable further PeerTube signups?" 8 75
141 142
     sel=$?
142 143
     case $sel in
143
-        0) sed "0,/RE/s/enabled:.*/enabled: false/" $PEERTUBE_DIR/config/production.yaml;;
144
-        1) sed "0,/RE/s/enabled:.*/enabled: true/" $PEERTUBE_DIR/config/production.yaml;;
144
+        0) sed -i "0,/enabled:.*/s//enabled: false/" $PEERTUBE_DIR/config/production.yaml;;
145
+        1) sed -i "0,/enabled:.*/s//enabled: true/" $PEERTUBE_DIR/config/production.yaml;;
145 146
         255) return;;
146 147
     esac
147 148
 
@@ -341,9 +342,8 @@ function remove_peertube {
341 342
     sed -i '/peertube/d' $COMPLETION_FILE
342 343
 
343 344
     function_check drop_database_postgresql
344
-    drop_database_postgresql peertube
345
+    drop_database_postgresql peertube peertube
345 346
 
346
-    remove_postgresql_user peertube
347 347
     groupdel -f peertube
348 348
     userdel -r peertube
349 349
 
@@ -589,11 +589,12 @@ function peertube_create_config {
589 589
     echo '    size: 10 # Max number of previews you want to cache' >> $peertube_config_file
590 590
     echo '' >> $peertube_config_file
591 591
     echo 'admin:' >> $peertube_config_file
592
-    echo "  email: 'root@local'" >> $peertube_config_file
592
+    # This is deliberately a dummy email address
593
+    echo "  email: 'testuser@testdomain.net'" >> $peertube_config_file
593 594
     echo '' >> $peertube_config_file
594 595
     echo 'signup:' >> $peertube_config_file
595 596
     echo '  enabled: true' >> $peertube_config_file
596
-    echo '  limit: 2 # When the limit is reached, registrations are disabled. -1 == unlimited' >> $peertube_config_file
597
+    echo '  limit: 5 # When the limit is reached, registrations are disabled. -1 == unlimited' >> $peertube_config_file
597 598
     echo '' >> $peertube_config_file
598 599
     echo 'user:' >> $peertube_config_file
599 600
     echo '  # Default value of maximum video BYTES the user can upload (does not take into account transcoded files).' >> $peertube_config_file
@@ -829,6 +830,12 @@ function install_peertube {
829 830
     systemctl start peertube
830 831
     systemctl restart nginx
831 832
 
833
+    # wait for the database to get generated after initial peertube daemon start
834
+    sleep 10
835
+
836
+    # update the admin email address after creation of the database
837
+    sed -i "s|email: .*|email: '$MY_EMAIL_ADDRESS'|g" $PEERTUBE_DIR/config/production.yaml
838
+
832 839
     set_completion_param "peertube domain" "$PEERTUBE_DOMAIN_NAME"
833 840
     APP_INSTALLED=1
834 841
 }

+ 10
- 2
src/freedombone-app-rss 파일 보기

@@ -428,7 +428,11 @@ function install_rss_main {
428 428
     echo '    deny all;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
429 429
     echo '  }' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
430 430
     echo '' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
431
-    echo '  add_header X-Frame-Options DENY;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
431
+    echo '  add_header X-XSS-Protection "1; mode=block";' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
432
+    echo '  add_header X-Robots-Tag none;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
433
+    echo '  add_header X-Download-Options noopen;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
434
+    echo '  add_header X-Permitted-Cross-Domain-Policies none;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
435
+    echo '  add_header X-Frame-Options SAMEORIGIN;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
432 436
     echo '  add_header X-Content-Type-Options nosniff;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
433 437
     echo '  client_max_body_size 15m;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
434 438
     echo '}' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
@@ -482,7 +486,11 @@ function install_rss_main {
482 486
     echo '    deny all;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
483 487
     echo '  }' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
484 488
     echo '' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
485
-    echo '  add_header X-Frame-Options DENY;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
489
+    echo '  add_header X-XSS-Protection "1; mode=block";' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
490
+    echo '  add_header X-Robots-Tag none;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
491
+    echo '  add_header X-Download-Options noopen;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
492
+    echo '  add_header X-Permitted-Cross-Domain-Policies none;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
493
+    echo '  add_header X-Frame-Options SAMEORIGIN;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
486 494
     echo '  add_header X-Content-Type-Options nosniff;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
487 495
     echo '  client_max_body_size 15m;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
488 496
     echo '}' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME

+ 5
- 1
src/freedombone-backup-local 파일 보기

@@ -13,7 +13,7 @@
13 13
 # License
14 14
 # =======
15 15
 #
16
-# Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
17 17
 #
18 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -177,6 +177,10 @@ function backup_users {
177 177
                 fi
178 178
                 backup_directory_to_usb /home/$USERNAME/tempbackup mutt/$USERNAME
179 179
             fi
180
+            if [ -d /home/$USERNAME/.mutt ]; then
181
+                echo $"Backing up Mutt configurations for $USERNAME"
182
+                backup_directory_to_usb /home/$USERNAME/.mutt mutt/${USERNAME}configs
183
+            fi
180 184
 
181 185
             # Backup email
182 186
             if [ -d /home/$USERNAME/Maildir ]; then

+ 4
- 0
src/freedombone-backup-remote 파일 보기

@@ -231,6 +231,10 @@ function backup_users {
231 231
                 fi
232 232
                 backup_directory_to_friend /home/$USERNAME/tempbackup mutt/$USERNAME
233 233
             fi
234
+            if [ -d /home/$USERNAME/.mutt ]; then
235
+                echo $"Backing up Mutt configurations for $USERNAME"
236
+                backup_directory_to_friend /home/$USERNAME/.mutt mutt/${USERNAME}configs
237
+            fi
234 238
 
235 239
             # procmail settings
236 240
             if [ -f /home/$USERNAME/.procmailrc ]; then

+ 33
- 17
src/freedombone-controlpanel-user 파일 보기

@@ -882,6 +882,20 @@ function menu_run_client_app {
882 882
     fi
883 883
 }
884 884
 
885
+function show_your_email_address {
886
+    GPG_FINGERPRINT=$(gpg --fingerprint $GPG_ID | sed -n '2p' | sed 's/^[ \t]*//')
887
+    GPG_DATE=$(gpg --fingerprint $GPG_ID | grep -i "pub" | head -n 1 | awk -F ' ' '{print $3}')
888
+    if [ ! -d /etc/bdsmail ]; then
889
+        dialog --title $"Show your Email Address" \
890
+               --backtitle $"Freedombone User Control Panel" \
891
+               --msgbox $"Email Address: $MY_EMAIL_ADDRESS\n\nKey ID: $GPG_ID\n\nFingerprint: $GPG_FINGERPRINT\n\nCreated: $GPG_DATE" 12 70
892
+    else
893
+        dialog --title $"Show your Email Address" \
894
+               --backtitle $"Freedombone User Control Panel" \
895
+               --msgbox $"\nYou can press SHIFT and then drag the mouse and right click to copy.\n\nEmail Address: $MY_EMAIL_ADDRESS\n\nKey ID: $GPG_ID\n\nFingerprint: $GPG_FINGERPRINT\n\nCreated: $GPG_DATE\n\nI2P Address: ${USER}@$(bdsmail_domain)" 17 90
896
+    fi
897
+}
898
+
885 899
 function menu_top_level {
886 900
     while true
887 901
     do
@@ -889,16 +903,17 @@ function menu_top_level {
889 903
         trap "rm -f $data" 0 1 2 5 15
890 904
         dialog --backtitle $"Freedombone User Control Panel" \
891 905
                --title $"User Control Panel" \
892
-               --radiolist $"Choose an operation:" 19 50 12 \
906
+               --radiolist $"Choose an operation:" 20 60 13 \
893 907
                1 $"Use Email" off \
894
-               2 $"Change Email Filtering Rules" off \
895
-               3 $"Run an App" off \
896
-               4 $"Browse the Web" off \
897
-               5 $"My Encryption Keys" off \
898
-               6 $"Set an outgoing email proxy" off \
899
-               7 $"Administrator controls" off \
900
-               8 $"Exit to the command line" off \
901
-               9 $"Log out" on 2> $data
908
+               2 $"Show your Email Address" off \
909
+               3 $"Change Email Filtering/Blocking Rules" off \
910
+               4 $"Run an App" off \
911
+               5 $"Browse the Web" off \
912
+               6 $"My Encryption Keys" off \
913
+               7 $"Set an outgoing email proxy" off \
914
+               8 $"Administrator controls" off \
915
+               9 $"Exit to the command line" off \
916
+               10 $"Log out" on 2> $data
902 917
         sel=$?
903 918
         case $sel in
904 919
             1) rm $data
@@ -908,15 +923,16 @@ function menu_top_level {
908 923
         esac
909 924
         case $(cat $data) in
910 925
             1) mutt;;
911
-            2) menu_email;;
912
-            3) menu_run_client_app;;
913
-            4) torify elinks -no-home;;
914
-            5) menu_encryption_keys;;
915
-            6) smtp_proxy;;
916
-            7) menu_admin;;
917
-            8) rm $data
926
+            2) show_your_email_address;;
927
+            3) menu_email;;
928
+            4) menu_run_client_app;;
929
+            5) torify elinks -no-home;;
930
+            6) menu_encryption_keys;;
931
+            7) smtp_proxy;;
932
+            8) menu_admin;;
933
+            9) rm $data
918 934
                break;;
919
-            9) kill -HUP `pgrep -s 0 -o`;;
935
+            10) kill -HUP `pgrep -s 0 -o`;;
920 936
         esac
921 937
         rm $data
922 938
     done

+ 1
- 0
src/freedombone-image-customise 파일 보기

@@ -1946,6 +1946,7 @@ function image_preinstall_repos {
1946 1946
     git clone $PEERTUBE_REPO $rootdir/repos/peertube
1947 1947
     git clone $PRIVATEBIN_REPO $rootdir/repos/privatebin
1948 1948
     git clone $EDITH_REPO $rootdir/repos/edith
1949
+    git clone $BDSMAIL_REPO $rootdir/repos/bdsmail
1949 1950
     #git clone $WEKAN_REPO $rootdir/repos/wekan
1950 1951
     #git clone $FLOW_ROUTER_REPO $rootdir/repos/flowrouter
1951 1952
     #git clone $METEOR_USERACCOUNTS_REPO $rootdir/repos/meteoruseraccounts

+ 8
- 0
src/freedombone-restore-local 파일 보기

@@ -404,10 +404,18 @@ function restore_mutt_settings {
404 404
     if [ -d $USB_MOUNT/backup/mutt ]; then
405 405
         for d in $USB_MOUNT/backup/mutt/*/ ; do
406 406
             USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
407
+
408
+            # skip over configurations
409
+            if [[ "$USERNAME" == *'configs' ]]; then
410
+                continue
411
+            fi
412
+
407 413
             if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
408 414
                 if [ ! -d /home/$USERNAME ]; then
409 415
                     ${PROJECT_NAME}-adduser $USERNAME
410 416
                 fi
417
+                echo $"Restoring Mutt configurations for $USERNAME"
418
+                restore_directory_from_usb /home/$USERNAME/.mutt mutt/${USERNAME}configs
411 419
                 echo $"Restoring Mutt settings for $USERNAME"
412 420
                 temp_restore_dir=/root/tempmutt
413 421
                 restore_directory_from_usb $temp_restore_dir mutt/$USERNAME

+ 8
- 0
src/freedombone-restore-remote 파일 보기

@@ -360,11 +360,19 @@ function restore_mutt_settings {
360 360
     fi
361 361
     for d in $SERVER_DIRECTORY/backup/mutt/*/ ; do
362 362
         USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
363
+
364
+        # skip over configurations
365
+        if [[ "$USERNAME" == *'configs' ]]; then
366
+            continue
367
+        fi
368
+
363 369
         if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
364 370
             if [ -d $SERVER_DIRECTORY/backup/mutt/$USERNAME ]; then
365 371
                 if [ ! -d /home/$USERNAME ]; then
366 372
                     ${PROJECT_NAME}-adduser $USERNAME
367 373
                 fi
374
+                echo $"Restoring Mutt configurations for $USERNAME"
375
+                restore_directory_from_friend /home/$USERNAME/.mutt mutt/${USERNAME}configs
368 376
                 echo $"Restoring Mutt settings for $USERNAME"
369 377
                 temp_restore_dir=/root/tempmutt
370 378
                 restore_directory_from_friend ${temp_restore_dir} mutt/$USERNAME

+ 6
- 0
src/freedombone-tests 파일 보기

@@ -892,6 +892,12 @@ function test_stig {
892 892
     output "SV-86927r2_rule" $? ${SETLANG}
893 893
     ################
894 894
 
895
+    ##Check that pam_python is not installed
896
+    bash $STIG_TESTS_DIR/check-ssh.sh pam_python >/dev/null 2>&1 &
897
+    stig_spinner $!
898
+    output "SV-86724r2_rule" $? ${SETLANG}
899
+    ################
900
+
895 901
     ##RHEL-06-000247
896 902
     ##The system clock must be synchronized continuously, or at least daily.
897 903
 

+ 1
- 1
src/freedombone-utils-firewall 파일 보기

@@ -265,7 +265,7 @@ function configure_internet_protocol {
265 265
     if ! grep -q "ignore pings" /etc/sysctl.conf; then
266 266
         echo '# ignore pings' >> /etc/sysctl.conf
267 267
         echo 'net.ipv4.icmp_echo_ignore_all = 1' >> /etc/sysctl.conf
268
-        echo 'net.ipv6.icmp_echo_ignore_all = 1' >> /etc/sysctl.conf
268
+        #echo 'net.ipv6.icmp_echo_ignore_all = 1' >> /etc/sysctl.conf
269 269
     fi
270 270
     if ! grep -q "disable ipv6" /etc/sysctl.conf; then
271 271
         echo '# disable ipv6' >> /etc/sysctl.conf

+ 1
- 1
src/freedombone-utils-go 파일 보기

@@ -32,7 +32,7 @@
32 32
 # before getting to the version we want
33 33
 GO_INTERMEDIATE_VERSION=1.4.2
34 34
 
35
-GO_VERSION=1.9
35
+GO_VERSION=1.9.4
36 36
 
37 37
 GO_REPO="https://go.googlesource.com/go"
38 38
 GO_PACKAGE_MANAGER_REPO="https://github.com/gpmgo/gopm"

+ 101
- 0
src/freedombone-utils-i2p 파일 보기

@@ -0,0 +1,101 @@
1
+#!/bin/bash
2
+#
3
+# .---.                  .              .
4
+# |                      |              |
5
+# |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.
6
+# |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'
7
+# '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'
8
+#
9
+#                    Freedom in the Cloud
10
+#
11
+# i2p functions
12
+#
13
+# There's a problem with installing this onto mesh images, which is
14
+# that qemu appears to run out of RAM when using yarn to add webpack.
15
+#
16
+# License
17
+# =======
18
+#
19
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
20
+#
21
+# This program is free software: you can redistribute it and/or modify
22
+# it under the terms of the GNU Affero General Public License as published by
23
+# the Free Software Foundation, either version 3 of the License, or
24
+# (at your option) any later version.
25
+#
26
+# This program is distributed in the hope that it will be useful,
27
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
+# GNU Affero General Public License for more details.
30
+#
31
+# You should have received a copy of the GNU Affero General Public License
32
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
33
+
34
+I2P_DOMAIN='deb.i2p2.de'
35
+
36
+function install_i2p {
37
+    if [ ! -d $INSTALL_DIR ]; then
38
+       mkdir -p $INSTALL_DIR
39
+    fi
40
+
41
+    # install the gpg key
42
+    cd $INSTALL_DIR
43
+    if [ -f i2p-debian-repo.key.asc ]; then
44
+        rm i2p-debian-repo.key.asc
45
+    fi
46
+    wget https://geti2p.net/_static/i2p-debian-repo.key.asc
47
+    if [ ! -f i2p-debian-repo.key.asc ]; then
48
+        echo $'failed to ontain i2p repo gpg key'
49
+        exit 7834627345
50
+    fi
51
+    apt-key add i2p-debian-repo.key.asc
52
+
53
+    echo "deb https://${I2P_DOMAIN}/ stretch main" > /etc/apt/sources.list.d/i2p.list
54
+    echo "deb-src https://${I2P_DOMAIN}/ stretch main" >> /etc/apt/sources.list.d/i2p.list
55
+
56
+    # i2p needs ipv6 to be enabled
57
+    sed -i 's|net.ipv6.conf.all.disable_ipv6.*|net.ipv6.conf.all.disable_ipv6 = 0|g' /etc/sysctl.conf
58
+    /sbin/sysctl -p -q
59
+
60
+    apt-get update
61
+    apt-get -yq install i2p i2p-keyring
62
+    systemctl restart i2p
63
+}
64
+
65
+function remove_i2p {
66
+    apt-get -yq remove i2p-router --purge
67
+    apt-get -yq remove i2p --purge
68
+    apt-get -yq remove i2p-keyring --purge
69
+    apt-get -yq autoremove
70
+
71
+    # It's assumed here that ipv6 is only needed for i2p
72
+    # This might not be true in future
73
+    sed -i 's|net.ipv6.conf.all.disable_ipv6.*|net.ipv6.conf.all.disable_ipv6 = 1|g' /etc/sysctl.conf
74
+    /sbin/sysctl -p -q
75
+
76
+    if [ -d /var/lib/i2p ]; then
77
+        rm -rf /var/lib/i2p
78
+    fi
79
+    if [ -d /etc/i2p ]; then
80
+        rm -rf /etc/i2p
81
+    fi
82
+    if [ -d /usr/share/i2p ]; then
83
+        rm -rf /usr/share/i2p
84
+    fi
85
+}
86
+
87
+function i2p_enable_sam {
88
+    if [ ! -f /var/lib/i2p/i2p-config/clients.config ]; then
89
+        apt-get -yq remove i2p --purge
90
+        apt-get -yq remove i2p-router --purge
91
+        apt-get -yq install i2p
92
+        apt-get -yq install i2p-router
93
+        sleep 2
94
+    fi
95
+    if [ ! -f /var/lib/i2p/i2p-config/clients.config ]; then
96
+        echo $'File not found /var/lib/i2p/i2p-config/clients.config'
97
+        exit 483648364834
98
+    fi
99
+    sed -i 's|clientApp.1.startOnLoad=.*|clientApp.1.startOnLoad=true|g' /var/lib/i2p/i2p-config/clients.config
100
+    systemctl restart i2p
101
+}

+ 1
- 1
src/freedombone-utils-nodejs 파일 보기

@@ -205,7 +205,7 @@ function upgrade_nodejs {
205 205
         npm upgrade -g n@${NODEJS_N_VERSION} --save
206 206
     fi
207 207
     if [[ "$CURR_NODE_VERSION" != "v${NODEJS_VERSION}" ]]; then
208
-        n {NODEJS_VERSION}
208
+        n ${NODEJS_VERSION}
209 209
     fi
210 210
     cp /usr/local/bin/n /usr/bin/n
211 211
     if [ -f /usr/local/bin/npm ]; then

+ 4
- 0
src/freedombone-utils-postgresql 파일 보기

@@ -124,8 +124,12 @@ function remove_postgresql_user {
124 124
 
125 125
 function drop_database_postgresql {
126 126
     database_name="$1"
127
+    database_owner_name="$2"
127 128
     cd /etc/postgresql
128 129
     sudo -u postgres psql -c "drop database $database_name"
130
+    if [ ${#database_owner_name} -gt 0 ]; then
131
+        sudo -u postgres psql -c "drop user $database_owner_name"
132
+    fi
129 133
 }
130 134
 
131 135
 function run_system_query_postgresql {

+ 5
- 0
tests/check-ssh.sh 파일 보기

@@ -194,4 +194,9 @@ case $1 in
194 194
             exit 1
195 195
         fi
196 196
         ;;
197
+    pam_python)
198
+        if grep -q 'pam_python' /etc/pam.d/sshd; then
199
+            exit 1
200
+        fi
201
+        ;;
197 202
 esac

+ 5
- 0
tests/output.sh 파일 보기

@@ -119,6 +119,11 @@ Check_content: Verify the SSH private host key files have mode "0600" or less pe
119 119
                   printf '\n######################\n\nThis system is not intended to support graphical output\n\n######################\n\n' >> $LOG
120 120
               fi
121 121
               ;;
122
+    SV-86724r2_rule) log_msg $2 'Dont allow pam_python.'
123
+              if [ $2 -ne 0 ];then
124
+                  printf '\n######################\n\npam_python within /etc/pam.d/sshd could indicate a possible attack on ssh logins.\n\n######################\n\n' >> $LOG
125
+              fi
126
+              ;;
122 127
     V-38455)  if [ "$3" = "en" ]; then
123 128
                   log_msg $2 'The system must use a separate file system for /tmp.'
124 129
               else

+ 3
- 2
website/EN/armbian.html 파일 보기

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2017-11-28 Tue 17:02 -->
6
+<!-- 2018-02-12 Mon 20:13 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title>&lrm;</title>
@@ -326,7 +326,8 @@ Then clone the Freedombone repository and checkout the stretch development branc
326 326
 </p>
327 327
 
328 328
 <div class="org-src-container">
329
-<pre class="src src-bash">git clone https://github.com/bashrc/freedombone
329
+<pre class="src src-bash">apt-get -y install git dialog build-essential
330
+git clone https://github.com/bashrc/freedombone
330 331
 <span class="org-builtin">cd</span> freedombone
331 332
 git checkout stretch
332 333
 </pre>

+ 6
- 6
website/EN/beaglebone.html 파일 보기

@@ -3,10 +3,10 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2017-09-12 Tue 09:56 -->
6
+<!-- 2018-02-12 Mon 20:12 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9
-<title></title>
9
+<title>&lrm;</title>
10 10
 <meta name="generator" content="Org mode" />
11 11
 <meta name="author" content="Bob Mottram" />
12 12
 <meta name="description" content="How to install Freedombone onto a Beaglebone Black"
@@ -286,13 +286,13 @@ On your laptop or desktop prepare a microSD card image as follows. To create an
286 286
 </p>
287 287
 
288 288
 <div class="org-src-container">
289
-<pre><code class="src src-bash">sudo apt-get install git
289
+<pre class="src src-bash">sudo apt-get install git dialog build-essential
290 290
 git clone https://github.com/bashrc/freedombone
291 291
 <span class="org-builtin">cd</span> freedombone
292 292
 git checkout stretch
293 293
 sudo make install
294 294
 freedombone-image --setup debian
295
-</code></pre>
295
+</pre>
296 296
 </div>
297 297
 
298 298
 <p>
@@ -300,13 +300,13 @@ Or on Arch/Parabola:
300 300
 </p>
301 301
 
302 302
 <div class="org-src-container">
303
-<pre><code class="src src-bash">sudo pacman -S git
303
+<pre class="src src-bash">sudo pacman -S git dialog
304 304
 git clone https://github.com/bashrc/freedombone
305 305
 <span class="org-builtin">cd</span> freedombone
306 306
 git checkout stretch
307 307
 sudo make install
308 308
 freedombone-image --setup parabola
309
-</code></pre>
309
+</pre>
310 310
 </div>
311 311
 
312 312
 <div class="org-center">

+ 3
- 3
website/EN/homeserver.html 파일 보기

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2018-01-29 Mon 10:19 -->
6
+<!-- 2018-02-12 Mon 20:11 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title>&lrm;</title>
@@ -256,7 +256,7 @@ First install freedombone onto your local system (not the target hardware that y
256 256
 </p>
257 257
 
258 258
 <div class="org-src-container">
259
-<pre class="src src-bash">sudo apt-get install git
259
+<pre class="src src-bash">sudo apt-get install git dialog build-essential
260 260
 git clone https://github.com/bashrc/freedombone
261 261
 <span class="org-builtin">cd</span> freedombone
262 262
 git checkout stretch
@@ -271,7 +271,7 @@ Or on Arch/Parabola:
271 271
 </p>
272 272
 
273 273
 <div class="org-src-container">
274
-<pre class="src src-bash">sudo pacman -S git
274
+<pre class="src src-bash">sudo pacman -S git dialog
275 275
 git clone https://github.com/bashrc/freedombone
276 276
 <span class="org-builtin">cd</span> freedombone
277 277
 git checkout stretch