MCPcopy Create free account
hub / github.com/containers/bubblewrap / label_mount

Function label_mount

utils.c:904–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

902}
903
904char *
905label_mount (const char *opt, UNUSED const char *mount_label)
906{
907#ifdef HAVE_SELINUX
908 if (mount_label)
909 {
910 if (opt)
911 return xasprintf ("%s,context=\"%s\"", opt, mount_label);
912 else
913 return xasprintf ("context=\"%s\"", mount_label);
914 }
915#endif
916 if (opt)
917 return xstrdup (opt);
918 return NULL;
919}
920
921int
922label_create_file (UNUSED const char *file_label)

Callers 1

privileged_opFunction · 0.85

Calls 2

xasprintfFunction · 0.85
xstrdupFunction · 0.85

Tested by

no test coverage detected