Debian Codegraph @

testsuite/chroot-receiver-write-inner-module_test.py

raw symbols SCIP
1 #!/usr/bin/env python3
2 from rsyncfns import run_checked, setup_chroot_inner
3 from rsyncfns import rsync_argv, test_fail
4
5 base, inner, outside, src, url = setup_chroot_inner('chroot-write-inner')
6 (src / 'pwn').write_text('payload\n')
7 proc, out = run_checked(rsync_argv('-a', str(src / 'pwn'), f'{url}mod/linkparent/pwn'))
8 if (outside / 'pwn').exists():
9 test_fail(f"receiver write escaped inner module through symlinked parent:\n{out}")
10 print("chroot-receiver-write-inner-module: symlinked parent did not publish outside inner module")