diff options
| author | Shulhan <ms@kilabit.info> | 2023-10-21 19:52:17 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-21 19:59:10 +0700 |
| commit | f1cdc424327be91cfdbeb35449275cd8582bba8d (patch) | |
| tree | 5d350edefd9a17400179252a1018be7004988fe7 /testdata | |
| parent | 143e4c8c6825884ae864563b93689200a55c2d49 (diff) | |
| download | awwan-f1cdc424327be91cfdbeb35449275cd8582bba8d.tar.xz | |
all: implement remote "#get!" and "#put!" with owner and mode
When script with magic command "#get!" or "#put!" executed using "play"
command, one can changes the owner and/or permission mode by setting
the user/group and permission bits after the magic command, for example,
#get!user:group+0600 src dst
Will changes the owner of dst in local into "user:group" with permission
"0600", while
#put!user:group+0600 src dst
Will changes the owner of dst in remote into "user:group" with permission
"0600".
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/play/awwanssh.test/get.aww | 6 | ||||
| -rw-r--r-- | testdata/play/awwanssh.test/get_test.data | 15 | ||||
| -rw-r--r-- | testdata/play/awwanssh.test/put.aww | 6 |
3 files changed, 27 insertions, 0 deletions
diff --git a/testdata/play/awwanssh.test/get.aww b/testdata/play/awwanssh.test/get.aww index c10ae27..4b5d604 100644 --- a/testdata/play/awwanssh.test/get.aww +++ b/testdata/play/awwanssh.test/get.aww @@ -10,3 +10,9 @@ ## privileged. #get:awwan:bin /etc/os-release {{.ScriptDir}}/tmp/get_with_owner.txt + +#get!+0601 /etc/crypttab {{.ScriptDir}}/tmp/sudoget_with_mode.txt + +#get!awwan:bin /etc/crypttab {{.ScriptDir}}/tmp/sudoget_with_owner.txt + +#get!awwan:bin+0602 /etc/crypttab {{.ScriptDir}}/tmp/sudoget_with_owner_mode.txt diff --git a/testdata/play/awwanssh.test/get_test.data b/testdata/play/awwanssh.test/get_test.data index ad4577d..aec7acb 100644 --- a/testdata/play/awwanssh.test/get_test.data +++ b/testdata/play/awwanssh.test/get_test.data @@ -18,3 +18,18 @@ LOGO=archlinux-logo <<< WithOwner:error Play: Get: chown awwan:bin "/home/awwan/src/testdata/play/awwanssh.test/tmp/get_with_owner.txt": exit status 1 + +<<< /etc/crypttab +# Configuration for encrypted block devices. +# See crypttab(5) for details. + +# NOTE: Do not list your root (/) partition here, it must be set up +# beforehand by the initramfs (/etc/mkinitcpio.conf). + +# <name> <device> <password> <options> +# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1 +# data1 /dev/sda3 /etc/mypassword2 +# data2 /dev/sda5 /etc/cryptfs.key +# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256 +# vol /dev/sdb7 none + diff --git a/testdata/play/awwanssh.test/put.aww b/testdata/play/awwanssh.test/put.aww index 9779ed2..e419a4f 100644 --- a/testdata/play/awwanssh.test/put.aww +++ b/testdata/play/awwanssh.test/put.aww @@ -10,3 +10,9 @@ ## privileged. #put:awwan:bin+666 {{.ScriptDir}}/plain.txt put_with_owner.txt + +#put!+604 {{.ScriptDir}}/plain.txt sudoput_with_mode.txt + +#put!awwan:bin {{.ScriptDir}}/plain.txt sudoput_with_owner.txt + +#put!awwan:bin+602 {{.ScriptDir}}/plain.txt sudoput_with_owner_mode.txt |
