[Samba] smbldap-tools patch - careful string handling
tom burkart
samba at aussec.com
Thu Apr 7 03:58:22 GMT 2005
The issue is that some of the smb.conf parameters have quotes in funny places
that need to stay there (particularly the smbldap script "wrappers"). The
smbldap tools will issue funny warnings that help to sidetrack finding actual
problems...
Patch attached.
--- smbldap-tools-0.8.8/smbldap_tools.pm.org Mon Apr 4 02:03:34 2005
+++ smbldap-tools-0.8.8/smbldap_tools.pm Thu Apr 7 12:33:36 2005
@@ -100,10 +100,10 @@
## check for a param = value
if ($_=~/=/) {
my ($param,$val);
- if ($_=~/"/) {
+ if ($_=~/\s*.*?\s*=\s*".*"/) {
#my ($param,$val) = ($_=~/(.*)\s*=\s*"(.*)"/);
($param,$val) = /\s*(.*?)\s*=\s*"(.*)"/;
- } elsif ($_=~/'/) {
+ } elsif ($_=~/\s*.*?\s*=\s*'.*'/) {
($param,$val) = /\s*(.*?)\s*=\s*'(.*)'/;
} else {
($param,$val) = /\s*(.*?)\s*=\s*(.*)/;
tom
More information about the samba
mailing list