Greetings
The tl;dr is that on Solaris/Omnios flavored machines, getpassphrase() should be used in UserInputUtils.cpp instead of getpass()
Otherwise, long entered passwords are silently truncated to 8 characters, reducing security and producing encrypted files which appear to be broken, since they don't use the password you thought they did... Long-password files encrypted on eg Linux boxes can only be successfully read when using the passed-on-commandline option, which isn't great.
From the manpage for Illumos:
The getpassphrase() function is identical to getpass(), except that it
reads and returns a string of up to 257 characters in length.
...
Upon successful completion, getpass() returns a pointer to a null-
terminated string of at most 9 bytes that were read from the terminal
device. If an error is encountered, the terminal state is restored and
a null pointer is returned.
In the absence of OS-specific flags available in the build environment, a gross hack which works is to add this to ALLFLAGS in the solaris makefile:
-Dgetpass=getpassphrase \
Perhaps a more proper patch would be appropriate; the makefile hack is meant to get 'er done for those in desperation.
You may want to check if it's not corrected in p7zip on github. It's unmaintained here for long time.