chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journalctl: display source timestamp, not journald timestamp, if known
[elogind.git]
/
src
/
quotacheck.c
diff --git
a/src/quotacheck.c
b/src/quotacheck.c
index 057d8617c2290172170771cbebb1b7580df43919..60033a8eb256275c2df03b51b1cf4a5ad31cfde5 100644
(file)
--- a/
src/quotacheck.c
+++ b/
src/quotacheck.c
@@
-26,6
+26,7
@@
#include <unistd.h>
#include "util.h"
#include <unistd.h>
#include "util.h"
+#include "virt.h"
static bool arg_skip = false;
static bool arg_force = false;
static bool arg_skip = false;
static bool arg_force = false;
@@
-35,7
+36,7
@@
static int parse_proc_cmdline(void) {
int r;
size_t l;
int r;
size_t l;
- if (detect_
virtualization
(NULL) > 0)
+ if (detect_
container
(NULL) > 0)
return 0;
if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
return 0;
if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
@@
-53,7
+54,7
@@
static int parse_proc_cmdline(void) {
arg_skip = true;
else if (startswith(w, "quotacheck.mode"))
log_warning("Invalid quotacheck.mode= parameter. Ignoring.");
arg_skip = true;
else if (startswith(w, "quotacheck.mode"))
log_warning("Invalid quotacheck.mode= parameter. Ignoring.");
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
+#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
|| defined(TARGET_MAGEIA)
else if (strneq(w, "forcequotacheck", l))
arg_force = true;
#endif
else if (strneq(w, "forcequotacheck", l))
arg_force = true;
#endif
@@
-64,8
+65,8
@@
static int parse_proc_cmdline(void) {
}
static void test_files(void) {
}
static void test_files(void) {
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
- /* This exists only on Fedora
or Mandriv
a */
+#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
|| defined(TARGET_MAGEIA)
+ /* This exists only on Fedora
, Mandriva or Magei
a */
if (access("/forcequotacheck", F_OK) >= 0)
arg_force = true;
#endif
if (access("/forcequotacheck", F_OK) >= 0)
arg_force = true;
#endif
@@
-90,6
+91,8
@@
int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
log_parse_environment();
log_open();
+ umask(0022);
+
parse_proc_cmdline();
test_files();
parse_proc_cmdline();
test_files();
@@
-97,7
+100,7
@@
int main(int argc, char *argv[]) {
if (arg_skip)
return 0;
if (arg_skip)
return 0;
- if (access("/
dev/.
run/systemd/quotacheck", F_OK) < 0)
+ if (access("/run/systemd/quotacheck", F_OK) < 0)
return 0;
}
return 0;
}