Handle hostnames with upper-case letters
[webmin.git] / samba / conf_bind.cgi
1 #!/usr/local/bin/perl
2 # conf_bind.cgi
3 # Display winbind-related options
4
5 require './samba-lib.pl';
6
7 # check acls
8
9 &error_setup("<blink><font color=red>$text{'eacl_aviol'}</font></blink>");
10 &error("$text{'eacl_np'} $text{'eacl_pcm'}") unless $access{'conf_bind'};
11
12 &ui_print_header(undef, $text{'bind_title'}, "");
13
14 &get_share("global");
15 print "<form action=save_bind.cgi>\n";
16 print "<table border width=100%>\n";
17 print "<tr $tb> <td><b>$text{'bind_title'}</b></td> </tr>\n";
18 print "<tr $cb> <td><table width=100%>\n";
19
20 print "<tr> <td><b>$text{'bind_local'}</b></td>\n";
21 print "<td>",&ui_radio("local",
22                 &istrue("winbind enable local accounts") ? 1 : 0,
23                 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
24
25 print "<td><b>$text{'bind_trust'}</b></td>\n";
26 print "<td>",&ui_radio("trust",
27                 &istrue("winbind trusted domains only") ? 1 : 0,
28                 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
29
30 print "<tr> <td><b>$text{'bind_users'}</b></td>\n";
31 print "<td>",&ui_radio("users",
32                 &istrue("winbind enum users") ? 1 : 0,
33                 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
34
35 print "<td><b>$text{'bind_groups'}</b></td>\n";
36 print "<td>",&ui_radio("groups",
37                 &istrue("winbind enum groups") ? 1 : 0,
38                 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
39
40 print "<tr> <td><b>$text{'bind_defaultdomain'}</b></td>\n";
41 print "<td>",&ui_radio("defaultdomain",
42                 &istrue("winbind use default domain") ? 1 : 0,
43                 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
44
45 print "<tr> <td><b>$text{'bind_realm'}</b></td>\n";
46 printf "<td><input name=realm size=20 value='%s'></td>\n",
47         &getval("realm");
48
49 print "<td><b>$text{'bind_cache'}</b></td>\n";
50 printf "<td><input name=cache size=5 value='%s'></td> </tr>\n",
51         &getval("winbind cache time");
52
53 print "<tr> <td><b>$text{'bind_uid'}</b></td>\n";
54 printf "<td><input name=uid size=20 value='%s'></td>\n",
55         &getval("idmap uid");
56
57 print "<td><b>$text{'bind_gid'}</b></td>\n";
58 printf "<td><input name=gid size=20 value='%s'></td> </tr>\n",
59         &getval("idmap gid");
60
61 $backend = &getval("idmap backend");
62 print "<tr> <td><b>$text{'bind_backend'}</b></td>\n";
63 print "<td colspan=3>",
64         &ui_radio("backend_def", $backend ? 0 : 1,
65                   [ [ 1, $text{'default'} ],
66                     [ 0, &ui_textbox("backend", $backend, 50) ] ]),
67         "</td> </tr>\n";
68
69 print "</table></tr></td></table><p>\n";
70 print "<input type=submit value=$text{'save'}></form>\n";
71
72 &ui_print_footer("", $text{'index_sharelist'});
73
74