summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-08-27 22:47:45 +0000
committerEgbert Eich <eich@suse.de>2004-08-27 22:47:45 +0000
commitd92a9d31416a8366cd065886d7ff352fefce646d (patch)
tree4c293667b20e31c108dcd46eb202651d89577d2d
parent48ffd91cff9a07c68194f6d0b380dd2acd46a8ca (diff)
when socket directory cannot chowned/chmod to correct user/group. This should be added on a per OS basis which hasn't been done.
-rw-r--r--Xtransutil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Xtransutil.c b/Xtransutil.c
index 05bccca..2432ba7 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -533,7 +533,9 @@ trans_mkdir(char *path, int mode)
PRMSG(1, "mkdir: ERROR: euid != 0,"
"directory %s will not be created.\n",
path, 0, 0);
+#ifdef FAIL_HARD
return -1;
+#endif
} else {
PRMSG(1, "mkdir: Cannot create %s with root ownership\n",
path, 0, 0);
@@ -544,7 +546,9 @@ trans_mkdir(char *path, int mode)
if (chmod(path, mode)) {
PRMSG(1, "mkdir: ERROR: Mode of %s should be set to %04o\n",
path, mode, 0);
+#ifdef FAIL_HARD
return -1;
+#endif
}
} else {
PRMSG(1, "mkdir: ERROR: Cannot create %s\n",
@@ -631,21 +635,25 @@ trans_mkdir(char *path, int mode)
#endif
if (updateOwner && !updatedOwner) {
+#ifdef FAIL_HARD
if (status & FAIL_IF_NOT_ROOT) {
PRMSG(1, "mkdir: ERROR: Owner of %s must be set to root\n",
path, 0, 0);
return -1;
}
+#endif
PRMSG(1, "mkdir: Owner of %s should be set to root\n",
path, 0, 0);
}
if (updateMode && !updatedMode) {
+#ifdef FAIL_HARD
if (status & FAIL_IF_NOMODE) {
PRMSG(1, "mkdir: ERROR: Mode of %s must be set to %04o\n",
path, mode, 0);
return -1;
}
+#endif
PRMSG(1, "mkdir: Mode of %s should be set to %04o\n",
path, mode, 0);
if (status & WARN_NO_ACCESS) {