#!/usr/bin/perl # edit_export.cgi # Allow editing of one export to a client require './exports-lib.pl'; &ReadParse(); local $via_pfs = 0; local $nfsv = nfs_max_version("localhost"); my $is_new=$in{'new'} ? 1 : 0; if ($in{'new'}) { &ui_print_header(undef, $text{'create_title'}, "", "create_export"); $via_pfs = ($nfsv == 4) ? 1 : 0; &list_exports(); # only to retrieve nfsv4_root $exp->{"pfs"} = $nfsv4_root; } else { &ui_print_header(undef, $text{'edit_title'}, "", "edit_export"); @exps = &list_exports(); $exp = $exps[$in{'idx'}]; %opts = %{$exp->{'options'}}; } # WebNFS doesn't exist on Linux local $linux = ($gconfig{'os_type'} =~ /linux/i) ? 1 : 0; print qq* *; #-------------------------------------------------------------------- # Get values for export to # Mode : 0 = public, 1 = netgroup NIS, 2= IPv4 network, 3= everybody, # 4=hostname, 5 = gss, 6= IPv6 address #--------------------------------------------------------------------- my $h = $exp->{'host'}; # and value for authentication local $auth = "", $sec = ""; my $html=""; # parse security flavors list and build html code for "select" component while ($h =~/^(((gss\/)?(krb5|spkm-3|lipkey))|\sys)([ip]?)(([,:](\S+))|$)/ || $h =~/^gss\/(krb5|spkm-3|lipkey)([ip]?)$/) { $auth = $1; # sys, krb5, spkm-3 or lipkey $sec=$5; # authentication(""), integrity("i"), privacy("p") my $to_add=0; my $suffix=""; if($sec eq "i"){ $to_add=1; $suffix=" (i)" } elsif($sec eq "p"){ $to_add=2; $suffix=" (p)" } if($auth eq "sys"){ $html.=qq*