annotate cinst/mozilla.c @ 156:f09a0817e3bc

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 25 Mar 2014 09:23:47 +0100
parents fc9af77b06b9
children a46a4b443410
rev   line source
121
4bb5f295987b Fix doxygen documentation.
Sascha Wilde <wilde@intevation.de>
parents: 119
diff changeset
1 /**
4bb5f295987b Fix doxygen documentation.
Sascha Wilde <wilde@intevation.de>
parents: 119
diff changeset
2 * @file
4bb5f295987b Fix doxygen documentation.
Sascha Wilde <wilde@intevation.de>
parents: 119
diff changeset
3 * @brief Mozilla installation process
99
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
4 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
5 * Reads from stdin a list of instructions in the form:
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
6 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
7 * I:<base64 DER econded certificate>\r\n
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
8 * R:<base64 DER econded certificate>\r\n
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
9 * ...
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
10 *
130
ffb20e76e7d0 Fix max line length documentation
Andre Heinecke <aheinecke@intevation.de>
parents: 121
diff changeset
11 * The maximum size of an input line is 9999 characters
99
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
12 * (including the \r\n) at the end of the line.
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
13 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
14 * Certificates marked with I: will be installed and the ones
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
15 * marked with R: will be searched and if available removed from
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
16 * the databases.
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
17 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
18 * This tool tries to find all NSS databases the user has
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
19 * access to and to execute the instructions on all of them.
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
20 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
21 * If there are other processes accessing the databases the caller
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
22 * has to ensure that those are terminated before this process is
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
23 * executed.
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
24 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
25 * Returns 0 on success (Even when no stores where found) an error value
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
26 * as defined in errorcodes.h otherwise.
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
27 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
28 * Success messages are written to stdout. Errors to stderr. For logging
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
29 * purposes each installation / removal of a certificate will be reported
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
30 * with the profile name that it modified.
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
31 *
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
32 */
bc1e6732f43c Add specification and some cleanups
Andre Heinecke <aheinecke@intevation.de>
parents: 44
diff changeset
33
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34 /* @brief IniParser for mozilla profiles.ini
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 *
110
0c8ea71a89cd fixed whitespace.
Sascha Wilde <wilde@intevation.de>
parents: 99
diff changeset
36 * Parse data to find values formed in
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37 *
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 * [Profile99]
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 * IsRelative=1
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 * Path=Profiles/fooo.bar
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 *
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
42 * or
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43 * [Profile0]
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44 * IsRelative=0
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45 * Path=c:\foo\bar\baz
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46 *
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47 * Mozilla also accepts the ini file on Windows even if it is UTF-16
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48 * encoded.
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49 * */
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
51 #include <stdbool.h>
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
52 #include <stdio.h>
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
53 #include <stdlib.h>
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
54 #include <string.h>
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
55
113
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
56 #include <errorcodes.h>
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
57 #include <portpath.h>
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
58 #include <strhelp.h>
113
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
59
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
60 #ifndef _WIN32
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
61 #define UNIX 1
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
62 #else
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
63 #define UNIX 0
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
64 #endif
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
65
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
66 #define LINEBUFLEN 1000
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
67
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
68 /**
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
69 * @brief Global Return Code
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
70 *
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
71 * This will be retuned by the programm and might be set to an
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
72 * error code on fatal errors and to and warning code on non-fatal
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
73 * errors. In case of mor than one warning the warning codes will be
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
74 * ORed together.
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
75 */
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
76 int return_code = 0;
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78 /**
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
79 * @brief Get a list of all mozilla profile directories
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
80 *
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
81 * Read the profiles.ini and extract all profile paths from that.
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
82 *
121
4bb5f295987b Fix doxygen documentation.
Sascha Wilde <wilde@intevation.de>
parents: 119
diff changeset
83 * @param[in] inifile_name path of the profile.ini to read.
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
84 * @return NULL terminated array of strings containing containing the
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
85 * absolute path of the profile directories. The array needs to
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
86 * be freed by the caller.
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
87 */
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
88 static char **
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
89 get_profile_dirs (char *inifile_name)
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
90 {
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
91 char **dirs = NULL;
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
92 char *inifile_dirname;
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
93 FILE *inifile;
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
94 char line[LINEBUFLEN];
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
95 char *key;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
96 char *value;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
97 char path[LINEBUFLEN];
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
98 char *fqpath;
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
99 bool inprofile = false;
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
100 bool relative_path = false;
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
101
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
102 if ((inifile = fopen(inifile_name, "r")) != NULL)
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
103 {
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
104 inifile_dirname = port_dirname(inifile_name);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
105 while (fgets(line, LINEBUFLEN, inifile) != NULL)
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
106 {
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
107 /* Determine if we are in an profile section */
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
108 if (str_starts_with(line, "[Profile"))
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
109 {
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
110 relative_path = false;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
111 inprofile = true;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
112 }
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
113 else if (line[0] == '[')
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
114 inprofile = false;
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
115
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
116 /* If we are in a profile parse path related stuff */
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
117 if (inprofile)
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
118 {
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
119 value = line;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
120 key = strsep(&value, "=");
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
121 str_trim(&value);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
122 if (str_equal(key, "Path"))
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
123 {
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
124 if (relative_path)
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
125 snprintf(path, LINEBUFLEN, "%s/%s", inifile_dirname, value);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
126 else
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
127 strncpy(path, value, LINEBUFLEN);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
128 if ((fqpath = port_realpath(path)) != NULL)
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
129 {
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
130 strv_append(&dirs, fqpath, strlen(fqpath));
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
131 free (fqpath);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
132 }
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
133 else
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
134 return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
135 }
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
136 else if (str_equal(key, "IsRelative") &&
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
137 str_starts_with(value, "1"))
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
138 relative_path = true;
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
139 }
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
140 }
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
141 }
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
142 else
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
143 {
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
144 return_code |= WARN_MOZ_FAILED_TO_OPEN_INI;
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
145 }
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
146 return dirs;
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
147 }
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
148
113
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
149 int
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
150 main (int argc, char *argv[])
113
02ad0922c01f Start over (only leave comments).
Sascha Wilde <wilde@intevation.de>
parents: 110
diff changeset
151 {
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
152 int x = 0;
147
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
153 if (argc == 2)
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
154 {
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
155 char **pdirs =
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
156 get_profile_dirs(argv[1]);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
157 if (pdirs != NULL)
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
158 {
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
159 while (pdirs[x] != NULL)
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
160 puts(pdirs[x++]);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
161 strv_free(pdirs);
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
162 }
fc9af77b06b9 Completed profile.ini parser.
Sascha Wilde <wilde@intevation.de>
parents: 130
diff changeset
163 }
119
24ca8e2ceecf First step of simple mozilla ini parser
Sascha Wilde <wilde@intevation.de>
parents: 113
diff changeset
164 exit(return_code);
44
b3e8e047bc2c Commit first scratch of mozilla installer
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
165 }

http://wald.intevation.org/projects/trustbridge/