Use strchrnul to simplify chomping the password string when read from terminal.
Make stringbuf auto, and make its length the more logical BUFSIZ.
Make tmpbuffer auto, and make its length the more logical BUFSIZ.
Make passbuff BUFSIZ bytes: passwords might be long, and we save an arbitrary constant.