ソースを参照

Set command file permissions

Bob Mottram 8 年 前
コミット
11899c9904
共有3 個のファイルを変更した28 個の追加0 個の削除を含む
  1. 1
    0
      src/freedombone-utils-final
  2. 6
    0
      src/freedombone-utils-selector
  3. 21
    0
      src/freedombone-utils-setup

+ 1
- 0
src/freedombone-utils-final ファイルの表示

@@ -39,6 +39,7 @@ function install_final {
39 39
     fi
40 40
     function_check split_gpg_key_into_fragments
41 41
     split_gpg_key_into_fragments
42
+    set_command_file_permissions
42 43
 
43 44
     mark_completed $FUNCNAME
44 45
     clear

+ 6
- 0
src/freedombone-utils-selector ファイルの表示

@@ -570,6 +570,9 @@ function install_apps {
570 570
 
571 571
                             ${PROJECT_NAME}-mirrors --app ${a}
572 572
 
573
+                            function_check set_command_file_permissions
574
+                            set_command_file_permissions
575
+
573 576
                             function_check install_completed
574 577
                             install_completed ${a}
575 578
                             echo $"${a} was installed from interactive"
@@ -599,6 +602,9 @@ function install_apps {
599 602
                                 function_check add_users_after_install
600 603
                                 add_users_after_install ${a}
601 604
 
605
+                                function_check set_command_file_permissions
606
+                                set_command_file_permissions
607
+
602 608
                                 ${PROJECT_NAME}-mirrors --app ${a}
603 609
 
604 610
                                 function_check install_completed

+ 21
- 0
src/freedombone-utils-setup ファイルの表示

@@ -416,6 +416,27 @@ function remove_serial_logins {
416 416
     fi
417 417
 }
418 418
 
419
+function set_command_file_permissions {
420
+    if [ -d /bin ]; then
421
+        chown root:root /bin/*
422
+    fi
423
+    if [ -d /usr/bin ]; then
424
+        chown root:root /usr/bin/*
425
+    fi
426
+    if [ -d /usr/local/bin ]; then
427
+        chown root:root /usr/local/bin/*
428
+    fi
429
+    if [ -d /sbin ]; then
430
+        chown root:root /sbin/*
431
+    fi
432
+    if [ -d /usr/sbin ]; then
433
+        chown root:root /usr/sbin/*
434
+    fi
435
+    if [ -d /usr/local/sbin ]; then
436
+        chown root:root /usr/local/sbin/*
437
+    fi
438
+}
439
+
419 440
 function setup_firewall {
420 441
     function_check create_completion_file
421 442
     create_completion_file