Blame SOURCES/autofs-5.0.8-check-for-bind-onto-self-in-mount_bind-c.patch
|
|
6bbd11 |
autofs-5.0.8 - check for bind onto self in mount_bind.c
|
|
|
6bbd11 |
|
|
|
6bbd11 |
From: Ian Kent <raven@themaw.net>
|
|
|
6bbd11 |
|
|
|
6bbd11 |
Check for an obviously impossible request to bind or symlink to the
|
|
|
6bbd11 |
same patch for source and target.
|
|
|
6bbd11 |
---
|
|
|
6bbd11 |
CHANGELOG | 1 +
|
|
|
6bbd11 |
modules/mount_bind.c | 6 ++++++
|
|
|
6bbd11 |
2 files changed, 7 insertions(+)
|
|
|
6bbd11 |
|
|
|
6bbd11 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
6bbd11 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
6bbd11 |
@@ -85,6 +85,7 @@
|
|
|
6bbd11 |
- fix compilation of lookup_ldap.c without sasl.
|
|
|
6bbd11 |
- fix undefined authtype_requires_creds err if ldap enabled but without sasl.
|
|
|
6bbd11 |
- pass map_source as function paramter where possible.
|
|
|
6bbd11 |
+- check for bind onto self in mount_bind.c.
|
|
|
6bbd11 |
|
|
|
6bbd11 |
25/07/2012 autofs-5.0.7
|
|
|
6bbd11 |
=======================
|
|
|
6bbd11 |
--- autofs-5.0.7.orig/modules/mount_bind.c
|
|
|
6bbd11 |
+++ autofs-5.0.7/modules/mount_bind.c
|
|
|
6bbd11 |
@@ -135,6 +135,12 @@ int mount_mount(struct autofs_point *ap,
|
|
|
6bbd11 |
if (options == NULL || *options == '\0')
|
|
|
6bbd11 |
options = "defaults";
|
|
|
6bbd11 |
|
|
|
6bbd11 |
+ if (!strcmp(what, fullpath)) {
|
|
|
6bbd11 |
+ debug(ap->logopt, MODPREFIX
|
|
|
6bbd11 |
+ "cannot mount or symlink %s to itself", fullpath);
|
|
|
6bbd11 |
+ return 1;
|
|
|
6bbd11 |
+ }
|
|
|
6bbd11 |
+
|
|
|
6bbd11 |
if (!symlnk && bind_works) {
|
|
|
6bbd11 |
int status, existed = 1;
|
|
|
6bbd11 |
|