Menu

[r10367]: / legacy / www / services_samba.php  Maximize  Restore  History

Download this file

442 lines (413 with data), 23.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
#!/usr/local/bin/php
<?php
/*
services_samba.php
Modified for XHTML by Daisuke Aoyama (aoyama@peach.ne.jp)
Copyright (C) 2010-2011 Daisuke Aoyama <aoyama@peach.ne.jp>.
All rights reserved.
part of FreeNAS (http://www.freenas.org)
Copyright (C) 2005-2011 Olivier Cochard-Labbe <olivier@freenas.org>.
All rights reserved.
Based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require("auth.inc");
require("guiconfig.inc");
$pgtitle = array(gettext("Services"),gettext("CIFS/SMB"),gettext("Settings"));
if (!is_array($config['samba'])) {
$config['samba'] = array();
}
if(!is_array($config['samba']['auxparam']))
$config['samba']['auxparam'] = array();
sort($config['samba']['auxparam']);
if (!is_array($config['mounts']['mount']))
$config['mounts']['mount'] = array();
array_sort_key($config['mounts']['mount'], "devicespecialfile");
$a_mount = &$config['mounts']['mount'];
$pconfig['netbiosname'] = $config['samba']['netbiosname'];
$pconfig['workgroup'] = $config['samba']['workgroup'];
$pconfig['serverdesc'] = $config['samba']['serverdesc'];
$pconfig['security'] = $config['samba']['security'];
$pconfig['maxprotocol'] = $config['samba']['maxprotocol'];
$pconfig['localmaster'] = $config['samba']['localmaster'];
$pconfig['winssrv'] = $config['samba']['winssrv'];
$pconfig['timesrv'] = $config['samba']['timesrv'];
$pconfig['unixcharset'] = $config['samba']['unixcharset'];
$pconfig['doscharset'] = $config['samba']['doscharset'];
$pconfig['loglevel'] = $config['samba']['loglevel'];
$pconfig['sndbuf'] = $config['samba']['sndbuf'];
$pconfig['rcvbuf'] = $config['samba']['rcvbuf'];
$pconfig['enable'] = isset($config['samba']['enable']);
$pconfig['largereadwrite'] = isset($config['samba']['largereadwrite']);
$pconfig['usesendfile'] = isset($config['samba']['usesendfile']);
$pconfig['easupport'] = isset($config['samba']['easupport']);
$pconfig['storedosattributes'] = isset($config['samba']['storedosattributes']);
$pconfig['createmask'] = $config['samba']['createmask'];
$pconfig['directorymask'] = $config['samba']['directorymask'];
$pconfig['guestaccount'] = $config['samba']['guestaccount'];
$pconfig['maptoguest'] = $config['samba']['maptoguest'];
$pconfig['nullpasswords'] = isset($config['samba']['nullpasswords']);
$pconfig['aio'] = isset($config['samba']['aio']);
$pconfig['aiorsize'] = $config['samba']['aiorsize'];
$pconfig['aiowsize'] = $config['samba']['aiowsize'];
$pconfig['aiowbehind'] = $config['samba']['aiowbehind'];
if (is_array($config['samba']['auxparam']))
$pconfig['auxparam'] = implode("\n", $config['samba']['auxparam']);
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
if ($_POST['enable']) {
$reqdfields = explode(" ", "security netbiosname workgroup");
$reqdfieldsn = array(gettext("Authentication"),gettext("NetBIOS name"),gettext("Workgroup"));
$reqdfieldst = explode(" ", "string domain workgroup");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, &$input_errors);
// Do additional input type validation.
$reqdfields = explode(" ", "sndbuf rcvbuf");
$reqdfieldsn = array(gettext("Send Buffer Size"),gettext("Receive Buffer Size"));
$reqdfieldst = explode(" ", "numericint numericint");
if ($_POST['security'] == "share" && $_POST['maxprotocol'] == "SMB2") {
$input_errors[] = gettext("It cannot be used combining SMB2 and Anonymous.");
}
if (!empty($_POST['createmask']) || !empty($_POST['directorymask'])) {
$reqdfields = array_merge($reqdfields, explode(" ", "createmask directorymask"));
$reqdfieldsn = array_merge($reqdfieldsn, array(gettext("Create mask"), gettext("Directory mask")));
$reqdfieldst = array_merge($reqdfieldst, explode(" ", "filemode filemode"));
}
if (!empty($_POST['winssrv'])) {
$reqdfields = array_merge($reqdfields, explode(" ", "winssrv"));
$reqdfieldsn = array_merge($reqdfieldsn, array(gettext("WINS server")));
$reqdfieldst = array_merge($reqdfieldst, explode(" ", "ipaddr"));
}
if ($_POST['aio']) {
$reqdfields = array_merge($reqdfields, explode(" ", "aiorsize aiowsize"));
$reqdfieldsn = array_merge($reqdfieldsn, array(gettext("AIO read size"), gettext("AIO write size")));
$reqdfieldst = array_merge($reqdfieldst, explode(" ", "numericint numericint"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, &$input_errors);
}
if (!$input_errors) {
$config['samba']['enable'] = $_POST['enable'] ? true : false;
$config['samba']['netbiosname'] = $_POST['netbiosname'];
$config['samba']['workgroup'] = $_POST['workgroup'];
$config['samba']['serverdesc'] = $_POST['serverdesc'];
$config['samba']['security'] = $_POST['security'];
if ($_POST['security'] == "share") {
$config['samba']['maxprotocol'] = "NT1";
} else {
$config['samba']['maxprotocol'] = $_POST['maxprotocol'];
}
$config['samba']['localmaster'] = $_POST['localmaster'];
$config['samba']['winssrv'] = $_POST['winssrv'];
$config['samba']['timesrv'] = $_POST['timesrv'];
$config['samba']['doscharset'] = $_POST['doscharset'];
$config['samba']['unixcharset'] = $_POST['unixcharset'];
$config['samba']['loglevel'] = $_POST['loglevel'];
$config['samba']['sndbuf'] = $_POST['sndbuf'];
$config['samba']['rcvbuf'] = $_POST['rcvbuf'];
$config['samba']['largereadwrite'] = $_POST['largereadwrite'] ? true : false;
$config['samba']['usesendfile'] = $_POST['usesendfile'] ? true : false;
$config['samba']['easupport'] = $_POST['easupport'] ? true : false;
$config['samba']['storedosattributes'] = $_POST['storedosattributes'] ? true : false;
if (!empty($_POST['createmask']))
$config['samba']['createmask'] = $_POST['createmask'];
else
unset($config['samba']['createmask']);
if (!empty($_POST['directorymask']))
$config['samba']['directorymask'] = $_POST['directorymask'];
else
unset($config['samba']['directorymask']);
if (!empty($_POST['guestaccount']))
$config['samba']['guestaccount'] = $_POST['guestaccount'];
else
unset($config['samba']['guestaccount']);
$config['samba']['maptoguest'] = $_POST['maptoguest'];
$config['samba']['nullpasswords'] = $_POST['nullpasswords'] ? true : false;
$config['samba']['aio'] = $_POST['aio'] ? true : false;
if ($_POST['aio']) {
$config['samba']['aiorsize'] = $_POST['aiorsize'];
$config['samba']['aiowsize'] = $_POST['aiowsize'];
$config['samba']['aiowbehind'] = '';
}
if ($config['samba']['maxprotocol'] == "SMB2") {
$config['samba']['usesendfile'] = false;
unset($pconfig['usesendfile']);
}
# Write additional parameters.
unset($config['samba']['auxparam']);
foreach (explode("\n", $_POST['auxparam']) as $auxparam) {
$auxparam = trim($auxparam, "\t\n\r");
if (!empty($auxparam))
$config['samba']['auxparam'][] = $auxparam;
}
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval |= rc_update_service("samba");
$retval |= rc_update_service("mdnsresponder");
config_unlock();
}
$savemsg = get_std_save_message($retval);
}
}
?>
<?php include("fbegin.inc");?>
<script type="text/javascript">
<!--
function enable_change(enable_change) {
var endis = !(document.iform.enable.checked || enable_change);
document.iform.netbiosname.disabled = endis;
document.iform.workgroup.disabled = endis;
document.iform.localmaster.disabled = endis;
document.iform.winssrv.disabled = endis;
document.iform.timesrv.disabled = endis;
document.iform.serverdesc.disabled = endis;
document.iform.doscharset.disabled = endis;
document.iform.unixcharset.disabled = endis;
document.iform.loglevel.disabled = endis;
document.iform.sndbuf.disabled = endis;
document.iform.rcvbuf.disabled = endis;
document.iform.security.disabled = endis;
document.iform.maxprotocol.disabled = endis;
document.iform.largereadwrite.disabled = endis;
document.iform.usesendfile.disabled = endis;
document.iform.easupport.disabled = endis;
document.iform.storedosattributes.disabled = endis;
document.iform.createmask.disabled = endis;
document.iform.directorymask.disabled = endis;
document.iform.guestaccount.disabled = endis;
document.iform.maptoguest.disabled = endis;
document.iform.nullpasswords.disabled = endis;
document.iform.aio.disabled = endis;
document.iform.aiorsize.disabled = endis;
document.iform.aiowsize.disabled = endis;
document.iform.auxparam.disabled = endis;
}
function authentication_change() {
switch(document.iform.security.value) {
case "share":
showElementById('createmask_tr','show');
showElementById('directorymask_tr','show');
showElementById('winssrv_tr','hide');
break;
case "ads":
showElementById('createmask_tr','hide');
showElementById('directorymask_tr','hide');
showElementById('winssrv_tr','show');
break;
default:
showElementById('createmask_tr','hide');
showElementById('directorymask_tr','hide');
showElementById('winssrv_tr','hide');
break;
}
}
function aio_change() {
switch (document.iform.aio.checked) {
case true:
showElementById('aiorsize_tr','show');
showElementById('aiowsize_tr','show');
break;
case false:
showElementById('aiorsize_tr','hide');
showElementById('aiowsize_tr','hide');
break;
}
}
//-->
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabnavtbl">
<ul id="tabnav">
<li class="tabact"><a href="services_samba.php" title="<?=gettext("Reload page");?>"><span><?=gettext("Settings");?></span></a></li>
<li class="tabinact"><a href="services_samba_share.php"><span><?=gettext("Shares");?></span></a></li>
</ul>
</td>
</tr>
<tr>
<td class="tabcont">
<form action="services_samba.php" method="post" name="iform" id="iform">
<?php if ($input_errors) print_input_errors($input_errors);?>
<?php if ($savemsg) print_info_box($savemsg);?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<?php html_titleline_checkbox("enable", gettext("Common Internet File System"), $pconfig['enable'] ? true : false, gettext("Enable"), "enable_change(false)");?>
<?php html_combobox("security", gettext("Authentication"), $pconfig['security'], array("share" => gettext("Anonymous"), "user" => gettext("Local User"), "ads" => gettext("Active Directory")), "", true, false, "authentication_change()");?>
<?php html_combobox("maxprotocol", gettext("Max Protocol"), $pconfig['maxprotocol'], array("SMB2" => gettext("SMB2"), "NT1" => gettext("NT1")), gettext("SMB2 is for recent OS like Windows 7 and Vista. NT1 is for legacy OS like XP."), true, false, "");?>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("NetBIOS name");?></td>
<td width="78%" class="vtable">
<input name="netbiosname" type="text" class="formfld" id="netbiosname" size="30" value="<?=htmlspecialchars($pconfig['netbiosname']);?>" />
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Workgroup") ; ?></td>
<td width="78%" class="vtable">
<input name="workgroup" type="text" class="formfld" id="workgroup" size="30" value="<?=htmlspecialchars($pconfig['workgroup']);?>" />
<br /><?=gettext("Workgroup the server will appear to be in when queried by clients (maximum 15 characters).");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description") ;?></td>
<td width="78%" class="vtable">
<input name="serverdesc" type="text" class="formfld" id="serverdesc" size="30" value="<?=htmlspecialchars($pconfig['serverdesc']);?>" />
<br /><?=gettext("Server description. This can usually be left blank.") ;?>
</td>
</tr>
<?php html_combobox("doscharset", gettext("Dos charset"), $pconfig['doscharset'], array("CP437" => gettext("CP437 (Latin US)"), "CP850" => gettext("CP850 (Latin 1)"), "CP852" => gettext("CP852 (Latin 2)"), "CP866" => gettext("CP866 (Cyrillic CIS 1)"), "CP932" => gettext("CP932 (Japanese Shift-JIS)"), "CP936" => gettext("CP936 (Simplified Chinese GBK)"), "CP949" => gettext("CP949 (Korean)"), "CP950" => gettext("CP950 (Traditional Chinese Big5)"), "CP1251" => gettext("CP1251 (Cyrillic)"), "ASCII" => "ASCII"), "", false);?>
<?php html_combobox("unixcharset", gettext("Unix charset"), $pconfig['unixcharset'], array("UTF-8" => "UTF-8", "iso-8859-1" => "iso-8859-1", "iso-8859-15" => "iso-8859-15", "gb2312" => "gb2312", "EUC-JP" => "EUC-JP", "ASCII" => "ASCII"), "", false);?>
<?php html_combobox("loglevel", gettext("Log Level"), $pconfig['loglevel'], array("1" => gettext("Minimum"), "2" => gettext("Normal"), "3" => gettext("Full"), "10" => gettext("Debug")), "", false);?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Local Master Browser"); ?></td>
<td width="78%" class="vtable">
<select name="localmaster" class="formfld" id="localmaster">
<?php $types = array(gettext("Yes"),gettext("No")); $vals = explode(" ", "yes no");?>
<?php $j = 0; for ($j = 0; $j < count($vals); $j++): ?>
<option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['localmaster']) echo "selected=\"selected\"";?>>
<?=htmlspecialchars($types[$j]);?>
</option>
<?php endfor; ?>
</select>
<br /><?php echo sprintf(gettext("Allows %s to try and become a local master browser."), get_product_name());?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Time server"); ?></td>
<td width="78%" class="vtable">
<select name="timesrv" class="formfld" id="timesrv">
<?php $types = array(gettext("Yes"),gettext("No")); $vals = explode(" ", "yes no");?>
<?php $j = 0; for ($j = 0; $j < count($vals); $j++): ?>
<option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['timesrv']) echo "selected=\"selected\"";?>>
<?=htmlspecialchars($types[$j]);?>
</option>
<?php endfor; ?>
</select>
<br /><?php echo sprintf(gettext("%s advertises itself as a time server to Windows clients."), get_product_name());?>
</td>
</tr>
<tr id="winssrv_tr">
<td width="22%" valign="top" class="vncell"><?=gettext("WINS server"); ?></td>
<td width="78%" class="vtable">
<input name="winssrv" type="text" class="formfld" id="winssrv" size="30" value="<?=htmlspecialchars($pconfig['winssrv']);?>" />
<br /><?=gettext("WINS server IP address (e.g. from MS Active Directory server).");?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced settings");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Guest account");?></td>
<td width="78%" class="vtable">
<input name="guestaccount" type="text" class="formfld" id="guestaccount" size="30" value="<?=htmlspecialchars($pconfig['guestaccount']);?>" />
<br /><?=gettext("Use this option to override the username ('ftp' by default) which will be used for access to services which are specified as guest. Whatever privileges this user has will be available to any client connecting to the guest service. This user must exist in the password file, but does not require a valid login.");?>
</td>
</tr>
<?php html_combobox("maptoguest", gettext("Map to guest"), $pconfig['maptoguest'], array("Never" => gettext("Never - default"), "Bad User" => gettext("Bad User - non existing users")), "", false, false, "");?>
<tr id="createmask_tr">
<td width="22%" valign="top" class="vncell"><?=gettext("Create mask"); ?></td>
<td width="78%" class="vtable">
<input name="createmask" type="text" class="formfld" id="createmask" size="30" value="<?=htmlspecialchars($pconfig['createmask']);?>" />
<br /><?=gettext("Use this option to override the file creation mask (0666 by default).");?>
</td>
</tr>
<tr id="directorymask_tr">
<td width="22%" valign="top" class="vncell"><?=gettext("Directory mask"); ?></td>
<td width="78%" class="vtable">
<input name="directorymask" type="text" class="formfld" id="directorymask" size="30" value="<?=htmlspecialchars($pconfig['directorymask']);?>" />
<br /><?=gettext("Use this option to override the directory creation mask (0777 by default).");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Send Buffer Size"); ?></td>
<td width="78%" class="vtable">
<input name="sndbuf" type="text" class="formfld" id="sndbuf" size="30" value="<?=htmlspecialchars($pconfig['sndbuf']);?>" />
<br /><?=sprintf(gettext("Size of send buffer (%d by default)."), 64240); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Receive Buffer Size") ; ?></td>
<td width="78%" class="vtable">
<input name="rcvbuf" type="text" class="formfld" id="rcvbuf" size="30" value="<?=htmlspecialchars($pconfig['rcvbuf']);?>" />
<br /><?=sprintf(gettext("Size of receive buffer (%d by default)."), 64240); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Large read/write");?></td>
<td width="78%" class="vtable">
<input name="largereadwrite" type="checkbox" id="largereadwrite" value="yes" <?php if ($pconfig['largereadwrite']) echo "checked=\"checked\""; ?> />
<?=gettext("Enable large read/write");?><span class="vexpl"><br />
<?=gettext("Use the new 64k streaming read and write varient SMB requests introduced with Windows 2000.");?></span>
</td>
</tr>
<?php html_checkbox("usesendfile", gettext("Use sendfile"), $pconfig['usesendfile'] ? true : false, gettext("Enable use sendfile."), gettext("This may make more efficient use of the system CPU's and cause Samba to be faster. Samba automatically turns this off for clients that use protocol levels lower than NT LM 0.12 and when it detects a client is Windows 9x."), false);?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("EA support");?></td>
<td width="78%" class="vtable">
<input name="easupport" type="checkbox" id="easupport" value="yes" <?php if ($pconfig['easupport']) echo "checked=\"checked\""; ?> />
<?=gettext("Enable extended attribute support");?><span class="vexpl"><br />
<?=gettext("Allow clients to attempt to store OS/2 style extended attributes on a share.");?></span>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Store DOS attributes");?></td>
<td width="78%" class="vtable">
<input name="storedosattributes" type="checkbox" id="storedosattributes" value="yes" <?php if ($pconfig['storedosattributes']) echo "checked=\"checked\""; ?> />
<?=gettext("Enable store DOS attributes");?><span class="vexpl"><br />
<?=gettext("If this parameter is set, Samba attempts to first read DOS attributes (SYSTEM, HIDDEN, ARCHIVE or READ-ONLY) from a filesystem extended attribute, before mapping DOS attributes to UNIX permission bits. When set, DOS attributes will be stored onto an extended attribute in the UNIX filesystem, associated with the file or directory.");?></span>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Null passwords");?></td>
<td width="78%" class="vtable">
<input name="nullpasswords" type="checkbox" id="nullpasswords" value="yes" <?php if ($pconfig['nullpasswords']) echo "checked=\"checked\""; ?> />
<?=gettext("Allow client access to accounts that have null passwords.");?>
</td>
</tr>
<?php html_checkbox("aio", gettext("Asynchronous I/O (AIO)"), $pconfig['aio'] ? true : false, gettext("Enable Asynchronous I/O (AIO)"), "", false, "aio_change()");?>
<?php html_inputbox("aiorsize", gettext("AIO read size"), $pconfig['aiorsize'], sprintf(gettext("Samba will read from file asynchronously when size of request is bigger than this value. (%d by default)"), 1), true, 30);?>
<?php html_inputbox("aiowsize", gettext("AIO write size"), $pconfig['aiowsize'], sprintf(gettext("Samba will write to file asynchronously when size of request is bigger than this value. (%d by default)"), 1), true, 30);?>
<?php /*html_inputbox("aiowbehind", gettext("AIO write behind"), $pconfig['aiowbehind'], "", false, 60);*/?>
<?php html_textarea("auxparam", gettext("Auxiliary parameters"), $pconfig['auxparam'], sprintf(gettext("These parameters are added to [Global] section of %s."), "smb.conf") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html"), false, 65, 5, false, false);?>
</table>
<div id="submit">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save and Restart");?>" onclick="enable_change(true)" />
</div>
<div id="remarks">
<?php html_remark("note", gettext("Note"), sprintf(gettext("To increase CIFS performance try the following:<div id='enumeration'><ul><li>Enable 'Asynchronous I/O (AIO)' switch</li><li>Enable 'Large read/write' switch</li><li>Enable '<a href='%s'>Tuning</a>' switch</li></ul></div>"), "system_advanced.php", "interfaces_lan.php"));?>
</div>
<?php include("formend.inc");?>
</form>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
enable_change(false);
authentication_change();
aio_change();
//-->
</script>
<?php include("fend.inc");?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.