looking for more project ideas
David Collier-Brown
davec-b at rogers.com
Mon May 1 13:34:36 GMT 2006
Strongly agree!
Logically the checks on the parameters should be when they're
initially set, so the code is "right there". With it in
a different file entirely, it's unlikely to be fixed if.
the loading changes.
After pruning the parameters, one might see code like
{"map hidden", P_BOOL, P_LOCAL, &sDefault.bMap_hidden, set_map_hidden,
NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
---
static BOOL set_map_hidden(int snum, const char *pszParmValue,
char **ptr) {
if (*ptr == True && (sDefault.iCreate_mask & 0111) {
complain_bitterly (;-))
}
else {
sDefault.bMap_hidden = *ptr;
}
return True;
}
Hopefully when someone comes to change map hidden, one will
notice it's set in a handler and modify that (;-))
--dave
Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> davecb at spamcop.net wrote:
>
>
>> One thing that I looked at early in Samba 3 was to thoroughly
>>cross check parameters for self-consistency. For example, if
>>create mask is set to mask out the execute bits, and the map
>>system, hidden or archive options are set, the latter
>>will fail silently.
>> I have a list of about twenty things to check for.
>
>
> Dave,
>
> I'd like to reduce the number of overall parameters before
> we tackle this. Jim McDonough mentioned a configuration
> validity set of tests for production servers at Samba XP
> last week. This might fit into that category.
>
> The problem I have with these types of test in testparm is
> that they bit rot. The "+ character as a winbind separator
> might cause problems" error message we have now. Plus relying
> on today's server implementation rather than actually testing
> the functionality is going to cause false positives at some
> stage.
>
> I'd be willing to go this route but only if it was done in
> a way that was easily maintainable and did not clutter the
> code with an endless amounts of if statements. I'm not sure
> this is a 3 month project though. Do you ?
>
>
>
> cheers, jerry
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>
> iD8DBQFEVYsWIR7qMdg1EfYRAn73AKCyeUONtzGDgBnE0QYjVIfWJSHs0QCgoMfJ
> 78xQs/GZgctWwPJIohLzHuI=
> =gFCc
> -----END PGP SIGNATURE-----
>
--
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net | -- Mark Twain
(416) 223-5943
More information about the samba-technical
mailing list