Jakob Unterwurzacher
c1d7e38761
findholes: add --create, --verify
...
Also, change the logic for the segment walk to not
rely on the total size. cp does not use the total
size either, and we miss bugs by cheating!
2021-05-29 16:00:40 +02:00
Jakob Unterwurzacher
8bccd3b4bf
Add contrib/findholes
...
Utility and libs to find hole/data segments using lseek.
2021-05-26 13:17:56 +02:00
Jakob Unterwurzacher
a2f48eb838
contrib: cleanup-tmp-mounts: also clean ext4-ramdisk
2020-10-15 17:49:17 +02:00
Jakob Unterwurzacher
95caa66e0b
contrib/mount-ext4-ramdisk.sh: clean up in error case
...
Also fix all shellcheck warnings.
2020-09-18 13:21:07 +02:00
Jakob Unterwurzacher
55fcacfc27
Add contrib/mount-ext4-ramdisk.sh
2020-09-14 19:01:33 +02:00
Jakob Unterwurzacher
8afbbc86d1
getdents_c: continue on EINTR from open
...
Getting EINTR here is acceptable.
2020-07-29 20:35:59 +02:00
Jakob Unterwurzacher
5073459296
Revert "getdents_c: read from two threads"
...
This made the code more complicated without reproducing
the problem.
This reverts commit 77632b7554
.
2020-07-29 20:29:24 +02:00
Jakob Unterwurzacher
77632b7554
getdents_c: read from two threads
...
This was an attempt to make the C code more
similar to Go (which also reads from multiple threads).
However, I still could not repro the ENOENT problems.
https://github.com/rfjakob/gocryptfs/issues/483
2020-06-21 12:01:34 +02:00
Jakob Unterwurzacher
a56e7cc5ac
sshfs-benchmark.bash: fix locale trouble and move to tests
...
Locale trouble was
sshfs-benchmark.bash: line 31: printf: 4.71: invalid number
because printf expected "4,71" in the German locale.
Force the C locale.
2020-06-06 12:15:41 +02:00
Jeremy Hilliker
274e0d27b7
contrib/getdents-debug: fix function call missing argument from 22e3eec153
2020-06-01 10:18:18 +02:00
Jakob Unterwurzacher
22e3eec153
getdents-debug: loop and stop on first error
...
Also try to improve and unify output a little.
$ ./getdents /usr/share/man/man1
1: unix.Getdents: n=9984; n=9984; n=9968; n=9976; n=9984; n=9968; n=10000; n=9976; n=9992; n=10000; n=9976; n=9992; n=2312; n=0; err=<nil>; total 122112 bytes
2: unix.Getdents: n=9984; n=48; n=9976; n=9968; n=9976; n=9976; n=9992; n=9984; n=9992; n=10000; n=9976; n=9968; n=10000; n=2272; n=0; err=<nil>; total 122112 bytes
3: unix.Getdents: n=9984; n=9984; n=9968; n=704; n=10000; n=10000; n=9968; n=9968; n=9992; n=10000; n=9960; n=9992; n=9992; n=1600; n=0; err=<nil>; total 122112 bytes
4: unix.Getdents: n=9984; n=9984; n=9968; n=9976; n=9984; n=32; n=9992; n=9984; n=9992; n=10000; n=9976; n=9968; n=10000; n=2272; n=0; err=<nil>; total 122112 bytes
$ ./getdents_c /usr/share/man/man1
1: getdents64: n=9984; n=9984; n=9968; n=9976; n=9984; n=9968; n=10000; n=9976; n=9992; n=10000; n=9976; n=9992; n=2312; n=0; errno=0 total 122112 bytes
2: getdents64: n=9984; n=9984; n=9968; n=9976; n=9984; n=9968; n=10000; n=9976; n=9992; n=10000; n=9976; n=9992; n=2312; n=0; errno=0 total 122112 bytes
3: getdents64: n=9984; n=9984; n=9968; n=9976; n=9984; n=9968; n=10000; n=9976; n=9992; n=10000; n=9976; n=9992; n=2312; n=0; errno=0 total 122112 bytes
4: getdents64: n=9984; n=9984; n=9968; n=9976; n=9984; n=9968; n=10000; n=9976; n=9992; n=10000; n=9976; n=9992; n=2312; n=0; errno=0 total 122112 bytes
2020-05-28 23:23:53 +02:00
Jakob Unterwurzacher
b275c53fa7
contrib/getdents-debug: implement getdents -loop
...
$ ./getdents -loop /mnt/synology/public/tmp/g1
unix.Getdents: n=4176; n=4176; n=4176; n=4176; n=4176; n=3192; n=0; err=<nil>; total 24072 bytes
unix.Getdents: n=4176; n=4176; n=4176; n=4176; n=4176; n=3192; n=0; err=<nil>; total 24072 bytes
unix.Getdents: n=4176; n=-1; err=no such file or directory; total 4176 bytes
2020-05-25 23:32:11 +02:00
Jakob Unterwurzacher
0d522e0d3b
Add contrib/getdents-debug/readdirnames
...
Another way to repro the problem in
https://github.com/rfjakob/gocryptfs/issues/483
2020-05-24 23:51:38 +02:00
Jakob Unterwurzacher
6019598fdb
contrib: collect getdents stuff in getdents-debug folder
2020-05-24 23:46:41 +02:00
Jakob Unterwurzacher
b3350f0ebb
contrib: add getdents_c
...
Same thing like contrib/getdents, but written in C.
2020-05-24 23:29:59 +02:00
Jakob Unterwurzacher
c7a9425e1b
Add contrib/getdents
...
Small tool to try to debug unix.Getdents problems on CIFS mounts
https://github.com/rfjakob/gocryptfs/issues/483
2020-05-24 22:54:58 +02:00
Jakob Unterwurzacher
1a91a11e00
contrib/sshfs-benchmark.bash: add rmdir, mkdir, touch
...
And also, stop using the wrong directory for sshfs git init.
sshfs-benchmark.bash: sshfs gocryptfs-on-sshfs
git init 4.35 7.82
rsync 7.72 11.66
rm -R 2.71 11.04
mkdir 1.33 4.15
rmdir 0.47 3.97
touch 2.32 2.85
rm 0.45 0.45
2020-05-24 22:03:40 +02:00
Jakob Unterwurzacher
11dfcfd6c0
contrib: add sshfs-benchmark.bash
...
Let's get some reproducible numbers for
https://github.com/rfjakob/gocryptfs/issues/481
and
https://github.com/rfjakob/gocryptfs/issues/410
Example run:
$ ./sshfs-benchmark.bash nuetzlich.net
working directory: /tmp/sshfs-benchmark.bash.vu4
sshfs mounted: nuetzlich.net:/tmp -> sshfs.mnt
gocryptfs mounted: sshfs.mnt/sshfs-benchmark.bash.KM9/gocryptfs.crypt -> gocryptfs.mnt
sshfs gocryptfs-on-sshfs
git init 1.68 11.23
rsync 6.07 20.35
2020-05-24 15:30:14 +02:00
Jakob Unterwurzacher
1d145be5a1
contrib: delete ctlsock-encrypt.bash
...
Closes https://github.com/rfjakob/gocryptfs/issues/416
2020-05-10 00:15:06 +02:00
Jakob Unterwurzacher
747e994682
Add contrib/cleanup-tmp-mounts.sh
...
Useful when you have lots of broken mounts after something in
the test suite went wrong.
2020-02-15 14:38:13 +01:00
Jakob Unterwurzacher
7e9e63b430
contrib/statvsfstat: add statvsfstat tool
...
Cli tool to compare the result of Stat() and Fstat().
2019-11-16 21:19:08 +01:00
Jakob Unterwurzacher
ed230379e7
Expand statfs man page a little and include in build.bash
2019-09-08 15:50:05 +02:00
Jakob Unterwurzacher
5857521b40
Add contrib/statfs tool
...
This should help debugging
https://github.com/rfjakob/gocryptfs/issues/375 and
https://github.com/rfjakob/gocryptfs/issues/274 ,
as MacOS does not have "stat -f".
2019-03-17 12:48:44 +01:00
Jakob Unterwurzacher
ce2e610428
OSX compat: replace fusermount calls with fuse-unmount.bash
...
Mac OS X does not have fusermount and uses umount instead.
The fuse-unmount.bash calls the appropriate command.
2017-02-15 23:02:01 +01:00
Jakob Unterwurzacher
6be7808992
Add Mac OS X fusermount replacement script
2017-02-14 21:38:28 +01:00
Jakob Unterwurzacher
c8fb619971
contrib: add ctlsock helper scripts
2017-01-29 18:56:17 +01:00
Jakob Unterwurzacher
dc78e634aa
contrib: gocryptfs-maybe: fix description
2016-10-11 23:22:15 +02:00
Jakob Unterwurzacher
7c053e67f2
contrib: add gocryptfs-maybe.bash
...
Conditionally try to mount a gocryptfs filesystem. If either
* CIPHERDIR does not exist OR
* something is already mounted on MOUNTPOINT
print a message to stdout (not stderr!) but exit with 0.
This is meant to be called from automated mount systems like pam_mount,
where you want to avoid error messages if the filesystem does not exist,
or duplicate mounts if the filesystem has already been mounted.
2016-10-11 23:19:21 +02:00
Jakob Unterwurzacher
5ef27ee549
Drop contrib/pam_mount
...
The README text has been moved to
https://github.com/rfjakob/gocryptfs/wiki/Mounting-on-login-using-pam_mount
and the gocryptfs_pam_mount.bash is no longer needed since
commit 9cf3ced0ce
.
2016-10-09 21:27:34 +02:00
Jakob Unterwurzacher
a985096b50
contrib: pam_mount: check if something is already mounted on DST
...
pam_mount is supposed to check that as well, but it seems to get confused
by the "command#path" syntax used for FUSE. Let's do it here.
2016-10-09 00:32:49 +02:00
Jakob Unterwurzacher
22f96bfce6
contrib: pam_mount: add instructions for whole-home-dir encryption
2016-10-08 22:30:19 +02:00
Jakob Unterwurzacher
610a242ec6
contrib: pam_mount: add documentation and wrapper
...
See ticket #34
2016-10-08 22:30:13 +02:00