diff --git a/root/etc/e-smith/web/functions/userinfo b/root/etc/e-smith/web/functions/userinfo
index 9be35ab..7519761 100644
--- a/root/etc/e-smith/web/functions/userinfo
+++ b/root/etc/e-smith/web/functions/userinfo
@@ -135,7 +135,7 @@ __DATA__
+ value="get_ldap_value('Shell')" validation="exec_exists_or_empty">
DESKTOP_SHELL
+ value="get_ldap_value('ChrootDir')" validation="dir_exists_or_empty">
diff --git a/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm b/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm
index dc093d1..afae1fd 100644
--- a/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm
+++ b/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm
@@ -235,20 +235,20 @@ sub url_or_empty {
return $ret;
}
-sub dir_exists {
+sub dir_exists_or_empty {
my ($self, $field) = @_;
my $ret = $self->localise('DIR_DOES_NOT_EXIST');
- $ret = 'OK' if (-d "$field");
+ $ret = 'OK' if ((-d "$field") || ($field eq ''));
return $ret;
}
-sub exec_exists {
+sub exec_exists_or_empty {
my ($self, $field) = @_;
my $ret = $self->localise('IS_NOT_AN_EXECUTABLE');
- $ret = 'OK' if (-x "$field");
+ $ret = 'OK' if ((-x "$field") || ($field eq ''));
return $ret;
}