| 130 | } |
| 131 | |
| 132 | static int do_self_args(int argc, wchar_t* const argv[]) |
| 133 | { |
| 134 | CryptConfig config; |
| 135 | |
| 136 | // need to intialize these getop variables before we process a command line |
| 137 | getopt_init(); |
| 138 | |
| 139 | int c; |
| 140 | int option_index = 0; |
| 141 | |
| 142 | bool invalid_opt = false; |
| 143 | |
| 144 | bool reverse = false; |
| 145 | |
| 146 | bool plaintext_names = false; |
| 147 | |
| 148 | bool longnames = true; |
| 149 | |
| 150 | bool streams = true; |
| 151 | |
| 152 | bool do_init = false; |
| 153 | |
| 154 | bool siv = false; |
| 155 | |
| 156 | bool do_version = false; |
| 157 | |
| 158 | bool do_help = false; |
| 159 | |
| 160 | bool do_changepassword = false; |
| 161 | |
| 162 | bool do_printmasterkey = false; |
| 163 | |
| 164 | bool do_recover = false; |
| 165 | |
| 166 | bool deterministicnames = false; |
| 167 | |
| 168 | int scryptn = 0; |
| 169 | |
| 170 | LockZeroBuffer<wchar_t> password(PASSWORD_BUFLEN, false); |
| 171 | |
| 172 | if (!password.IsLocked()) { |
| 173 | wcerr << L"unable to lock password buffer\n"; |
| 174 | return 1; |
| 175 | } |
| 176 | |
| 177 | wstring fs_path; |
| 178 | wstring change_password_path; |
| 179 | wstring print_masterkey_path; |
| 180 | wstring recover_path; |
| 181 | wstring config_path; |
| 182 | wstring volume_name; |
| 183 | |
| 184 | int longnamemax = MAX_LONGNAMEMAX; |
| 185 | |
| 186 | static struct option long_options[] = |
| 187 | { |
| 188 | {L"init", required_argument, 0, 'I'}, |
| 189 | {L"deterministicnames", no_argument, 0, 'd'}, |
no test coverage detected