+static int fail_if_symlink(const char *unit, const char* where) {
+ assert(where);
+
+ if (is_symlink(where) > 0) {
+ log_struct_unit(LOG_WARNING,
+ unit,
+ "MESSAGE=%s: Mount on symlink %s not allowed.",
+ unit, where,
+ "WHERE=%s", where,
+ MESSAGE_ID(SD_MESSAGE_OVERMOUNTING),
+ NULL);
+
+ return -ELOOP;
+ }
+ return 0;
+}
+