MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / do_self_args

Function do_self_args

cppcryptfsctl/cppcryptfsctl.cpp:132–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static 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'},

Callers 1

wmainFunction · 0.85

Calls 15

getopt_initFunction · 0.85
getopt_longFunction · 0.85
get_binary_flagFunction · 0.85
GetProductVersionInfoFunction · 0.85
show_helpFunction · 0.85
can_delete_directoryFunction · 0.85
get_passwordFunction · 0.85
GetConfigPathFunction · 0.85
is_hexFunction · 0.85
IsLockedMethod · 0.80
createMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected