aheinecke@99: /* @file Mozilla installation process aheinecke@99: * aheinecke@99: * Reads from stdin a list of instructions in the form: aheinecke@99: * aheinecke@99: * I:\r\n aheinecke@99: * R:\r\n aheinecke@99: * ... aheinecke@99: * aheinecke@99: * The maximum size of an input line is 1000 characters aheinecke@99: * (including the \r\n) at the end of the line. aheinecke@99: * aheinecke@99: * Certificates marked with I: will be installed and the ones aheinecke@99: * marked with R: will be searched and if available removed from aheinecke@99: * the databases. aheinecke@99: * aheinecke@99: * This tool tries to find all NSS databases the user has aheinecke@99: * access to and to execute the instructions on all of them. aheinecke@99: * aheinecke@99: * If there are other processes accessing the databases the caller aheinecke@99: * has to ensure that those are terminated before this process is aheinecke@99: * executed. aheinecke@99: * aheinecke@99: * Returns 0 on success (Even when no stores where found) an error value aheinecke@99: * as defined in errorcodes.h otherwise. aheinecke@99: * aheinecke@99: * Success messages are written to stdout. Errors to stderr. For logging aheinecke@99: * purposes each installation / removal of a certificate will be reported aheinecke@99: * with the profile name that it modified. aheinecke@99: * aheinecke@99: */ aheinecke@99: aheinecke@44: /* @brief IniParser for mozilla profiles.ini aheinecke@44: * wilde@110: * Parse data to find values formed in aheinecke@44: * aheinecke@44: * [Profile99] aheinecke@44: * IsRelative=1 aheinecke@44: * Path=Profiles/fooo.bar aheinecke@44: * aheinecke@44: * or aheinecke@44: * [Profile0] aheinecke@44: * IsRelative=0 aheinecke@44: * Path=c:\foo\bar\baz aheinecke@44: * aheinecke@44: * Mozilla also accepts the ini file on Windows even if it is UTF-16 aheinecke@44: * encoded. aheinecke@44: * */ aheinecke@44: wilde@113: #include wilde@113: #include wilde@113: wilde@113: #ifndef _WIN32 wilde@113: #define UNIX 1 wilde@113: #else wilde@113: #define UNIX 0 wilde@113: #endif wilde@113: aheinecke@44: aheinecke@44: /** wilde@113: * @brief Get a list of all mozilla profile directories aheinecke@44: * aheinecke@44: * Read the profiles.ini and extract all profile paths from that. aheinecke@44: * wilde@113: * @param[inifile] path of the profile.ini to read. aheinecke@44: * @return NULL terminated array of strings containing containing the aheinecke@44: * absolute path of the profile directories. The array needs to aheinecke@44: * be freed by the caller. aheinecke@44: */ wilde@113: //char** wilde@113: //get_profile_dirs(char* inifile) aheinecke@44: aheinecke@44: wilde@113: int wilde@113: main() wilde@113: { wilde@113: exit(0); aheinecke@44: }