Ajout d'un champ chroot

tags/ipasserelle-base-0.2.65-1
Daniel Berteaud 12 years ago
parent 83b4432d3c
commit 0cb6a37f0d
  1. 8
      root/etc/e-smith/locale/fr/etc/e-smith/web/functions/userinfo
  2. 4
      root/etc/e-smith/web/functions/userinfo
  3. 9
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm

@ -99,4 +99,12 @@
<base>DESKTOP_SHELL</base>
<trans>Shell de connexion aux postes de travail</trans>
</entry>
<entry>
<base>CHROOT_DIR</base>
<trans>Répertoire racine (chroot)</trans>
</entry>
<entry>
<base>DIR_DOES_NOT_EXIST</base>
<trans>Ce répertoire n'existe pas</trans>
</entry>
</lexicon>

@ -142,6 +142,10 @@ __DATA__
value="get_ldap_value('DesktopShell')">
<label>DESKTOP_SHELL</label>
</field>
<field type="text" size="30" id="ChrootDir"
value="get_ldap_value('ChrootDir')" validation="dir_exists">
<label>CHROOT_DIR</label>
</field>
<subroutine src="print_save_button()" />
</page>
</form>

@ -151,6 +151,7 @@ sub modify_user {
'Url' => $self->{cgi}->param('Url'),
'Shell' => $self->{cgi}->param('Shell'),
'DesktopShell' => $self->{cgi}->param('DesktopShell'),
'ChrootDir' => $self->{cgi}->param('ChrootDir'),
);
$acct->merge_props(%newProperties);
@ -234,4 +235,12 @@ sub url_or_empty {
return $ret;
}
sub dir_exists {
my ($self, $field) = @_;
my $ret = $self->localise('DIR_DOES_NOT_EXIST');
$ret = 'OK' if (-d "$field");
return $ret;
}
1;

Loading…
Cancel
Save