1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 Copyright © 2013 Simon Peeters
14 #include "alloc-util.h"
16 #include "analyze-architectures.h"
17 #include "analyze-blame.h"
18 #include "analyze-calendar.h"
19 #include "analyze-capability.h"
20 #include "analyze-cat-config.h"
21 #include "analyze-compare-versions.h"
22 #include "analyze-condition.h"
23 #include "analyze-critical-chain.h"
24 #include "analyze-dot.h"
25 #include "analyze-dump.h"
26 #include "analyze-exit-status.h"
27 #include "analyze-fdstore.h"
28 #include "analyze-filesystems.h"
29 #include "analyze-image-policy.h"
30 #include "analyze-inspect-elf.h"
31 #include "analyze-log-control.h"
32 #include "analyze-malloc.h"
33 #include "analyze-pcrs.h"
34 #include "analyze-plot.h"
35 #include "analyze-security.h"
36 #include "analyze-service-watchdogs.h"
37 #include "analyze-srk.h"
38 #include "analyze-syscall-filter.h"
39 #include "analyze-time.h"
40 #include "analyze-time-data.h"
41 #include "analyze-timespan.h"
42 #include "analyze-timestamp.h"
43 #include "analyze-unit-files.h"
44 #include "analyze-unit-paths.h"
45 #include "analyze-verify.h"
47 #include "bus-error.h"
48 #include "bus-locator.h"
49 #include "bus-map-properties.h"
50 #include "bus-unit-util.h"
51 #include "calendarspec.h"
53 #include "capability-util.h"
54 #include "conf-files.h"
56 #include "constants.h"
57 #include "exit-status.h"
58 #include "extract-word.h"
61 #include "filesystems.h"
62 #include "format-table.h"
63 #include "glob-util.h"
65 #include "locale-util.h"
67 #include "main-func.h"
68 #include "mount-util.h"
69 #include "nulstr-util.h"
71 #include "parse-argument.h"
72 #include "parse-util.h"
73 #include "path-util.h"
74 #include "pretty-print.h"
77 # include "seccomp-util.h"
79 #include "sort-util.h"
81 #include "stat-util.h"
82 #include "string-table.h"
85 #include "terminal-util.h"
86 #include "time-util.h"
87 #include "tmpfile-util.h"
88 #include "unit-name.h"
89 #include "verb-log-control.h"
92 DotMode arg_dot
= DEP_ALL
;
93 char **arg_dot_from_patterns
= NULL
, **arg_dot_to_patterns
= NULL
;
95 PagerFlags arg_pager_flags
= 0;
96 CatFlags arg_cat_flags
= 0;
97 BusTransport arg_transport
= BUS_TRANSPORT_LOCAL
;
98 const char *arg_host
= NULL
;
99 RuntimeScope arg_runtime_scope
= RUNTIME_SCOPE_SYSTEM
;
100 RecursiveErrors arg_recursive_errors
= _RECURSIVE_ERRORS_INVALID
;
102 bool arg_generators
= false;
103 char *arg_root
= NULL
;
104 static char *arg_image
= NULL
;
105 char *arg_security_policy
= NULL
;
106 bool arg_offline
= false;
107 unsigned arg_threshold
= 100;
108 unsigned arg_iterations
= 1;
109 usec_t arg_base_time
= USEC_INFINITY
;
110 char *arg_unit
= NULL
;
111 JsonFormatFlags arg_json_format_flags
= JSON_FORMAT_OFF
;
112 bool arg_quiet
= false;
113 char *arg_profile
= NULL
;
114 bool arg_legend
= true;
115 bool arg_table
= false;
116 ImagePolicy
*arg_image_policy
= NULL
;
118 STATIC_DESTRUCTOR_REGISTER(arg_dot_from_patterns
, strv_freep
);
119 STATIC_DESTRUCTOR_REGISTER(arg_dot_to_patterns
, strv_freep
);
120 STATIC_DESTRUCTOR_REGISTER(arg_root
, freep
);
121 STATIC_DESTRUCTOR_REGISTER(arg_image
, freep
);
122 STATIC_DESTRUCTOR_REGISTER(arg_security_policy
, freep
);
123 STATIC_DESTRUCTOR_REGISTER(arg_unit
, freep
);
124 STATIC_DESTRUCTOR_REGISTER(arg_profile
, freep
);
125 STATIC_DESTRUCTOR_REGISTER(arg_image_policy
, image_policy_freep
);
127 int acquire_bus(sd_bus
**bus
, bool *use_full_bus
) {
130 if (use_full_bus
&& *use_full_bus
) {
131 r
= bus_connect_transport(arg_transport
, arg_host
, arg_runtime_scope
, bus
);
132 if (IN_SET(r
, 0, -EHOSTDOWN
))
135 *use_full_bus
= false;
138 return bus_connect_transport_systemd(arg_transport
, arg_host
, arg_runtime_scope
, bus
);
141 int bus_get_unit_property_strv(sd_bus
*bus
, const char *path
, const char *property
, char ***strv
) {
142 _cleanup_(sd_bus_error_free
) sd_bus_error error
= SD_BUS_ERROR_NULL
;
150 r
= sd_bus_get_property_strv(
152 "org.freedesktop.systemd1",
154 "org.freedesktop.systemd1.Unit",
159 return log_error_errno(r
, "Failed to get unit property %s: %s", property
, bus_error_message(&error
, r
));
164 void time_parsing_hint(const char *p
, bool calendar
, bool timestamp
, bool timespan
) {
165 if (calendar
&& calendar_spec_from_string(p
, NULL
) >= 0)
166 log_notice("Hint: this expression is a valid calendar specification. "
167 "Use 'systemd-analyze calendar \"%s\"' instead?", p
);
168 if (timestamp
&& parse_timestamp(p
, NULL
) >= 0)
169 log_notice("Hint: this expression is a valid timestamp. "
170 "Use 'systemd-analyze timestamp \"%s\"' instead?", p
);
171 if (timespan
&& parse_time(p
, NULL
, USEC_PER_SEC
) >= 0)
172 log_notice("Hint: this expression is a valid timespan. "
173 "Use 'systemd-analyze timespan \"%s\"' instead?", p
);
176 int dump_fd_reply(sd_bus_message
*message
) {
181 r
= sd_bus_message_read(message
, "h", &fd
);
183 return bus_log_parse_error(r
);
186 r
= copy_bytes(fd
, STDOUT_FILENO
, UINT64_MAX
, 0);
190 return 1; /* Success */
193 static int help(int argc
, char *argv
[], void *userdata
) {
194 _cleanup_free_
char *link
= NULL
, *dot_link
= NULL
;
197 pager_open(arg_pager_flags
);
199 r
= terminal_urlify_man("systemd-analyze", "1", &link
);
203 /* Not using terminal_urlify_man() for this, since we don't want the "man page" text suffix in this case. */
204 r
= terminal_urlify("man:dot(1)", "dot(1)", &dot_link
);
208 printf("%s [OPTIONS...] COMMAND ...\n\n"
209 "%sProfile systemd, show unit dependencies, check unit files.%s\n"
211 " [time] Print time required to boot the machine\n"
212 " blame Print list of running units ordered by\n"
214 " critical-chain [UNIT...] Print a tree of the time critical chain\n"
216 " plot Output SVG graphic showing service\n"
218 " dot [UNIT...] Output dependency graph in %s format\n"
219 " dump [PATTERN...] Output state serialization of service\n"
221 " cat-config NAME|PATH... Show configuration file and drop-ins\n"
222 " unit-files List files and symlinks for units\n"
223 " unit-paths List load directories for units\n"
224 " exit-status [STATUS...] List exit status definitions\n"
225 " capability [CAP...] List capability definitions\n"
226 " syscall-filter [NAME...] List syscalls in seccomp filters\n"
227 " filesystems [NAME...] List known filesystems\n"
228 " architectures [NAME...] List known architectures\n"
229 " condition CONDITION... Evaluate conditions and asserts\n"
230 " compare-versions VERSION1 [OP] VERSION2\n"
231 " Compare two version strings\n"
232 " verify FILE... Check unit files for correctness\n"
233 " calendar SPEC... Validate repetitive calendar time\n"
235 " timestamp TIMESTAMP... Validate a timestamp\n"
236 " timespan SPAN... Validate a time span\n"
237 " security [UNIT...] Analyze security of unit\n"
238 " inspect-elf FILE... Parse and print ELF package metadata\n"
239 " malloc [D-BUS SERVICE...] Dump malloc stats of a D-Bus service\n"
240 " fdstore SERVICE... Show file descriptor store contents of service\n"
241 " image-policy POLICY... Analyze image policy string\n"
242 " pcrs [PCR...] Show TPM2 PCRs and their names\n"
243 " srk [>FILE] Write TPM2 SRK (to FILE)\n"
245 " --recursive-errors=MODE Control which units are verified\n"
246 " --offline=BOOL Perform a security review on unit file(s)\n"
247 " --threshold=N Exit with a non-zero status when overall\n"
248 " exposure level is over threshold value\n"
249 " --security-policy=PATH Use custom JSON security policy instead\n"
251 " --json=pretty|short|off Generate JSON output of the security\n"
252 " analysis table, or plot's raw time data\n"
253 " --no-pager Do not pipe output into a pager\n"
254 " --no-legend Disable column headers and hints in plot\n"
255 " with either --table or --json=\n"
256 " --system Operate on system systemd instance\n"
257 " --user Operate on user systemd instance\n"
258 " --global Operate on global user configuration\n"
259 " -H --host=[USER@]HOST Operate on remote host\n"
260 " -M --machine=CONTAINER Operate on local container\n"
261 " --order Show only order in the graph\n"
262 " --require Show only requirement in the graph\n"
263 " --from-pattern=GLOB Show only origins in the graph\n"
264 " --to-pattern=GLOB Show only destinations in the graph\n"
265 " --fuzz=SECONDS Also print services which finished SECONDS\n"
266 " earlier than the latest in the branch\n"
267 " --man[=BOOL] Do [not] check for existence of man pages\n"
268 " --generators[=BOOL] Do [not] run unit generators\n"
269 " (requires privileges)\n"
270 " --iterations=N Show the specified number of iterations\n"
271 " --base-time=TIMESTAMP Calculate calendar times relative to\n"
273 " --profile=name|PATH Include the specified profile in the\n"
274 " security review of the unit(s)\n"
275 " --unit=UNIT Evaluate conditions and asserts of unit\n"
276 " --table Output plot's raw time data as a table\n"
277 " -h --help Show this help\n"
278 " --version Show package version\n"
279 " -q --quiet Do not emit hints\n"
280 " --tldr Skip comments and empty lines\n"
281 " --root=PATH Operate on an alternate filesystem root\n"
282 " --image=PATH Operate on disk image as filesystem root\n"
283 " --image-policy=POLICY Specify disk image dissection policy\n"
284 "\nSee the %s for details.\n",
285 program_invocation_short_name
,
291 /* When updating this list, including descriptions, apply changes to
292 * shell-completion/bash/systemd-analyze and shell-completion/zsh/_systemd-analyze too. */
297 static int parse_argv(int argc
, char *argv
[]) {
308 ARG_DOT_FROM_PATTERN
,
316 ARG_RECURSIVE_ERRORS
,
327 static const struct option options
[] = {
328 { "help", no_argument
, NULL
, 'h' },
329 { "version", no_argument
, NULL
, ARG_VERSION
},
330 { "quiet", no_argument
, NULL
, 'q' },
331 { "order", no_argument
, NULL
, ARG_ORDER
},
332 { "require", no_argument
, NULL
, ARG_REQUIRE
},
333 { "root", required_argument
, NULL
, ARG_ROOT
},
334 { "image", required_argument
, NULL
, ARG_IMAGE
},
335 { "image-policy", required_argument
, NULL
, ARG_IMAGE_POLICY
},
336 { "recursive-errors", required_argument
, NULL
, ARG_RECURSIVE_ERRORS
},
337 { "offline", required_argument
, NULL
, ARG_OFFLINE
},
338 { "threshold", required_argument
, NULL
, ARG_THRESHOLD
},
339 { "security-policy", required_argument
, NULL
, ARG_SECURITY_POLICY
},
340 { "system", no_argument
, NULL
, ARG_SYSTEM
},
341 { "user", no_argument
, NULL
, ARG_USER
},
342 { "global", no_argument
, NULL
, ARG_GLOBAL
},
343 { "from-pattern", required_argument
, NULL
, ARG_DOT_FROM_PATTERN
},
344 { "to-pattern", required_argument
, NULL
, ARG_DOT_TO_PATTERN
},
345 { "fuzz", required_argument
, NULL
, ARG_FUZZ
},
346 { "no-pager", no_argument
, NULL
, ARG_NO_PAGER
},
347 { "man", optional_argument
, NULL
, ARG_MAN
},
348 { "generators", optional_argument
, NULL
, ARG_GENERATORS
},
349 { "host", required_argument
, NULL
, 'H' },
350 { "machine", required_argument
, NULL
, 'M' },
351 { "iterations", required_argument
, NULL
, ARG_ITERATIONS
},
352 { "base-time", required_argument
, NULL
, ARG_BASE_TIME
},
353 { "unit", required_argument
, NULL
, 'U' },
354 { "json", required_argument
, NULL
, ARG_JSON
},
355 { "profile", required_argument
, NULL
, ARG_PROFILE
},
356 { "table", optional_argument
, NULL
, ARG_TABLE
},
357 { "no-legend", optional_argument
, NULL
, ARG_NO_LEGEND
},
358 { "tldr", no_argument
, NULL
, ARG_TLDR
},
367 while ((c
= getopt_long(argc
, argv
, "hH:M:U:q", options
, NULL
)) >= 0)
371 return help(0, NULL
, NULL
);
380 case ARG_RECURSIVE_ERRORS
:
381 if (streq(optarg
, "help")) {
382 DUMP_STRING_TABLE(recursive_errors
, RecursiveErrors
, _RECURSIVE_ERRORS_MAX
);
385 r
= recursive_errors_from_string(optarg
);
387 return log_error_errno(r
, "Unknown mode passed to --recursive-errors='%s'.", optarg
);
389 arg_recursive_errors
= r
;
393 r
= parse_path_argument(optarg
, /* suppress_root= */ true, &arg_root
);
399 r
= parse_path_argument(optarg
, /* suppress_root= */ false, &arg_image
);
404 case ARG_IMAGE_POLICY
:
405 r
= parse_image_policy_argument(optarg
, &arg_image_policy
);
411 arg_runtime_scope
= RUNTIME_SCOPE_SYSTEM
;
415 arg_runtime_scope
= RUNTIME_SCOPE_USER
;
419 arg_runtime_scope
= RUNTIME_SCOPE_GLOBAL
;
427 arg_dot
= DEP_REQUIRE
;
430 case ARG_DOT_FROM_PATTERN
:
431 if (strv_extend(&arg_dot_from_patterns
, optarg
) < 0)
436 case ARG_DOT_TO_PATTERN
:
437 if (strv_extend(&arg_dot_to_patterns
, optarg
) < 0)
443 r
= parse_sec(optarg
, &arg_fuzz
);
449 arg_pager_flags
|= PAGER_DISABLE
;
453 arg_transport
= BUS_TRANSPORT_REMOTE
;
458 arg_transport
= BUS_TRANSPORT_MACHINE
;
463 r
= parse_boolean_argument("--man", optarg
, &arg_man
);
469 r
= parse_boolean_argument("--generators", optarg
, &arg_generators
);
475 r
= parse_boolean_argument("--offline", optarg
, &arg_offline
);
481 r
= safe_atou(optarg
, &arg_threshold
);
482 if (r
< 0 || arg_threshold
> 100)
483 return log_error_errno(r
< 0 ? r
: SYNTHETIC_ERRNO(EINVAL
), "Failed to parse threshold: %s", optarg
);
487 case ARG_SECURITY_POLICY
:
488 r
= parse_path_argument(optarg
, /* suppress_root= */ false, &arg_security_policy
);
494 r
= parse_json_argument(optarg
, &arg_json_format_flags
);
500 r
= safe_atou(optarg
, &arg_iterations
);
502 return log_error_errno(r
, "Failed to parse iterations: %s", optarg
);
506 r
= parse_timestamp(optarg
, &arg_base_time
);
508 return log_error_errno(r
, "Failed to parse --base-time= parameter: %s", optarg
);
513 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Profile file name is empty");
515 if (is_path(optarg
)) {
516 r
= parse_path_argument(optarg
, /* suppress_root= */ false, &arg_profile
);
519 if (!endswith(arg_profile
, ".conf"))
520 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Profile file name must end with .conf: %s", arg_profile
);
522 r
= free_and_strdup(&arg_profile
, optarg
);
530 _cleanup_free_
char *mangled
= NULL
;
532 r
= unit_name_mangle(optarg
, UNIT_NAME_MANGLE_WARN
, &mangled
);
534 return log_error_errno(r
, "Failed to mangle unit name %s: %m", optarg
);
536 free_and_replace(arg_unit
, mangled
);
549 arg_cat_flags
= CAT_TLDR
;
556 assert_not_reached();
559 if (arg_offline
&& !streq_ptr(argv
[optind
], "security"))
560 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
561 "Option --offline= is only supported for security right now.");
563 if (arg_offline
&& optind
>= argc
- 1)
564 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
565 "Option --offline= requires one or more units to perform a security review.");
567 if (arg_json_format_flags
!= JSON_FORMAT_OFF
&& !STRPTR_IN_SET(argv
[optind
], "security", "inspect-elf", "plot", "fdstore", "pcrs", "architectures", "capability", "exit-status"))
568 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
569 "Option --json= is only supported for security, inspect-elf, plot, fdstore, pcrs, architectures, capability, exit-status right now.");
571 if (arg_threshold
!= 100 && !streq_ptr(argv
[optind
], "security"))
572 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
573 "Option --threshold= is only supported for security right now.");
575 if (arg_runtime_scope
== RUNTIME_SCOPE_GLOBAL
&&
576 !STR_IN_SET(argv
[optind
] ?: "time", "dot", "unit-paths", "verify"))
577 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
578 "Option --global only makes sense with verbs dot, unit-paths, verify.");
580 if (streq_ptr(argv
[optind
], "cat-config") && arg_runtime_scope
== RUNTIME_SCOPE_USER
)
581 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
582 "Option --user is not supported for cat-config right now.");
584 if (arg_security_policy
&& !streq_ptr(argv
[optind
], "security"))
585 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
586 "Option --security-policy= is only supported for security.");
588 if ((arg_root
|| arg_image
) && (!STRPTR_IN_SET(argv
[optind
], "cat-config", "verify", "condition")) &&
589 (!(streq_ptr(argv
[optind
], "security") && arg_offline
)))
590 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
),
591 "Options --root= and --image= are only supported for cat-config, verify, condition and security when used with --offline= right now.");
593 /* Having both an image and a root is not supported by the code */
594 if (arg_root
&& arg_image
)
595 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Please specify either --root= or --image=, the combination of both is not supported.");
597 if (arg_unit
&& !streq_ptr(argv
[optind
], "condition"))
598 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Option --unit= is only supported for condition");
600 if (streq_ptr(argv
[optind
], "condition") && !arg_unit
&& optind
>= argc
- 1)
601 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Too few arguments for condition");
603 if (streq_ptr(argv
[optind
], "condition") && arg_unit
&& optind
< argc
- 1)
604 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "No conditions can be passed if --unit= is used.");
606 if ((!arg_legend
&& !STRPTR_IN_SET(argv
[optind
], "plot", "architectures")) ||
607 (streq_ptr(argv
[optind
], "plot") && !arg_legend
&& !arg_table
&& FLAGS_SET(arg_json_format_flags
, JSON_FORMAT_OFF
)))
608 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Option --no-legend is only supported for plot with either --table or --json=.");
610 if (arg_table
&& !streq_ptr(argv
[optind
], "plot"))
611 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "Option --table is only supported for plot right now.");
613 if (arg_table
&& !FLAGS_SET(arg_json_format_flags
, JSON_FORMAT_OFF
))
614 return log_error_errno(SYNTHETIC_ERRNO(EINVAL
), "--table and --json= are mutually exclusive.");
616 return 1; /* work to do */
619 static int run(int argc
, char *argv
[]) {
620 _cleanup_(loop_device_unrefp
) LoopDevice
*loop_device
= NULL
;
621 _cleanup_(umount_and_freep
) char *mounted_dir
= NULL
;
623 static const Verb verbs
[] = {
624 { "help", VERB_ANY
, VERB_ANY
, 0, help
},
625 { "time", VERB_ANY
, 1, VERB_DEFAULT
, verb_time
},
626 { "blame", VERB_ANY
, 1, 0, verb_blame
},
627 { "critical-chain", VERB_ANY
, VERB_ANY
, 0, verb_critical_chain
},
628 { "plot", VERB_ANY
, 1, 0, verb_plot
},
629 { "dot", VERB_ANY
, VERB_ANY
, 0, verb_dot
},
630 /* ↓ The following seven verbs are deprecated, from here … ↓ */
631 { "log-level", VERB_ANY
, 2, 0, verb_log_control
},
632 { "log-target", VERB_ANY
, 2, 0, verb_log_control
},
633 { "set-log-level", 2, 2, 0, verb_log_control
},
634 { "get-log-level", VERB_ANY
, 1, 0, verb_log_control
},
635 { "set-log-target", 2, 2, 0, verb_log_control
},
636 { "get-log-target", VERB_ANY
, 1, 0, verb_log_control
},
637 { "service-watchdogs", VERB_ANY
, 2, 0, verb_service_watchdogs
},
638 /* ↑ … until here ↑ */
639 { "dump", VERB_ANY
, VERB_ANY
, 0, verb_dump
},
640 { "cat-config", 2, VERB_ANY
, 0, verb_cat_config
},
641 { "unit-files", VERB_ANY
, VERB_ANY
, 0, verb_unit_files
},
642 { "unit-paths", 1, 1, 0, verb_unit_paths
},
643 { "exit-status", VERB_ANY
, VERB_ANY
, 0, verb_exit_status
},
644 { "syscall-filter", VERB_ANY
, VERB_ANY
, 0, verb_syscall_filters
},
645 { "capability", VERB_ANY
, VERB_ANY
, 0, verb_capabilities
},
646 { "filesystems", VERB_ANY
, VERB_ANY
, 0, verb_filesystems
},
647 { "condition", VERB_ANY
, VERB_ANY
, 0, verb_condition
},
648 { "compare-versions", 3, 4, 0, verb_compare_versions
},
649 { "verify", 2, VERB_ANY
, 0, verb_verify
},
650 { "calendar", 2, VERB_ANY
, 0, verb_calendar
},
651 { "timestamp", 2, VERB_ANY
, 0, verb_timestamp
},
652 { "timespan", 2, VERB_ANY
, 0, verb_timespan
},
653 { "security", VERB_ANY
, VERB_ANY
, 0, verb_security
},
654 { "inspect-elf", 2, VERB_ANY
, 0, verb_elf_inspection
},
655 { "malloc", VERB_ANY
, VERB_ANY
, 0, verb_malloc
},
656 { "fdstore", 2, VERB_ANY
, 0, verb_fdstore
},
657 { "image-policy", 2, 2, 0, verb_image_policy
},
658 { "pcrs", VERB_ANY
, VERB_ANY
, 0, verb_pcrs
},
659 { "srk", VERB_ANY
, 1, 0, verb_srk
},
660 { "architectures", VERB_ANY
, VERB_ANY
, 0, verb_architectures
},
666 setlocale(LC_ALL
, "");
667 setlocale(LC_NUMERIC
, "C"); /* we want to format/parse floats in C style */
671 r
= parse_argv(argc
, argv
);
675 /* Open up and mount the image */
679 r
= mount_image_privately_interactively(
682 DISSECT_IMAGE_GENERIC_ROOT
|
683 DISSECT_IMAGE_RELAX_VAR_CHECK
|
684 DISSECT_IMAGE_READ_ONLY
|
685 DISSECT_IMAGE_ALLOW_USERSPACE_VERITY
,
687 /* ret_dir_fd= */ NULL
,
692 arg_root
= strdup(mounted_dir
);
697 return dispatch_verb(argc
, argv
, verbs
, NULL
);
700 DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run
);