summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-01 17:27:20 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-01 17:29:01 -0400
commit2d65965adaf7dd4867f6cc913db39f0392ad2b0b (patch)
tree292518a30a4b59ec9b270fc126f6ea8086b7e4b2 /src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
parent87c1e167fb669a1f19214916422be58a9b13db33 (diff)
downloadbcfg2-2d65965adaf7dd4867f6cc913db39f0392ad2b0b.tar.gz
bcfg2-2d65965adaf7dd4867f6cc913db39f0392ad2b0b.tar.bz2
bcfg2-2d65965adaf7dd4867f6cc913db39f0392ad2b0b.zip
bcfg2-lint: allow relative symlinks (from John Morris)
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/RequiredAttrs.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/RequiredAttrs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
index fcb7c6c28..f5385cabb 100644
--- a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
+++ b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
@@ -15,6 +15,9 @@ except ImportError:
def is_filename(val):
return val.startswith("/") and len(val) > 1
+def is_relative_filename(val):
+ return len(val) > 1
+
def is_selinux_type(val):
return re.match(r'^[a-z_]+_t', val)
@@ -52,7 +55,7 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin):
group=is_username, perms=is_octal_mode,
__text__=None),
hardlink=dict(name=is_filename, to=is_filename),
- symlink=dict(name=is_filename, to=is_filename),
+ symlink=dict(name=is_filename, to=is_relative_filename),
ignore=dict(name=is_filename),
nonexistent=dict(name=is_filename),
permissions=dict(name=is_filename, owner=is_username,