script to find undocumented params

Bradley W. Langhorst brad at
Thu May 2 11:10:01 GMT 2002

I wrote a little perl script to find those params that have no

I don't know what most of them do 
but i'll get cracking on finding out

here's the output:
display charset 
hostname lookups 
ldap user suffix 
add group script 
wins partners 
addprinter command 
unix charset 
lock spin time 
admin log 
inherit acls 
add user to group script 
ssl ca certfile 
winbind enum groups 
max packet 
delete user from group script 
wtmp directory 
packet size 
mangling method 
alternate permissions 
force directory security mode 
ads server 
paranoid server security 
ssl ca certdir 
lock spin count 
winbind enum users 
use spnego 
delete group script 
deleteprinter command 
ldap machine suffix 
ntlm auth 
dos charset 

here's the script - in case somebody else wants it 
#!/usr/bin/perl -w 

#reads in the list of parameters from the source 
#compares this list to the list of parms documented in the docbook
#prints out the names of the parameters that are in need of

my $doc_file = "./docs/docbook/manpages/smb.conf.5.sgml"; 
my $source_file = "./source/param/loadparm.c"; 
my $ln; 
my %params; 

open(SOURCE, "<$source_file") || 
  die "Unable to open $source_file for input: $!\n"; 
open(DOC, "<$doc_file") || 
  die "Unable to open $doc_file for input: $!\n"; 

while ($ln= <SOURCE>) { 
  last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; 
} #burn through the preceding lines 

while ($ln = <SOURCE>) { 
  last if $ln =~ m/^\s*\}\;\s*$/; 
  #pull in the param names only 
  next if $ln =~ m/.*P_SEPARATOR.*/; 
  $ln =~ m/.*\"(.*)\".*/; 
  $params{lc($1)}='not_found'; #not case sensitive 
close SOURCE; 
#now read in the params list from the docs 
@doclines = <DOC>; 

foreach $ln (grep (/\<anchor\ id\=/, @doclines)) { 
  $ln =~ m/^.*\<anchor\
  #print "got: $1 from: $ln"; 
  if (exists $params{lc($1)}) { 
    $params{$1} = 'found'; 

foreach (keys %params) { 
  print "$_\n" if $params{$_} eq 'not_found'; 

More information about the samba-technical mailing list