From: Alfredo Deza Date: Wed, 8 Nov 2017 14:10:47 +0000 (-0500) Subject: ceph-volume util.arg_validators require superuser privs to check paths X-Git-Tag: v13.0.1~256^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=376dad74159532f901d0044f95330fc02f93bd25;p=ceph.git ceph-volume util.arg_validators require superuser privs to check paths Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/util/arg_validators.py b/src/ceph-volume/ceph_volume/util/arg_validators.py index 6a2ff956e858..05438092ca8e 100644 --- a/src/ceph-volume/ceph_volume/util/arg_validators.py +++ b/src/ceph-volume/ceph_volume/util/arg_validators.py @@ -1,6 +1,7 @@ import argparse import os -from ceph_volume import terminal +from ceph_volume import terminal, exceptions +from ceph_volume import decorators from ceph_volume.util import disk @@ -45,6 +46,7 @@ class OSDPath(object): Validate path exists and it looks like an OSD directory. """ + @decorators.needs_root def __call__(self, string): if not os.path.exists(string): error = "Path does not exist: %s" % string