diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-11-22 07:09:12 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-11-22 07:09:12 +0000 |
commit | 51f20adc6b964bad6e5bfbf69da68e1e6f45b13e (patch) | |
tree | 9b46032c223e234f7ee94ba68385472fbfe0c4e6 /source3/lib/charcnv.c | |
parent | 5a1c907d3cb6446b5158028582bf9e8a70ff0b02 (diff) | |
download | samba-51f20adc6b964bad6e5bfbf69da68e1e6f45b13e.tar.gz samba-51f20adc6b964bad6e5bfbf69da68e1e6f45b13e.tar.bz2 samba-51f20adc6b964bad6e5bfbf69da68e1e6f45b13e.zip |
added true enumerated types in loadparm.c. Now we don't need all those
"interpret_security" and similar functions. This also means that
testparm produces string values for these enumerated types rather than
an integer. This was done to make the web interface much cleaner.
While I was doing this I found a couple of very nasty bugs in the
parm_table code. Someone had added a handle_character_set() function
that treated the char** pointer for a P_STRING as an integer! This
would have caused memory corruption for anyone using the "character
set" option. The loadparm code is delicate - please be careful about
using it's more esoteric features!
I've also removed the "coding system" global and made it a
P_STRING. The integer value was never used anywhere in Samba.
(This used to be commit bac6b0daa288e879330e3d585582122bb93a1ffb)
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r-- | source3/lib/charcnv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index a7dff4224b..e1a7ac01db 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -150,9 +150,8 @@ char *dos2unix_format(char *str, BOOL overwrite) /* * Interpret character set. */ -int interpret_character_set(char *str, int def) +void interpret_character_set(char *str) { - if (strequal (str, "iso8859-1")) { init_iso8859_1(); } else if (strequal (str, "iso8859-2")) { @@ -160,5 +159,4 @@ int interpret_character_set(char *str, int def) } else { DEBUG(0,("unrecognized character set\n")); } - return def; } |