encfs icon indicating copy to clipboard operation
encfs copied to clipboard

encfsctl decode takes only 99 arguments

Open bartekbrak opened this issue 5 years ago • 3 comments

encfsctl decode [--extpass=prog] rootdir [encoded name ...] will take only 99 arguments for encoded nameand I do sometimes have hundreds.

Observe:

$ find ./encrypted | sed -En 's,.*encrypted/,,p' | \
    head -n 99 | \
    xargs encfsctl decode ./encrypted  # works fine
EncFS Password:^C

$ find ./encrypted | sed -En 's,.*encrypted/,,p' | \
    head -n 100 | \
    xargs encfsctl decode ./encrypted  # too many, breaks
Incorrect number of arguments for command "decode"
$ encfsctl --version
encfsctl version 1.9.2

I can work around this limitation, but it is a bit annoying.

bartekbrak avatar Jan 09 '20 15:01 bartekbrak

xargs -n 90

rfjakob avatar Jan 14 '20 21:01 rfjakob

This is a workaround, not a solution. Is there a reason to limit the amount of CLI args?

bartekbrak avatar Jan 15 '20 01:01 bartekbrak

It's probably just as a general safety in the C++ code. I do see a max argument limit of 100 for the decode and encode functions. Should be a simple change to increase this to 1000 or something like that. I don't know what the current limits for a command line in bytes on a modern Linux is. I know 30 years ago it was 32KB or something like that.

doj avatar Jul 03 '23 08:07 doj