mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 10:06:39 +00:00
Merge pull request #2895 from neo954/testcase-issue2637
Add test case for verify the github issue #2637: Preserve the user ownership of the file for xdcp command
This commit is contained in:
commit
348c036308
22
xCAT-test/autotest/testcase/xdcp/cases1
Normal file
22
xCAT-test/autotest/testcase/xdcp/cases1
Normal file
@ -0,0 +1,22 @@
|
||||
start:xdcp_nonroot_user
|
||||
cmd:useradd -m xyzzy
|
||||
check:rc==0
|
||||
cmd:( cd ~ && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )
|
||||
check:rc==0
|
||||
cmd:chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "useradd -m xyzzy"
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "( cd ~ && tar cf - .ssh ) | ( cd ~xyzzy && tar xf - )"
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "chown -R xyzzy ~xyzzy/.ssh"
|
||||
check:rc==0
|
||||
cmd:su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "stat -c '%U' /tmp/sysctl.conf"
|
||||
check:output=~xyzzy
|
||||
cmd:xdsh $$CN "userdel xyzzy"
|
||||
check:rc==0
|
||||
cmd:userdel xyzzy
|
||||
check:rc==0
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user