chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mkdir: append _label to all mkdir() calls that explicitly set the selinux context
[elogind.git]
/
src
/
cryptsetup
/
cryptsetup-generator.c
diff --git
a/src/cryptsetup/cryptsetup-generator.c
b/src/cryptsetup/cryptsetup-generator.c
index 51706b7a860766c804fbefe8fbff283cc1f60a96..3961d5d965425fc6d9233efd58a9b5c8e17bac68 100644
(file)
--- a/
src/cryptsetup/cryptsetup-generator.c
+++ b/
src/cryptsetup/cryptsetup-generator.c
@@
-175,7
+175,7
@@
static int create_disk(
goto fail;
}
goto fail;
}
- mkdir_parents(to, 0755);
+ mkdir_parents
_label
(to, 0755);
if (symlink(from, to) < 0) {
log_error("Failed to create symlink '%s' to '%s': %m", from, to);
r = -errno;
if (symlink(from, to) < 0) {
log_error("Failed to create symlink '%s' to '%s': %m", from, to);
r = -errno;
@@
-193,7
+193,7
@@
static int create_disk(
goto fail;
}
goto fail;
}
- mkdir_parents(to, 0755);
+ mkdir_parents
_label
(to, 0755);
if (symlink(from, to) < 0) {
log_error("Failed to create symlink '%s' to '%s': %m", from, to);
r = -errno;
if (symlink(from, to) < 0) {
log_error("Failed to create symlink '%s' to '%s': %m", from, to);
r = -errno;
@@
-211,7
+211,7
@@
static int create_disk(
goto fail;
}
goto fail;
}
- mkdir_parents(to, 0755);
+ mkdir_parents
_label
(to, 0755);
if (symlink(from, to) < 0) {
log_error("Failed to create symlink '%s' to '%s': %m", from, to);
r = -errno;
if (symlink(from, to) < 0) {
log_error("Failed to create symlink '%s' to '%s': %m", from, to);
r = -errno;
@@
-240,8
+240,8
@@
int main(int argc, char *argv[]) {
int r = EXIT_SUCCESS;
unsigned n = 0;
int r = EXIT_SUCCESS;
unsigned n = 0;
- if (argc >
2
) {
- log_error("This program takes
on
e or no arguments.");
+ if (argc >
1 && argc != 4
) {
+ log_error("This program takes
thre
e or no arguments.");
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}