summaryrefslogtreecommitdiffstats
path: root/source/param/params.c
Commit message (Collapse)AuthorAgeFilesLines
* loadparm: add userdata parameter to do_section() and do_parameter().Michael Adam2008-03-261-11/+13
| | | | | | | The userdata is currently unused. It can be used in the future for passing a context like in samba4 code. Michael
* Eliminate global variable in_client and a plethora of extern declarations.Derrell Lipman2008-03-061-3/+1
| | | | Derrell
* Remove two completely unnecessary globalsVolker Lendecke2007-12-101-61/+51
| | | | | | Can someone look over this? To me it looks as if bufr was only made static to save a malloc during an included smb.conf file. I think that's pretty much pointless.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-9/+9
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r17852: Remove a pointless NULL assignmentVolker Lendecke2007-10-101-1/+0
|
* r16570: Corrected the copyright notice. I had requested and received permissionChristopher R. Hertel2007-10-101-3/+3
| | | | | from my management at the University to release under my own copyright. My mistake for entering the wrong info.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2007-10-101-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r13316: Let the carnage begin....Gerald Carter2007-10-101-1/+1
| | | | Sync with trunk as off r13315
* r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison2007-10-101-3/+3
| | | | | | safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy
* r6225: get rid of warnings from my compiler about nested externsHerb Lewis2007-10-101-1/+2
|
* r5543: Fix for bug #962 - using MB sharenames containing a ']' character.Jeremy Allison2007-10-101-13/+41
| | | | | | Processing a share name is now MB safe so long as the correct unix charset is in scope. Jeremy.
* r5535: Reformat so I can actually maintain this code and eventually convert ↵Jeremy Allison2007-10-101-401/+377
| | | | | | to MB safe. Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-5/+5
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-12/+12
| | | | | | warnings. (Adds a lot of const). Andrew Bartlett
* fixed more warnings on irixAndrew Tridgell2001-12-201-3/+3
|
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-4/+4
|
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-121-9/+18
| | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also.
* removed an unreachable statementAndrew Tridgell2001-07-051-1/+0
|
* The big character set handling changeover!Andrew Tridgell2001-07-041-20/+7
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source/rpc_server/srv_spoolss_nt.c - Unrolled construct_notify_jobs_info() loop to only fetch printer info_2 structure once rather than num_print_jobs times. - convert command to unix codepage. - remove lp_remove_service() call as it prevents lp_killservice() from working. - Modified some DEBUG and DEBUGADD statements. source/param/loadparm.c source/param/params.c - change printer, preload, auto services to FLAG_DOS_STRING, reverted earlier changes to szPrintername et al, add comments. source/printing/load.c - fix bug with lp_auto_services() and strtok() source/printing/nt_printing.c source/printing/printing.c - remove redundant test that used SERVICE(snum) source/printing/pcap.c - add unix_to_dos() calls, add notes wrt FIXMEs for xxx_printer_fn() functions. source/web/swat.c - added FIXME comment. source/smbd/service.c - added comment re: dos codepage
* Bug report that on some systems extended characters are being returned asChristopher R. Hertel2000-10-181-1/+2
| | | | | | | | | | | negative values from the mygetc() function. I've modified the return line so that it should return values in the 0..255 range for legitimate characters. This change should probably be copied into SAMBA_2_2 but I haven't checked that tree out yet. Chris -)-----
* reverted lukes changes in param/Andrew Tridgell2000-06-161-0/+1
| | | | | | apparently they were not deliberate, they were probably a result of Luke accidentally copying a CVS directory from one spot to another in error
* more update.Luke Leighton2000-06-161-1/+0
|
* Fix for crash bug in OpenConfFile() if no smb.conf exists.Tim Potter2000-05-051-1/+1
|
* converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-29/+49
| | | | | | | to support some of this I added the following functions in util_file.c file_lines_pload : load lines from a pipe file_pload : load a pipe into memory
* Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-261-1/+1
| | | | | | Stop makeing function calls for every use of skip_multibyte_char. This function is called several *million* times during a NetBench run :-). Jeremy.
* Fix based on code from monyo@home.monyo.com to fix multibyte continuationJeremy Allison1999-12-211-17/+31
| | | | | issues. Jeremy.
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-1/+1
| | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy.
* removed requirement of having a smb.conf for smbwrapper to work.Andrew Tridgell1998-10-051-2/+4
|
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-2/+2
| | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy.
* pm_process() never closed the file (a memory and file descriptor leak)Andrew Tridgell1997-10-311-0/+3
|
* client.c: Changed shadowed variable.Jeremy Allison1997-10-061-1/+0
| | | | | | | | | | | | | locking.c: Removed USE_OPLOCKS - now the default. params.c: Removed unused variable. proto.h: Updated. reply.c: Removed USE_OPLOCKS - now the default. server.c: Removed USE_OPLOCKS - now the default. smb.h: Removed USE_OPLOCKS - now the default. smbparse.c: Changed shadowed variable. status.c: Removed USE_OPLOCKS - now the default. util.c: Removed USE_OPLOCKS - now the default. Jeremy (jallison@whistle.com)
* nmblookup.c:Christopher R. Hertel1997-10-041-307/+548
| | | | | | | | | | | | | | | | | I've added a -r option. When specified, nmblookup will attempt to bind to port 137. In order for this to work, the user must be root and the port must be available (i.e., nmbd not running). If either condition is not met, nmblookup will default to normal behavior; it will try to bind to a free port above 7999. I also removed an artifact. The -p <port> option was being accepted but falling through to the default, which was the usage message. I removed "p:" from the getopt() list. params.c: Rewritten. The scanning is much more linear, and I found and fixed a few bugs. I don't like the way that the scratch buffer is handled, but I believe that it is an improvement over the previous version. Chris -)-----
* 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)Samba Release Account1997-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1.
* minor cleanupsAndrew Tridgell1996-07-241-1/+1
|
* got rid of a lot of redundent header files as we now globally generateAndrew Tridgell1996-06-101-1/+0
| | | | | prototypes automatically using "make proto". This is much less prone to error than the old method of manually adding prototypes
* a huge pile of changes :-)Andrew Tridgell1996-06-041-72/+64
| | | | | | | | The biggest thing is the integration of Lukes new nmbd. Its still largely untested, so we will really need some feedback I've also added auto prototype generation and cleaned up a lot of minor things as a result
* Initial version imported to CVS Samba Release Account1996-05-041-0/+335