Subject: | Issue to decode smb.conf when there is space before comment |
Date: | Mon, 27 Mar 2017 16:20:54 +0000 |
To: | "bug-File-Samba [...] rt.cpan.org" <bug-File-Samba [...] rt.cpan.org> |
From: | Bernard Peultier <bernard.peultier [...] asg.com> |
Hi,
I got a valid smb.conf like this :
[migration_fs01]
comment = Root share for inbound migration
path = /data/fs01
browseable = No
nt acl support = Yes
admin users = ada_nasdatamover esgadmin
# This group put in by request of Bernard at ASG
#inherit acls = yes
#inherit owner = yes
#inherit permissions = yes
#map acl inherit = yes
#directory mask = 0770
# End group
The version of File:Samba version 0.03 report undefined value because the regular expression to ignore line with comment are too restrictive.
If you change on load function the following line :
while(<FH>)
{
chomp;
next if /^;|^#/;
next if /^\s+$/;
next if length($_) <= 1;
by
while(<FH>)
{
chomp;
next if /^;|^\s*#/;
next if /^\s+$/;
next if length($_) <= 1;
There is no more undefined value reported at line 363
Regards,
B.PEULTIER