summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chcon.c8
-rw-r--r--src/chmod.c9
-rw-r--r--src/chown-core.c8
3 files changed, 25 insertions, 0 deletions
diff --git a/src/chcon.c b/src/chcon.c
index 2badefbbd..5e58cacbf 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -267,6 +267,14 @@ process_file (FTS *fts, FTSENT *ent)
ok = false;
break;
+ case FTS_DC: /* directory that causes cycles */
+ if (cycle_warning_required (fts, ent))
+ {
+ emit_cycle_warning (file_full_name);
+ return false;
+ }
+ break;
+
default:
break;
}
diff --git a/src/chmod.c b/src/chmod.c
index da350032f..1a0dafa70 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -228,6 +228,15 @@ process_file (FTS *fts, FTSENT *ent)
error (0, 0, _("cannot operate on dangling symlink %s"),
quote (file_full_name));
ok = false;
+ break;
+
+ case FTS_DC: /* directory that causes cycles */
+ if (cycle_warning_required (fts, ent))
+ {
+ emit_cycle_warning (file_full_name);
+ return false;
+ }
+ break;
default:
break;
diff --git a/src/chown-core.c b/src/chown-core.c
index e7dacf68c..eaebe60f9 100644
--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -316,6 +316,14 @@ change_file_owner (FTS *fts, FTSENT *ent,
ok = false;
break;
+ case FTS_DC: /* directory that causes cycles */
+ if (cycle_warning_required (fts, ent))
+ {
+ emit_cycle_warning (file_full_name);
+ return false;
+ }
+ break;
+
default:
break;
}