Add tsp/tsp-sudoer 14/81514/12
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 26 Jul 2016 10:52:11 +0000 (12:52 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 6 Dec 2016 15:37:13 +0000 (16:37 +0100)
Syntax error in any file used by sudo will break it.
Always check it as in example below:
    visudo -c -f tsp/tsp-sudoer

Change-Id: Icb7978c31370924d1f1928a711de86283022aa4c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tsp/tsp-sudoer [new file with mode: 0644]

diff --git a/tsp/tsp-sudoer b/tsp/tsp-sudoer
new file mode 100644 (file)
index 0000000..cc786c1
--- /dev/null
@@ -0,0 +1,29 @@
+# Commands used by TITS
+#
+# tune2fs           by tct/*_prepare_flash_conf.sh in tct/flash/flash.sh: change_uuid()
+# btrfs             by tct/run_tct_chroot.sh in tct/run/run.sh: create_chroot(), delete_chroot()
+# chroot            by tct/run_tct_chroot.sh in tct/run/run.sh: run_in_chroot()
+# mkdir, cp, ln, sh by tct/odroid_prepare_flash_conf.sh in tct/prepare/prepare.sh: install_iserial()
+#                   and test/tct_prepare.bats
+# mount, umount     by tct/odroid_prepare_flash_conf.sh in tct/prepare/prepare.sh: mount_image(), unmount_image()
+#                   and tct/run_tct_chroot.sh in tct/run/run.sh: create_chroot(), delete_chroot()
+# dd                by tct/odroid_prepare_flash_conf.sh
+# bmaptool          by tct/minnow_prepare_flash_conf.sh
+# rm                by test/tct_flash.bats
+Cmnd_Alias C_TSP = \
+  /sbin/tune2fs *, \
+  /sbin/btrfs subvolume *, \
+  /usr/sbin/chroot *, \
+  /bin/mkdir *, \
+  /bin/cp *, \
+  /bin/rm *, \
+  /bin/ln -s *, \
+  /bin/dd *, \
+  /bin/sh -c echo * > */etc/id*, \
+  /bin/mount -o loop *, \
+  /bin/umount *, \
+  /usr/bin/bmaptool -q copy *
+
+Runas_Alias R_ROOT = root
+
+%tsp ALL = (R_ROOT) NOPASSWD: C_TSP