diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-09-12 14:37:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-09-12 14:37:40 +0000 |
commit | 02a2d8348b64be16ec328d0fd6f4140b09fa2861 (patch) | |
tree | 7a28e730e32c1ea757103eb0074ce4f88bcfc562 | |
parent | b72c462da6d20e741f55b2407000893c77730da3 (diff) | |
download | drakx-02a2d8348b64be16ec328d0fd6f4140b09fa2861.tar drakx-02a2d8348b64be16ec328d0fd6f4140b09fa2861.tar.gz drakx-02a2d8348b64be16ec328d0fd6f4140b09fa2861.tar.bz2 drakx-02a2d8348b64be16ec328d0fd6f4140b09fa2861.tar.xz drakx-02a2d8348b64be16ec328d0fd6f4140b09fa2861.zip |
(row_setting_dialog) prevent entering a path that is not absolute
-rwxr-xr-x | perl-install/standalone/drakperm | 7 |
1 files changed, 6 insertions, 1 deletions
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 = ''; |