File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 40
40
#endif
41
41
42
42
#include "qemu/queue.h"
43
+ #include "qemu/cutils.h"
43
44
44
45
#include "net/tap-linux.h"
45
46
@@ -245,6 +246,7 @@ int main(int argc, char **argv)
245
246
ACLList acl_list ;
246
247
int access_allowed , access_denied ;
247
248
int ret = EXIT_SUCCESS ;
249
+ g_autofree char * acl_file = NULL ;
248
250
249
251
#ifdef CONFIG_LIBCAP_NG
250
252
/* if we're run from an suid binary, immediately drop privileges preserving
@@ -257,6 +259,8 @@ int main(int argc, char **argv)
257
259
}
258
260
#endif
259
261
262
+ qemu_init_exec_dir (argv [0 ]);
263
+
260
264
/* parse arguments */
261
265
for (index = 1 ; index < argc ; index ++ ) {
262
266
if (strcmp (argv [index ], "--use-vnet" ) == 0 ) {
@@ -282,9 +286,10 @@ int main(int argc, char **argv)
282
286
283
287
/* parse default acl file */
284
288
QSIMPLEQ_INIT (& acl_list );
285
- if (parse_acl_file (DEFAULT_ACL_FILE , & acl_list ) == -1 ) {
289
+ acl_file = get_relocated_path (DEFAULT_ACL_FILE );
290
+ if (parse_acl_file (acl_file , & acl_list ) == -1 ) {
286
291
fprintf (stderr , "failed to parse default acl file `%s'\n" ,
287
- DEFAULT_ACL_FILE );
292
+ acl_file );
288
293
ret = EXIT_FAILURE ;
289
294
goto cleanup ;
290
295
}
You can’t perform that action at this time.
0 commit comments