From 02a2d8348b64be16ec328d0fd6f4140b09fa2861 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 12 Sep 2005 14:37:40 +0000 Subject: (row_setting_dialog) prevent entering a path that is not absolute --- perl-install/standalone/drakperm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/standalone/drakperm') diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm index 33424343a..a42525e7b 100755 --- a/perl-install/standalone/drakperm +++ b/perl-install/standalone/drakperm @@ -6,7 +6,7 @@ use lib qw(/usr/lib/libDrakX); use standalone; use common; -use ugtk2 qw(:helpers :wrappers :create); +use ugtk2 qw(:create :dialogs :helpers :wrappers); $ugtk2::wm_icon = "/usr/share/mcc/themes/default/drakperm-mdk.png"; require_root_capability(); @@ -376,6 +376,11 @@ sub row_setting_dialog { ok_clicked => sub { my ($path, $user, $group, $perms, $_idx); $path = $file->get_text; + if ($path !~ m!^/!) { + print "checking '$path'\n"; + warn_dialog(N("Warning"), N("The first character of the path must be a slash (\"/\"):\n\"%s\"", $path)) or return; + return 1; + } if ($usr_check->get_active) { $user = 'current'; $group = ''; -- cgit v1.2.1